diff --git a/test/e2e/docs/README.md b/test/e2e/docs/README.md index 59c5aa338e5..83c4917fce7 100644 --- a/test/e2e/docs/README.md +++ b/test/e2e/docs/README.md @@ -95,4 +95,6 @@ validates your change without running anything destructive. When adding a suite assertion, emit or preserve a stable `PASS: ` / `FAIL: ` log line, and update migration coverage through the scenario coverage report and the domain issues under `#3588`. Sandbox lifecycle assertions should use `validation_suites/lib/sandbox_lifecycle.sh`, consume `$E2E_CONTEXT_DIR/context.env`, and keep destructive snapshot restore checks isolated in the opt-in `snapshot-lifecycle` suite. Platform-specific scenarios such as GPU, macOS, WSL, Brev, or DGX Spark must also list `runner_requirements` in `scenarios.yaml`. +Hermes-specific E2E assertions should go through `validation_suites/lib/hermes.sh` and emit `expected.hermes..` IDs. Add or update `hermes_expectations` in `nemoclaw_scenarios/expected-states.yaml` for every new Hermes assertion so coverage reports can distinguish expected pass, current product bugs, platform/secret-gated coverage, out-of-scope behavior, and retired assertions. + Prefer new scenario-matrix coverage over new legacy-style `test-*.sh` scripts. diff --git a/test/e2e/nemoclaw_scenarios/expected-states.yaml b/test/e2e/nemoclaw_scenarios/expected-states.yaml index 8b7d95c11bd..1c301668f9a 100644 --- a/test/e2e/nemoclaw_scenarios/expected-states.yaml +++ b/test/e2e/nemoclaw_scenarios/expected-states.yaml @@ -184,3 +184,223 @@ expected_states: exit_code: 1 message_contains: Port 18080 is not available no_stack_trace: true + +hermes_expectations: + expected.hermes.runtime.gateway-health: + status: expected_pass + issue: 3891 + fix_pr: 3914 + scope: suite + reason: Hermes gateway health should pass after the runtime baseline fix. + expected.hermes.runtime.agent-home: + status: expected_pass + issue: 3891 + fix_pr: 3914 + scope: suite + reason: Hermes agent home exists with safe permissions in completed Hermes sandboxes. + expected.hermes.runtime.env-integrity: + status: expected_pass + issue: 3891 + fix_pr: 3914 + scope: suite + reason: Hermes runtime environment should be present and secret-redacted. + expected.hermes.runtime.security-posture: + status: expected_pass + issue: 3891 + fix_pr: 3914 + scope: suite + reason: Hermes baseline runtime security posture should pass on supported runners. + expected.hermes.inference.switch-route-state: + status: expected_pass + issue: 4111 + scope: suite + reason: Route/config classification should pass for landed Hermes inference-switch behavior. + expected.hermes.inference.env-immutable-on-switch: + status: expected_pass + issue: 4145 + scope: suite + reason: Switching inference should not mutate unrelated Hermes environment state. + expected.hermes.inference.gateway-pid-stable: + status: expected_pass + issue: 4145 + scope: suite + reason: Gateway PID should remain stable for route/config-only inference switching. + expected.hermes.inference.inference-local-chat: + status: expected_pass + issue: 4111 + scope: suite + reason: In-sandbox inference.local chat validates route health after switch. + expected.hermes.inference.hermes-api-chat: + status: expected_pass + issue: 4111 + scope: suite + reason: Hermes API chat should pass when route/config checks are healthy. + expected.hermes.inference.external-timeout-classification: + status: expected_pass + issue: 4145 + scope: suite + reason: External provider timeouts should classify as external/gated, not route regressions. + expected.hermes.discord.config-schema: + status: deferred_platform_or_secret + issue: 4070 + fix_pr: 4126 + scope: suite + reason: Live Discord config validation requires provider secrets or fake gateway coverage. + expected.hermes.discord.policy-egress: + status: deferred_platform_or_secret + issue: 4070 + fix_pr: 4126 + scope: suite + reason: Live Discord egress validation is secret-gated until fake path is wired. + expected.hermes.discord.gateway-connects: + status: deferred_platform_or_secret + issue: 4070 + fix_pr: 4126 + scope: suite + reason: Discord gateway connectivity requires live/fake gateway execution. + expected.hermes.discord.empty-user-allowlist-open-dm-policy: + status: expected_fail_current_bug + issue: 4070 + fix_pr: 4126 + scope: suite + reason: Current main pairs first DM when guild configured and allowlist empty. + expected.hermes.discord.no-openclaw-pairing-copy: + status: expected_fail_current_bug + issue: 4246 + scope: suite + reason: Plugin-entry/pairing-copy applicability to Hermes remains represented until proven out-of-scope. + expected.hermes.discord.plugin-entry-registered: + status: expected_fail_current_bug + issue: 4246 + scope: suite + reason: Discord plugin entry generation may be shared with Hermes and must remain visible. + expected.hermes.slack.config-enabled: + status: deferred_platform_or_secret + issue: 4189 + fix_pr: 4222 + scope: suite + reason: Slack config enablement requires live or fake Slack provider state. + expected.hermes.slack.provider-state: + status: deferred_platform_or_secret + issue: 4189 + fix_pr: 4222 + scope: suite + reason: Slack provider state is gated by provider credentials or fixtures. + expected.hermes.slack.socket-mode-starts: + status: expected_fail_current_bug + issue: 4189 + fix_pr: 4222 + scope: suite + reason: Slack socket-mode startup remains a known Hermes product bug until fixed. + expected.hermes.slack.no-secret-leak: + status: deferred_platform_or_secret + issue: 3582 + scope: suite + reason: Live Slack secret leak assertions require secret-gated runtime evidence. + expected.hermes.slack.idle-reconnect-delivers-first-mention: + status: expected_fail_current_bug + issue: 3582 + scope: suite + reason: Slack idle reconnect first mention delivery remains expected failing or gated. + expected.hermes.telegram.first-message-tool-dispatch: + status: expected_fail_current_bug + issue: 3893 + fix_pr: 4175 + scope: suite + reason: Telegram first message tool dispatch remains a known current bug until fixed. + expected.hermes.telegram.single-polling-loop: + status: expected_pass + issue: 4067 + fix_pr: 3925 + scope: suite + reason: Landed Telegram polling-loop fix should pass or be explicitly gated in live validation. + expected.hermes.telegram.privacy-mode-guidance: + status: expected_pass + issue: 4068 + fix_pr: 4107 + scope: suite + reason: Telegram privacy-mode guidance fix should pass in config/guidance assertions. + expected.hermes.telegram.group-message-preconditions: + status: expected_pass + issue: 4068 + fix_pr: 4107 + scope: suite + reason: Telegram group-message preconditions should be classified clearly after landed fix. + expected.hermes.rebuild.provider-credential-reused: + status: expected_fail_current_bug + issue: 3895 + fix_pr: 3918 + scope: suite + reason: Gateway credential reuse when host env is empty is expected failing until the fix lands. + expected.hermes.rebuild.messaging-config-preserved: + status: expected_pass + issue: 4146 + fix_pr: 4144 + scope: suite + reason: Messaging config preservation should pass once the rebuild race fix is present. + expected.hermes.rebuild.dashboard-forward-released: + status: expected_fail_current_bug + issue: 4146 + fix_pr: 4144 + scope: suite + reason: Dashboard forward release remains tracked as a rebuild race expectation. + expected.hermes.rebuild.post-rebuild-health: + status: expected_pass + issue: 4146 + fix_pr: 4144 + scope: suite + reason: Post-rebuild health should pass after rebuild preservation fixes. + expected.hermes.policy.inactive-messaging-not-preenabled: + status: expected_pass + issue: 3981 + fix_pr: 3984 + scope: suite + reason: Inactive messaging policies should not be preenabled after landed fix. + expected.hermes.policy.managed-inference-anthropic-messages-path: + status: expected_fail_current_bug + issue: 4230 + scope: suite + reason: Anthropic-compatible /v1/messages policy path remains a current Hermes bug. + expected.hermes.policy.venv-python-egress: + status: expected_fail_current_bug + issue: 3225 + fix_pr: 3228 + scope: suite + reason: Hermes venv Python egress remains tracked as expected failing until validated fixed. + expected.hermes.policy.no-phantom-allowlist: + status: expected_pass + issue: 3981 + fix_pr: 3984 + scope: suite + reason: Policy allowlists should not contain phantom unrelated entries after landed fix. + expected.hermes.provider.anthropic-compatible-chat: + status: expected_fail_current_bug + issue: 4230 + scope: suite + reason: Anthropic-compatible chat remains a known provider compatibility bug. + expected.hermes.provider.gemini-tool-schema-compatible: + status: expected_fail_current_bug + issue: 4232 + scope: suite + reason: Gemini tool schema compatibility remains a known provider bug. + expected.hermes.provider.onboard-smoke-not-sufficient: + status: expected_fail_current_bug + issue: 4230 + scope: suite + reason: Onboard smoke is not sufficient to prove provider runtime chat compatibility. + expected.hermes.security.shields-up-down-macos-vm-driver: + status: expected_fail_current_bug + issue: 4245 + scope: suite + reason: macOS Docker Desktop VM-driver shields behavior remains expected failing until fixed. + expected.hermes.security.shields-config-locked: + status: deferred_platform_or_secret + issue: 4245 + scope: suite + reason: Shields config lock/status consistency requires platform-specific runner evidence. + expected.hermes.tui.history-writable: + status: expected_fail_current_bug + issue: 2432 + fix_pr: 2473 + scope: suite + reason: Hermes TUI history writability and clean exit remain expected failing until fixed. diff --git a/test/e2e/nemoclaw_scenarios/scenarios.yaml b/test/e2e/nemoclaw_scenarios/scenarios.yaml index 36bbfb517f4..9d9b5a3fd13 100644 --- a/test/e2e/nemoclaw_scenarios/scenarios.yaml +++ b/test/e2e/nemoclaw_scenarios/scenarios.yaml @@ -122,6 +122,11 @@ setup_scenarios: - smoke - inference - hermes-specific + - hermes-runtime + - hermes-inference-switch + - hermes-policy + - hermes-provider-compatibility + - hermes-security-tui - baseline-onboarding gpu-repo-local-ollama-openclaw: alias_for_plan: gpu-repo-docker-cdi__local-ollama-openclaw @@ -376,6 +381,11 @@ test_plans: - smoke - inference - hermes-specific + - hermes-runtime + - hermes-inference-switch + - hermes-policy + - hermes-provider-compatibility + - hermes-security-tui gpu-repo-docker-cdi__local-ollama-openclaw: base: gpu-repo-docker-cdi onboarding: local-ollama-openclaw @@ -492,6 +502,9 @@ test_plans: suites: - smoke - messaging-discord + - hermes-runtime + - hermes-inference-switch + - hermes-discord ubuntu-repo-docker__cloud-nvidia-hermes-slack: base: ubuntu-repo-docker onboarding: cloud-nvidia-hermes-slack @@ -502,6 +515,9 @@ test_plans: suites: - smoke - messaging-slack + - hermes-runtime + - hermes-inference-switch + - hermes-slack ubuntu-repo-docker__cloud-nvidia-openclaw-resume-after-interrupt: base: ubuntu-repo-docker onboarding: cloud-nvidia-openclaw-resume-after-interrupt diff --git a/test/e2e/runtime/resolver/coverage.ts b/test/e2e/runtime/resolver/coverage.ts index 4eefc79dc27..c48599f48fa 100644 --- a/test/e2e/runtime/resolver/coverage.ts +++ b/test/e2e/runtime/resolver/coverage.ts @@ -70,6 +70,23 @@ export function renderCoverageReport( lines.push(""); lines.push(`Total suites: ${Object.keys(meta.suites.suites).length}`); lines.push(""); + const hermesExpectations = expectedStates.hermes_expectations ?? {}; + if (Object.keys(hermesExpectations).length > 0) { + lines.push("## Hermes Expectations"); + lines.push(""); + lines.push("| Assertion | Status | Issue | Fix PR | Scope | Reason |"); + lines.push("|---|---|---|---|---|---|"); + for (const [id, expectation] of Object.entries(hermesExpectations).sort(([a], [b]) => + a.localeCompare(b), + )) { + const issue = expectation.issue === undefined ? "" : `#${expectation.issue}`; + const fix = expectation.fix_pr === undefined ? "" : `PR #${expectation.fix_pr}`; + lines.push( + `| ${id} | ${expectation.status} | ${issue} | ${fix} | ${expectation.scope ?? ""} | ${expectation.reason} |`, + ); + } + lines.push(""); + } lines.push("## Scenarios"); lines.push(""); const hasStatus = diff --git a/test/e2e/runtime/resolver/load.ts b/test/e2e/runtime/resolver/load.ts index 9c8dc3991be..a78590b1999 100644 --- a/test/e2e/runtime/resolver/load.ts +++ b/test/e2e/runtime/resolver/load.ts @@ -17,6 +17,7 @@ import { EXPECTED_FAILURE_ERROR_CLASSES, EXPECTED_FAILURE_PHASES, EXPECTED_FAILURE_SIDE_EFFECTS, + HERMES_EXPECTATION_STATUSES, } from "./schema.ts"; import type { ScenariosFile, @@ -258,6 +259,44 @@ function validateExpectedStates( validateExpectedFailureBlock(e.expected_failure, `expected_state ${id}`, { partial: false }); } } + if ("hermes_expectations" in doc) { + const rawExpectations = doc.hermes_expectations; + if (!rawExpectations || typeof rawExpectations !== "object" || Array.isArray(rawExpectations)) { + throw new Error(`metadata file ${file} section 'hermes_expectations' must be a mapping`); + } + for (const [id, entry] of Object.entries(rawExpectations as Record)) { + if (!id.startsWith("expected.hermes.")) { + throw new Error(`hermes_expectations key ${id} must start with expected.hermes.`); + } + if (!entry || typeof entry !== "object" || Array.isArray(entry)) { + throw new Error(`hermes_expectations.${id} must be a mapping`); + } + const e = entry as Record; + if ( + typeof e.status !== "string" || + !HERMES_EXPECTATION_STATUSES.includes(e.status as (typeof HERMES_EXPECTATION_STATUSES)[number]) + ) { + throw new Error( + `hermes_expectations.${id}.status must be one of: ${HERMES_EXPECTATION_STATUSES.join(", ")}`, + ); + } + if (typeof e.reason !== "string" || e.reason.length === 0) { + throw new Error(`hermes_expectations.${id}.reason must be a non-empty string`); + } + if (e.issue !== undefined && typeof e.issue !== "string" && typeof e.issue !== "number") { + throw new Error(`hermes_expectations.${id}.issue must be a string or number`); + } + if (e.fix_pr !== undefined && typeof e.fix_pr !== "string" && typeof e.fix_pr !== "number") { + throw new Error(`hermes_expectations.${id}.fix_pr must be a string or number`); + } + if ( + e.scope !== undefined && + (typeof e.scope !== "string" || !["suite", "scenario", "assertion"].includes(e.scope)) + ) { + throw new Error(`hermes_expectations.${id}.scope must be one of: suite, scenario, assertion`); + } + } + } return doc as unknown as ExpectedStatesFile; } diff --git a/test/e2e/runtime/resolver/schema.ts b/test/e2e/runtime/resolver/schema.ts index d8354981f64..871238f5ab1 100644 --- a/test/e2e/runtime/resolver/schema.ts +++ b/test/e2e/runtime/resolver/schema.ts @@ -145,8 +145,26 @@ export interface ScenariosFile { export type ExpectedStateConfig = AnyRecord; +export const HERMES_EXPECTATION_STATUSES = [ + "expected_pass", + "expected_fail_current_bug", + "deferred_platform_or_secret", + "out_of_scope", + "retired", +] as const; +export type HermesExpectationStatus = (typeof HERMES_EXPECTATION_STATUSES)[number]; + +export interface HermesExpectation extends AnyRecord { + status: HermesExpectationStatus; + issue?: string | number; + fix_pr?: string | number; + scope?: "suite" | "scenario" | "assertion"; + reason: string; +} + export interface ExpectedStatesFile { expected_states: Record; + hermes_expectations?: Record; } export interface SuiteStep { diff --git a/test/e2e/scenario-framework-tests/e2e-coverage-report.test.ts b/test/e2e/scenario-framework-tests/e2e-coverage-report.test.ts index bc4351664ac..367fa5266f5 100644 --- a/test/e2e/scenario-framework-tests/e2e-coverage-report.test.ts +++ b/test/e2e/scenario-framework-tests/e2e-coverage-report.test.ts @@ -11,6 +11,17 @@ const REPO_ROOT = path.resolve(import.meta.dirname, "../../.."); const E2E_DIR = path.join(REPO_ROOT, "test/e2e"); describe("coverage report", () => { + it("test_should_render_hermes_current_bug_expectations_in_coverage_report", () => { + const meta = loadMetadataFromDir(E2E_DIR); + const md = renderCoverageReport(meta); + expect(md).toContain("## Hermes Expectations"); + expect(md).toContain("expected.hermes.discord.empty-user-allowlist-open-dm-policy"); + expect(md).toContain("expected_fail_current_bug"); + expect(md).toContain("#4070"); + expect(md).toContain("expected.hermes.runtime.gateway-health"); + expect(md).toContain("expected_pass"); + }); + it("should_render_single_coverage_table", () => { const meta = loadMetadataFromDir(E2E_DIR); const md = renderCoverageReport(meta); diff --git a/test/e2e/scenario-framework-tests/e2e-lib-helpers.test.ts b/test/e2e/scenario-framework-tests/e2e-lib-helpers.test.ts index 5f72e490549..5f3dbc980e1 100644 --- a/test/e2e/scenario-framework-tests/e2e-lib-helpers.test.ts +++ b/test/e2e/scenario-framework-tests/e2e-lib-helpers.test.ts @@ -32,6 +32,153 @@ function runBash(script: string, env: Record = {}): SpawnSyncRet // ────────────────────────────────────────────────────────────────────────── describe("E2E shell helpers", () => { + it("test_should_source_hermes_helpers_under_strict_shell_mode", () => { + const r = runBash(` + set -euo pipefail + . "${VALIDATION_SUITES}/lib/hermes.sh" + declare -F e2e_hermes_load_context + declare -F e2e_hermes_assert_gateway_health + declare -F e2e_hermes_assert_agent_home_permissions + declare -F e2e_hermes_assert_env_integrity + declare -F e2e_hermes_assert_security_posture + `); + expect(r.status, r.stderr).toBe(0); + }); + + it("test_should_fail_clearly_when_hermes_context_is_missing", () => { + const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "e2e-hermes-missing-")); + try { + const r = runBash( + ` + set -euo pipefail + . "${VALIDATION_SUITES}/lib/hermes.sh" + e2e_hermes_assert_gateway_health + `, + { E2E_CONTEXT_DIR: tmp }, + ); + expect(r.status).not.toBe(0); + expect(r.stderr).toMatch(/E2E_AGENT|E2E_SANDBOX_NAME|context/i); + expect(r.stderr).not.toContain("super-secret-hermes-token"); + } finally { + fs.rmSync(tmp, { recursive: true, force: true }); + } + }); + + it("test_should_not_emit_secret_values_from_hermes_runtime_helpers", () => { + const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "e2e-hermes-secret-")); + try { + fs.writeFileSync( + path.join(tmp, "context.env"), + [ + "E2E_SCENARIO=hermes-test", + "E2E_AGENT=hermes", + "E2E_SANDBOX_NAME=hermes-sandbox", + "E2E_GATEWAY_URL=http://127.0.0.1:18789", + "E2E_PROVIDER_API_KEY=super-secret-hermes-token", + "DISCORD_BOT_TOKEN=discord-secret-token", + ].join("\n") + "\n", + ); + const r = runBash( + ` + set -euo pipefail + . "${VALIDATION_SUITES}/lib/hermes.sh" + e2e_hermes_assert_env_integrity + `, + { E2E_CONTEXT_DIR: tmp, E2E_DRY_RUN: "1" }, + ); + expect(r.status, r.stderr).toBe(0); + expect(r.stdout + r.stderr).toContain("expected.hermes.runtime.env-integrity"); + expect(r.stdout + r.stderr).not.toContain("super-secret-hermes-token"); + expect(r.stdout + r.stderr).not.toContain("discord-secret-token"); + expect(r.stdout + r.stderr).toMatch(/REDACTED|dry-run/i); + } finally { + fs.rmSync(tmp, { recursive: true, force: true }); + } + }); + + it("test_should_classify_external_timeout_separately_from_route_regression", () => { + const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "e2e-hermes-timeout-")); + try { + fs.writeFileSync( + path.join(tmp, "context.env"), + [ + "E2E_SCENARIO=hermes-test", + "E2E_AGENT=hermes", + "E2E_SANDBOX_NAME=hermes-sandbox", + "E2E_GATEWAY_URL=http://127.0.0.1:18789", + "E2E_INFERENCE_ROUTE=inference-local", + ].join("\n") + "\n", + ); + const r = runBash( + ` + set -euo pipefail + . "${VALIDATION_SUITES}/lib/hermes.sh" + HERMES_EXTERNAL_TIMEOUT_CMD='echo "curl: operation timed out" >&2; exit 28' + export HERMES_EXTERNAL_TIMEOUT_CMD + e2e_hermes_assert_external_timeout_classification + `, + { E2E_CONTEXT_DIR: tmp }, + ); + expect(r.status, r.stderr).toBe(0); + expect(r.stdout + r.stderr).toContain("expected.hermes.inference.external-timeout-classification"); + expect(r.stdout + r.stderr).toMatch(/external|gated|timeout/i); + } finally { + fs.rmSync(tmp, { recursive: true, force: true }); + } + }); + + it("test_should_redact_provider_errors_from_hermes_inference_output", () => { + const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "e2e-hermes-redact-")); + try { + fs.writeFileSync( + path.join(tmp, "context.env"), + [ + "E2E_SCENARIO=hermes-test", + "E2E_AGENT=hermes", + "E2E_SANDBOX_NAME=hermes-sandbox", + "E2E_GATEWAY_URL=http://127.0.0.1:18789", + ].join("\n") + "\n", + ); + const r = runBash( + ` + set -euo pipefail + . "${VALIDATION_SUITES}/lib/hermes.sh" + HERMES_API_CHAT_CMD='echo "provider failed token=sk-supersecret123456789" >&2; exit 1' + export HERMES_API_CHAT_CMD + e2e_hermes_assert_hermes_api_chat || true + `, + { E2E_CONTEXT_DIR: tmp }, + ); + expect(r.stdout + r.stderr).toContain("expected.hermes.inference.hermes-api-chat"); + expect(r.stdout + r.stderr).not.toContain("sk-supersecret123456789"); + expect(r.stdout + r.stderr).toContain("REDACTED"); + } finally { + fs.rmSync(tmp, { recursive: true, force: true }); + } + }); + + it("test_should_detect_gateway_credential_reuse_when_host_env_empty", () => { + const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "e2e-hermes-cred-reuse-")); + try { + fs.writeFileSync(path.join(tmp, "context.env"), "E2E_SCENARIO=hermes-test\nE2E_AGENT=hermes\nE2E_SANDBOX_NAME=hermes-sandbox\n"); + const r = runBash( + ` + set -euo pipefail + . "${VALIDATION_SUITES}/lib/hermes.sh" + HERMES_GATEWAY_CREDENTIAL_CMD='echo "credential=nvapi-supersecret123456"; exit 0' + export HERMES_GATEWAY_CREDENTIAL_CMD + e2e_hermes_assert_rebuild_provider_credential_reused + `, + { E2E_CONTEXT_DIR: tmp }, + ); + expect(r.status, r.stderr).toBe(0); + expect(r.stdout + r.stderr).toContain("expected.hermes.rebuild.provider-credential-reused"); + expect(r.stdout + r.stderr).not.toContain("nvapi-supersecret123456"); + } finally { + fs.rmSync(tmp, { recursive: true, force: true }); + } + }); + it("test_should_source_inference_routing_helpers_under_strict_shell_mode", () => { const r = runBash(` set -euo pipefail diff --git a/test/e2e/scenario-framework-tests/e2e-metadata-final-hygiene.test.ts b/test/e2e/scenario-framework-tests/e2e-metadata-final-hygiene.test.ts index 42d6eabf0e0..5f2a9e84a55 100644 --- a/test/e2e/scenario-framework-tests/e2e-metadata-final-hygiene.test.ts +++ b/test/e2e/scenario-framework-tests/e2e-metadata-final-hygiene.test.ts @@ -20,6 +20,8 @@ import { loadMetadataFromDir } from "../runtime/resolver/load.ts"; const REPO_ROOT = path.resolve(import.meta.dirname, "../../.."); const E2E_DIR = path.join(REPO_ROOT, "test/e2e"); const VALIDATION_SUITES_DIR = path.join(E2E_DIR, "validation_suites"); +const HERMES_ASSERTION_RE = /expected\.hermes\.[A-Za-z0-9_.-]+/g; + describe("Phase 11 final hygiene", () => { it("all_suite_scripts_should_exist", () => { const meta = loadMetadataFromDir(E2E_DIR); @@ -41,6 +43,56 @@ describe("Phase 11 final hygiene", () => { expect(missing, `missing/non-executable suite scripts:\n${missing.join("\n")}`).toEqual([]); }); + it("test_should_require_metadata_for_all_expected_hermes_assertions", () => { + const meta = loadMetadataFromDir(E2E_DIR); + const documented = new Set(Object.keys(meta.expectedStates.hermes_expectations ?? {})); + const referenced = new Set(); + for (const suite of Object.values(meta.suites.suites)) { + for (const step of suite.steps) { + const p = path.join(VALIDATION_SUITES_DIR, step.script); + if (!fs.existsSync(p)) continue; + const raw = fs.readFileSync(p, "utf8"); + for (const match of raw.matchAll(HERMES_ASSERTION_RE)) { + referenced.add(match[0]); + } + } + } + const helperPath = path.join(VALIDATION_SUITES_DIR, "lib", "hermes.sh"); + const helper = fs.readFileSync(helperPath, "utf8"); + for (const match of helper.matchAll(HERMES_ASSERTION_RE)) { + referenced.add(match[0]); + } + const missing = [...referenced].filter((id) => !documented.has(id)).sort(); + expect(missing, `missing Hermes expectation metadata:\n${missing.join("\n")}`).toEqual([]); + }); + + it("test_should_represent_all_issue_inventory_items", () => { + const meta = loadMetadataFromDir(E2E_DIR); + const expectations = Object.values(meta.expectedStates.hermes_expectations ?? {}); + const issues = new Set(expectations.map((entry) => String(entry.issue ?? ""))); + for (const issue of [ + "3891", + "3981", + "4067", + "4068", + "4111", + "4145", + "3893", + "3895", + "4070", + "4189", + "4230", + "4232", + "4245", + "4246", + "3582", + "3225", + "2432", + ]) { + expect(issues, `Hermes expectation metadata missing issue #${issue}`).toContain(issue); + } + }); + it("all_scenarios_should_have_expected_state_and_suites", () => { const meta = loadMetadataFromDir(E2E_DIR); const problems: string[] = []; diff --git a/test/e2e/scenario-framework-tests/e2e-scenario-resolver.test.ts b/test/e2e/scenario-framework-tests/e2e-scenario-resolver.test.ts index 7caffd649ad..510580ea97d 100644 --- a/test/e2e/scenario-framework-tests/e2e-scenario-resolver.test.ts +++ b/test/e2e/scenario-framework-tests/e2e-scenario-resolver.test.ts @@ -66,6 +66,20 @@ describe("E2E scenario resolver", () => { }); }); + it("test_should_resolve_all_hermes_scenario_plans", () => { + const meta = realMetadata(); + const hermesScenarioIds = Object.entries(meta.scenarios.setup_scenarios) + .filter(([, sc]) => sc.dimensions?.onboarding.includes("hermes")) + .map(([id]) => id); + expect(hermesScenarioIds.length).toBeGreaterThan(0); + for (const id of hermesScenarioIds) { + const plan = resolveScenario(id, meta); + const suiteIds = plan.suites.map((suite) => suite.id); + expect(suiteIds, `${id} missing hermes-runtime`).toContain("hermes-runtime"); + expect(suiteIds, `${id} missing hermes-inference-switch`).toContain("hermes-inference-switch"); + } + }); + it("should_fail_for_unknown_scenario", () => { const meta = realMetadata(); expect(() => resolveScenario("does-not-exist", meta)).toThrow(/does-not-exist/); @@ -234,6 +248,32 @@ describe("run-scenario.sh --plan-only", () => { } }); + it("test_should_include_hermes_suites_in_plan_only_output", () => { + const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "e2e-hermes-plan-")); + try { + const result = spawnSync( + "bash", + [path.join(E2E_DIR, "runtime", "run-scenario.sh"), "ubuntu-repo-cloud-hermes", "--plan-only"], + { + env: { ...process.env, E2E_CONTEXT_DIR: tmp }, + encoding: "utf8", + timeout: Number(process.env.E2E_SPAWN_TIMEOUT_MS ?? 60_000), + cwd: REPO_ROOT, + }, + ); + expect(result.status, result.stderr).toBe(0); + expect(result.stdout).toContain("hermes-runtime"); + expect(result.stdout).toContain("hermes-inference-switch"); + const planJsonPath = path.join(tmp, "plan.json"); + const doc = JSON.parse(fs.readFileSync(planJsonPath, "utf8")); + const suites = doc.suites.map((s: { id: string }) => s.id); + expect(suites).toContain("hermes-runtime"); + expect(suites).toContain("hermes-inference-switch"); + } finally { + fs.rmSync(tmp, { recursive: true, force: true }); + } + }); + it("run_scenario_plan_only_should_fail_for_unknown_scenario", () => { const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "e2e-plan-")); try { diff --git a/test/e2e/scenario-framework-tests/e2e-scenario-schema.test.ts b/test/e2e/scenario-framework-tests/e2e-scenario-schema.test.ts index b9768cf2dd3..393f18da637 100644 --- a/test/e2e/scenario-framework-tests/e2e-scenario-schema.test.ts +++ b/test/e2e/scenario-framework-tests/e2e-scenario-schema.test.ts @@ -75,6 +75,24 @@ describe("E2E scenario metadata schema", () => { } }); + it("test_should_reject_unknown_hermes_expectation_status", () => { + const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "e2e-schema-hermes-status-")); + try { + fs.writeFileSync( + path.join(tmp, "scenarios.yaml"), + `platforms:\n p: {}\ninstalls:\n i: {}\nruntimes:\n r: {}\nonboarding:\n o:\n agent: hermes\nsetup_scenarios:\n s:\n dimensions: { platform: p, install: i, runtime: r, onboarding: o }\n expected_state: ready\n suites: [hermes-runtime]\n`, + ); + fs.writeFileSync( + path.join(tmp, "expected-states.yaml"), + `expected_states:\n ready: {}\nhermes_expectations:\n expected.hermes.runtime.gateway-health:\n status: maybe_later\n issue: 3891\n scope: suite\n reason: invalid status fixture\n`, + ); + fs.writeFileSync(tmp + "/suites.yaml", "suites:\n hermes-runtime:\n steps: []\n"); + expect(() => loadMetadataFromDir(tmp)).toThrow(/expected_pass|expected_fail_current_bug|deferred_platform_or_secret|out_of_scope|retired|maybe_later/); + } finally { + fs.rmSync(tmp, { recursive: true, force: true }); + } + }); + it("should_define_initial_expected_states", () => { const states = loadYaml(STATES_PATH); const es = states.expected_states as AnyRecord; diff --git a/test/e2e/scenario-framework-tests/e2e-suite-runner.test.ts b/test/e2e/scenario-framework-tests/e2e-suite-runner.test.ts index a51eeaf947b..017fa2f0600 100644 --- a/test/e2e/scenario-framework-tests/e2e-suite-runner.test.ts +++ b/test/e2e/scenario-framework-tests/e2e-suite-runner.test.ts @@ -43,6 +43,15 @@ function fullContext(): Record { }; } +function hermesContext(): Record { + return { + ...fullContext(), + E2E_SCENARIO: "ubuntu-repo-cloud-hermes", + E2E_AGENT: "hermes", + E2E_SANDBOX_NAME: "e2e-ubuntu-repo-cloud-hermes", + }; +} + describe("Issue #3810 messaging suite wiring", () => { it("should_define_real_steps_for_messaging_provider_suites", () => { const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "e2e-messaging-suites-")); @@ -101,6 +110,141 @@ describe("Issue #3810 messaging suite wiring", () => { }); describe("run-suites.sh", () => { + it("test_should_emit_hermes_runtime_assertion_ids_in_dry_run", () => { + const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "e2e-hermes-runtime-")); + try { + seedContext(tmp, { + ...hermesContext(), + E2E_PROVIDER_API_KEY: "super-secret-hermes-token", + SLACK_BOT_TOKEN: "xoxb-secret-token", + }); + const r = runSuites(["hermes-runtime"], { E2E_CONTEXT_DIR: tmp, E2E_DRY_RUN: "1" }); + expect(r.status, `stderr:${r.stderr}\nstdout:${r.stdout}`).toBe(0); + for (const id of [ + "expected.hermes.runtime.gateway-health", + "expected.hermes.runtime.agent-home", + "expected.hermes.runtime.env-integrity", + "expected.hermes.runtime.security-posture", + ]) { + expect(r.stdout).toContain(id); + } + expect(r.stdout + r.stderr).not.toContain("super-secret-hermes-token"); + expect(r.stdout + r.stderr).not.toContain("xoxb-secret-token"); + } finally { + fs.rmSync(tmp, { recursive: true, force: true }); + } + }); + + it("test_should_emit_hermes_inference_switch_ids_in_dry_run", () => { + const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "e2e-hermes-inference-")); + try { + seedContext(tmp, hermesContext()); + const r = runSuites(["hermes-inference-switch"], { E2E_CONTEXT_DIR: tmp, E2E_DRY_RUN: "1" }); + expect(r.status, `stderr:${r.stderr}\nstdout:${r.stdout}`).toBe(0); + for (const id of [ + "expected.hermes.inference.switch-route-state", + "expected.hermes.inference.env-immutable-on-switch", + "expected.hermes.inference.gateway-pid-stable", + "expected.hermes.inference.inference-local-chat", + "expected.hermes.inference.hermes-api-chat", + "expected.hermes.inference.external-timeout-classification", + ]) { + expect(r.stdout).toContain(id); + } + } finally { + fs.rmSync(tmp, { recursive: true, force: true }); + } + }); + + it("test_should_emit_hermes_messaging_assertion_ids_in_dry_run", () => { + const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "e2e-hermes-msg-")); + try { + const cases: Array<[string, string[]]> = [ + ["hermes-discord", [ + "expected.hermes.discord.config-schema", + "expected.hermes.discord.policy-egress", + "expected.hermes.discord.gateway-connects", + "expected.hermes.discord.empty-user-allowlist-open-dm-policy", + "expected.hermes.discord.no-openclaw-pairing-copy", + "expected.hermes.discord.plugin-entry-registered", + ]], + ["hermes-slack", [ + "expected.hermes.slack.config-enabled", + "expected.hermes.slack.provider-state", + "expected.hermes.slack.socket-mode-starts", + "expected.hermes.slack.no-secret-leak", + "expected.hermes.slack.idle-reconnect-delivers-first-mention", + ]], + ["hermes-telegram", [ + "expected.hermes.telegram.first-message-tool-dispatch", + "expected.hermes.telegram.single-polling-loop", + "expected.hermes.telegram.privacy-mode-guidance", + "expected.hermes.telegram.group-message-preconditions", + ]], + ]; + for (const [suite, ids] of cases) { + seedContext(tmp, { ...hermesContext(), E2E_MESSAGING_PROVIDER: suite.replace("hermes-", ""), SLACK_BOT_TOKEN: "xoxb-secret-token", DISCORD_BOT_TOKEN: "discord-secret-token", TELEGRAM_BOT_TOKEN: "telegram-secret-token" }); + const r = runSuites([suite], { E2E_CONTEXT_DIR: tmp, E2E_DRY_RUN: "1" }); + expect(r.status, `suite:${suite}\nstderr:${r.stderr}\nstdout:${r.stdout}`).toBe(0); + for (const id of ids) expect(r.stdout).toContain(id); + expect(r.stdout + r.stderr).not.toContain("xoxb-secret-token"); + expect(r.stdout + r.stderr).not.toContain("discord-secret-token"); + expect(r.stdout + r.stderr).not.toContain("telegram-secret-token"); + } + } finally { + fs.rmSync(tmp, { recursive: true, force: true }); + } + }); + + it("test_should_emit_hermes_rebuild_assertion_ids_in_dry_run", () => { + const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "e2e-hermes-rebuild-")); + try { + seedContext(tmp, hermesContext()); + const r = runSuites(["hermes-rebuild"], { E2E_CONTEXT_DIR: tmp, E2E_DRY_RUN: "1" }); + expect(r.status, `stderr:${r.stderr}\nstdout:${r.stdout}`).toBe(0); + for (const id of [ + "expected.hermes.rebuild.provider-credential-reused", + "expected.hermes.rebuild.messaging-config-preserved", + "expected.hermes.rebuild.dashboard-forward-released", + "expected.hermes.rebuild.post-rebuild-health", + ]) expect(r.stdout).toContain(id); + } finally { + fs.rmSync(tmp, { recursive: true, force: true }); + } + }); + + it("test_should_emit_hermes_policy_provider_security_tui_ids_in_dry_run", () => { + const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "e2e-hermes-remaining-")); + try { + const cases: Array<[string, string[]]> = [ + ["hermes-policy", [ + "expected.hermes.policy.inactive-messaging-not-preenabled", + "expected.hermes.policy.managed-inference-anthropic-messages-path", + "expected.hermes.policy.venv-python-egress", + "expected.hermes.policy.no-phantom-allowlist", + ]], + ["hermes-provider-compatibility", [ + "expected.hermes.provider.anthropic-compatible-chat", + "expected.hermes.provider.gemini-tool-schema-compatible", + "expected.hermes.provider.onboard-smoke-not-sufficient", + ]], + ["hermes-security-tui", [ + "expected.hermes.security.shields-up-down-macos-vm-driver", + "expected.hermes.security.shields-config-locked", + "expected.hermes.tui.history-writable", + ]], + ]; + for (const [suite, ids] of cases) { + seedContext(tmp, hermesContext()); + const r = runSuites([suite], { E2E_CONTEXT_DIR: tmp, E2E_DRY_RUN: "1" }); + expect(r.status, `suite:${suite}\nstderr:${r.stderr}\nstdout:${r.stdout}`).toBe(0); + for (const id of ids) expect(r.stdout).toContain(id); + } + } finally { + fs.rmSync(tmp, { recursive: true, force: true }); + } + }); + it("security_credentials_suite_should_emit_stable_assertion_ids", () => { const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "e2e-security-credentials-")); try { diff --git a/test/e2e/validation_suites/hermes/00-hermes-health.sh b/test/e2e/validation_suites/hermes/00-hermes-health.sh index 0fff0fd9ab9..af5a588c07e 100755 --- a/test/e2e/validation_suites/hermes/00-hermes-health.sh +++ b/test/e2e/validation_suites/hermes/00-hermes-health.sh @@ -3,25 +3,11 @@ # SPDX-License-Identifier: Apache-2.0 # # hermes-specific step: hermes-health -# Placeholder: real assertions migrate with the existing Hermes E2E scripts. set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -LIB_DIR="$(cd "${SCRIPT_DIR}/../../runtime/lib" && pwd)" -# shellcheck source=../../runtime/lib/env.sh -. "${LIB_DIR}/env.sh" -# shellcheck source=../../runtime/lib/context.sh -. "${LIB_DIR}/context.sh" +# shellcheck source=../lib/hermes.sh +. "${SCRIPT_DIR}/../lib/hermes.sh" -echo "hermes-specific:hermes-health" -e2e_context_require E2E_AGENT -if e2e_env_is_dry_run; then - echo "[dry-run] would run Hermes health checks" - exit 0 -fi -agent="$(e2e_context_get E2E_AGENT)" -if [[ "${agent}" != "hermes" ]]; then - echo "hermes-specific: E2E_AGENT should be 'hermes', got '${agent}'" >&2 - exit 1 -fi +e2e_hermes_assert_gateway_health diff --git a/test/e2e/validation_suites/hermes/00-runtime-gateway-health.sh b/test/e2e/validation_suites/hermes/00-runtime-gateway-health.sh new file mode 100755 index 00000000000..65aaa70f763 --- /dev/null +++ b/test/e2e/validation_suites/hermes/00-runtime-gateway-health.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +# shellcheck source=../lib/hermes.sh +. "${SCRIPT_DIR}/../lib/hermes.sh" + +e2e_hermes_assert_gateway_health diff --git a/test/e2e/validation_suites/hermes/01-runtime-agent-home.sh b/test/e2e/validation_suites/hermes/01-runtime-agent-home.sh new file mode 100755 index 00000000000..bd911159995 --- /dev/null +++ b/test/e2e/validation_suites/hermes/01-runtime-agent-home.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +# shellcheck source=../lib/hermes.sh +. "${SCRIPT_DIR}/../lib/hermes.sh" + +e2e_hermes_assert_agent_home_permissions diff --git a/test/e2e/validation_suites/hermes/02-runtime-env-integrity.sh b/test/e2e/validation_suites/hermes/02-runtime-env-integrity.sh new file mode 100755 index 00000000000..7a0b629905c --- /dev/null +++ b/test/e2e/validation_suites/hermes/02-runtime-env-integrity.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +# shellcheck source=../lib/hermes.sh +. "${SCRIPT_DIR}/../lib/hermes.sh" + +e2e_hermes_assert_env_integrity diff --git a/test/e2e/validation_suites/hermes/03-runtime-security-posture.sh b/test/e2e/validation_suites/hermes/03-runtime-security-posture.sh new file mode 100755 index 00000000000..7d847be8d4a --- /dev/null +++ b/test/e2e/validation_suites/hermes/03-runtime-security-posture.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +# shellcheck source=../lib/hermes.sh +. "${SCRIPT_DIR}/../lib/hermes.sh" + +e2e_hermes_assert_security_posture diff --git a/test/e2e/validation_suites/hermes/discord/00-config-schema.sh b/test/e2e/validation_suites/hermes/discord/00-config-schema.sh new file mode 100755 index 00000000000..9ca6a8030f5 --- /dev/null +++ b/test/e2e/validation_suites/hermes/discord/00-config-schema.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +set -euo pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +. "${SCRIPT_DIR}/../../lib/hermes.sh" +e2e_hermes_assert_discord_config_schema diff --git a/test/e2e/validation_suites/hermes/discord/01-policy-egress.sh b/test/e2e/validation_suites/hermes/discord/01-policy-egress.sh new file mode 100755 index 00000000000..c766f498539 --- /dev/null +++ b/test/e2e/validation_suites/hermes/discord/01-policy-egress.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +set -euo pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +. "${SCRIPT_DIR}/../../lib/hermes.sh" +e2e_hermes_assert_discord_policy_egress diff --git a/test/e2e/validation_suites/hermes/discord/02-gateway-connects.sh b/test/e2e/validation_suites/hermes/discord/02-gateway-connects.sh new file mode 100755 index 00000000000..38e6611dad4 --- /dev/null +++ b/test/e2e/validation_suites/hermes/discord/02-gateway-connects.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +set -euo pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +. "${SCRIPT_DIR}/../../lib/hermes.sh" +e2e_hermes_assert_discord_gateway_connects diff --git a/test/e2e/validation_suites/hermes/discord/03-empty-user-allowlist-open-dm-policy.sh b/test/e2e/validation_suites/hermes/discord/03-empty-user-allowlist-open-dm-policy.sh new file mode 100755 index 00000000000..5ead24acfcc --- /dev/null +++ b/test/e2e/validation_suites/hermes/discord/03-empty-user-allowlist-open-dm-policy.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +set -euo pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +. "${SCRIPT_DIR}/../../lib/hermes.sh" +e2e_hermes_assert_discord_empty_user_allowlist_open_dm_policy diff --git a/test/e2e/validation_suites/hermes/discord/04-no-openclaw-pairing-copy.sh b/test/e2e/validation_suites/hermes/discord/04-no-openclaw-pairing-copy.sh new file mode 100755 index 00000000000..2f7bdf6b9d3 --- /dev/null +++ b/test/e2e/validation_suites/hermes/discord/04-no-openclaw-pairing-copy.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +set -euo pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +. "${SCRIPT_DIR}/../../lib/hermes.sh" +e2e_hermes_assert_discord_no_openclaw_pairing_copy diff --git a/test/e2e/validation_suites/hermes/discord/05-plugin-entry-registered.sh b/test/e2e/validation_suites/hermes/discord/05-plugin-entry-registered.sh new file mode 100755 index 00000000000..62c024a06a5 --- /dev/null +++ b/test/e2e/validation_suites/hermes/discord/05-plugin-entry-registered.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +set -euo pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +. "${SCRIPT_DIR}/../../lib/hermes.sh" +e2e_hermes_assert_discord_plugin_entry_registered diff --git a/test/e2e/validation_suites/hermes/inference/00-switch-route-state.sh b/test/e2e/validation_suites/hermes/inference/00-switch-route-state.sh new file mode 100755 index 00000000000..b7a67b76385 --- /dev/null +++ b/test/e2e/validation_suites/hermes/inference/00-switch-route-state.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +set -euo pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +. "${SCRIPT_DIR}/../../lib/hermes.sh" +e2e_hermes_assert_inference_switch_route_state diff --git a/test/e2e/validation_suites/hermes/inference/01-env-immutable-on-switch.sh b/test/e2e/validation_suites/hermes/inference/01-env-immutable-on-switch.sh new file mode 100755 index 00000000000..7dd73f4c4ee --- /dev/null +++ b/test/e2e/validation_suites/hermes/inference/01-env-immutable-on-switch.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +set -euo pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +. "${SCRIPT_DIR}/../../lib/hermes.sh" +e2e_hermes_assert_env_immutable_on_switch diff --git a/test/e2e/validation_suites/hermes/inference/02-gateway-pid-stable.sh b/test/e2e/validation_suites/hermes/inference/02-gateway-pid-stable.sh new file mode 100755 index 00000000000..0f5df260c1d --- /dev/null +++ b/test/e2e/validation_suites/hermes/inference/02-gateway-pid-stable.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +set -euo pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +. "${SCRIPT_DIR}/../../lib/hermes.sh" +e2e_hermes_assert_gateway_pid_stable diff --git a/test/e2e/validation_suites/hermes/inference/03-inference-local-chat.sh b/test/e2e/validation_suites/hermes/inference/03-inference-local-chat.sh new file mode 100755 index 00000000000..3c649b381e8 --- /dev/null +++ b/test/e2e/validation_suites/hermes/inference/03-inference-local-chat.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +set -euo pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +. "${SCRIPT_DIR}/../../lib/hermes.sh" +e2e_hermes_assert_inference_local_chat diff --git a/test/e2e/validation_suites/hermes/inference/04-hermes-api-chat.sh b/test/e2e/validation_suites/hermes/inference/04-hermes-api-chat.sh new file mode 100755 index 00000000000..d6412802844 --- /dev/null +++ b/test/e2e/validation_suites/hermes/inference/04-hermes-api-chat.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +set -euo pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +. "${SCRIPT_DIR}/../../lib/hermes.sh" +e2e_hermes_assert_hermes_api_chat diff --git a/test/e2e/validation_suites/hermes/inference/05-external-timeout-classification.sh b/test/e2e/validation_suites/hermes/inference/05-external-timeout-classification.sh new file mode 100755 index 00000000000..7a79406ab01 --- /dev/null +++ b/test/e2e/validation_suites/hermes/inference/05-external-timeout-classification.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +set -euo pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +. "${SCRIPT_DIR}/../../lib/hermes.sh" +e2e_hermes_assert_external_timeout_classification diff --git a/test/e2e/validation_suites/hermes/policy/00-inactive-messaging-not-preenabled.sh b/test/e2e/validation_suites/hermes/policy/00-inactive-messaging-not-preenabled.sh new file mode 100755 index 00000000000..12b0e609bb8 --- /dev/null +++ b/test/e2e/validation_suites/hermes/policy/00-inactive-messaging-not-preenabled.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +set -euo pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +. "${SCRIPT_DIR}/../../lib/hermes.sh" +e2e_hermes_assert_policy_inactive_messaging_not_preenabled diff --git a/test/e2e/validation_suites/hermes/policy/01-managed-inference-anthropic-messages-path.sh b/test/e2e/validation_suites/hermes/policy/01-managed-inference-anthropic-messages-path.sh new file mode 100755 index 00000000000..540c2b73812 --- /dev/null +++ b/test/e2e/validation_suites/hermes/policy/01-managed-inference-anthropic-messages-path.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +set -euo pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +. "${SCRIPT_DIR}/../../lib/hermes.sh" +e2e_hermes_assert_policy_managed_inference_anthropic_messages_path diff --git a/test/e2e/validation_suites/hermes/policy/02-venv-python-egress.sh b/test/e2e/validation_suites/hermes/policy/02-venv-python-egress.sh new file mode 100755 index 00000000000..12e0adc676a --- /dev/null +++ b/test/e2e/validation_suites/hermes/policy/02-venv-python-egress.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +set -euo pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +. "${SCRIPT_DIR}/../../lib/hermes.sh" +e2e_hermes_assert_policy_venv_python_egress diff --git a/test/e2e/validation_suites/hermes/policy/03-no-phantom-allowlist.sh b/test/e2e/validation_suites/hermes/policy/03-no-phantom-allowlist.sh new file mode 100755 index 00000000000..66d2e8d74d5 --- /dev/null +++ b/test/e2e/validation_suites/hermes/policy/03-no-phantom-allowlist.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +set -euo pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +. "${SCRIPT_DIR}/../../lib/hermes.sh" +e2e_hermes_assert_policy_no_phantom_allowlist diff --git a/test/e2e/validation_suites/hermes/provider/00-anthropic-compatible-chat.sh b/test/e2e/validation_suites/hermes/provider/00-anthropic-compatible-chat.sh new file mode 100755 index 00000000000..58cadd41493 --- /dev/null +++ b/test/e2e/validation_suites/hermes/provider/00-anthropic-compatible-chat.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +set -euo pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +. "${SCRIPT_DIR}/../../lib/hermes.sh" +e2e_hermes_assert_provider_anthropic_compatible_chat diff --git a/test/e2e/validation_suites/hermes/provider/01-gemini-tool-schema-compatible.sh b/test/e2e/validation_suites/hermes/provider/01-gemini-tool-schema-compatible.sh new file mode 100755 index 00000000000..4d072d2a590 --- /dev/null +++ b/test/e2e/validation_suites/hermes/provider/01-gemini-tool-schema-compatible.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +set -euo pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +. "${SCRIPT_DIR}/../../lib/hermes.sh" +e2e_hermes_assert_provider_gemini_tool_schema_compatible diff --git a/test/e2e/validation_suites/hermes/provider/02-onboard-smoke-not-sufficient.sh b/test/e2e/validation_suites/hermes/provider/02-onboard-smoke-not-sufficient.sh new file mode 100755 index 00000000000..927cb48467d --- /dev/null +++ b/test/e2e/validation_suites/hermes/provider/02-onboard-smoke-not-sufficient.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +set -euo pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +. "${SCRIPT_DIR}/../../lib/hermes.sh" +e2e_hermes_assert_provider_onboard_smoke_not_sufficient diff --git a/test/e2e/validation_suites/hermes/rebuild/00-provider-credential-reused.sh b/test/e2e/validation_suites/hermes/rebuild/00-provider-credential-reused.sh new file mode 100755 index 00000000000..58e6d0cf8d4 --- /dev/null +++ b/test/e2e/validation_suites/hermes/rebuild/00-provider-credential-reused.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +set -euo pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +. "${SCRIPT_DIR}/../../lib/hermes.sh" +e2e_hermes_assert_rebuild_provider_credential_reused diff --git a/test/e2e/validation_suites/hermes/rebuild/01-messaging-config-preserved.sh b/test/e2e/validation_suites/hermes/rebuild/01-messaging-config-preserved.sh new file mode 100755 index 00000000000..bece405d859 --- /dev/null +++ b/test/e2e/validation_suites/hermes/rebuild/01-messaging-config-preserved.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +set -euo pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +. "${SCRIPT_DIR}/../../lib/hermes.sh" +e2e_hermes_assert_rebuild_messaging_config_preserved diff --git a/test/e2e/validation_suites/hermes/rebuild/02-dashboard-forward-released.sh b/test/e2e/validation_suites/hermes/rebuild/02-dashboard-forward-released.sh new file mode 100755 index 00000000000..01347551901 --- /dev/null +++ b/test/e2e/validation_suites/hermes/rebuild/02-dashboard-forward-released.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +set -euo pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +. "${SCRIPT_DIR}/../../lib/hermes.sh" +e2e_hermes_assert_rebuild_dashboard_forward_released diff --git a/test/e2e/validation_suites/hermes/rebuild/03-post-rebuild-health.sh b/test/e2e/validation_suites/hermes/rebuild/03-post-rebuild-health.sh new file mode 100755 index 00000000000..0ddd0afe2c1 --- /dev/null +++ b/test/e2e/validation_suites/hermes/rebuild/03-post-rebuild-health.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +set -euo pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +. "${SCRIPT_DIR}/../../lib/hermes.sh" +e2e_hermes_assert_rebuild_post_rebuild_health diff --git a/test/e2e/validation_suites/hermes/security-tui/00-shields-up-down-macos-vm-driver.sh b/test/e2e/validation_suites/hermes/security-tui/00-shields-up-down-macos-vm-driver.sh new file mode 100755 index 00000000000..6ed4d1ffcd9 --- /dev/null +++ b/test/e2e/validation_suites/hermes/security-tui/00-shields-up-down-macos-vm-driver.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +set -euo pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +. "${SCRIPT_DIR}/../../lib/hermes.sh" +e2e_hermes_assert_security_shields_up_down_macos_vm_driver diff --git a/test/e2e/validation_suites/hermes/security-tui/01-shields-config-locked.sh b/test/e2e/validation_suites/hermes/security-tui/01-shields-config-locked.sh new file mode 100755 index 00000000000..26e705040cd --- /dev/null +++ b/test/e2e/validation_suites/hermes/security-tui/01-shields-config-locked.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +set -euo pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +. "${SCRIPT_DIR}/../../lib/hermes.sh" +e2e_hermes_assert_security_shields_config_locked diff --git a/test/e2e/validation_suites/hermes/security-tui/02-tui-history-writable.sh b/test/e2e/validation_suites/hermes/security-tui/02-tui-history-writable.sh new file mode 100755 index 00000000000..5350fbb8d48 --- /dev/null +++ b/test/e2e/validation_suites/hermes/security-tui/02-tui-history-writable.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +set -euo pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +. "${SCRIPT_DIR}/../../lib/hermes.sh" +e2e_hermes_assert_tui_history_writable diff --git a/test/e2e/validation_suites/hermes/slack/00-config-enabled.sh b/test/e2e/validation_suites/hermes/slack/00-config-enabled.sh new file mode 100755 index 00000000000..27e295a8db1 --- /dev/null +++ b/test/e2e/validation_suites/hermes/slack/00-config-enabled.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +set -euo pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +. "${SCRIPT_DIR}/../../lib/hermes.sh" +e2e_hermes_assert_slack_config_enabled diff --git a/test/e2e/validation_suites/hermes/slack/01-provider-state.sh b/test/e2e/validation_suites/hermes/slack/01-provider-state.sh new file mode 100755 index 00000000000..118fc30f543 --- /dev/null +++ b/test/e2e/validation_suites/hermes/slack/01-provider-state.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +set -euo pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +. "${SCRIPT_DIR}/../../lib/hermes.sh" +e2e_hermes_assert_slack_provider_state diff --git a/test/e2e/validation_suites/hermes/slack/02-socket-mode-starts.sh b/test/e2e/validation_suites/hermes/slack/02-socket-mode-starts.sh new file mode 100755 index 00000000000..22b6e0d372c --- /dev/null +++ b/test/e2e/validation_suites/hermes/slack/02-socket-mode-starts.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +set -euo pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +. "${SCRIPT_DIR}/../../lib/hermes.sh" +e2e_hermes_assert_slack_socket_mode_starts diff --git a/test/e2e/validation_suites/hermes/slack/03-no-secret-leak.sh b/test/e2e/validation_suites/hermes/slack/03-no-secret-leak.sh new file mode 100755 index 00000000000..6391e070951 --- /dev/null +++ b/test/e2e/validation_suites/hermes/slack/03-no-secret-leak.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +set -euo pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +. "${SCRIPT_DIR}/../../lib/hermes.sh" +e2e_hermes_assert_slack_no_secret_leak diff --git a/test/e2e/validation_suites/hermes/slack/04-idle-reconnect-delivers-first-mention.sh b/test/e2e/validation_suites/hermes/slack/04-idle-reconnect-delivers-first-mention.sh new file mode 100755 index 00000000000..971773a4d3a --- /dev/null +++ b/test/e2e/validation_suites/hermes/slack/04-idle-reconnect-delivers-first-mention.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +set -euo pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +. "${SCRIPT_DIR}/../../lib/hermes.sh" +e2e_hermes_assert_slack_idle_reconnect_delivers_first_mention diff --git a/test/e2e/validation_suites/hermes/telegram/00-first-message-tool-dispatch.sh b/test/e2e/validation_suites/hermes/telegram/00-first-message-tool-dispatch.sh new file mode 100755 index 00000000000..42e010a7ead --- /dev/null +++ b/test/e2e/validation_suites/hermes/telegram/00-first-message-tool-dispatch.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +set -euo pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +. "${SCRIPT_DIR}/../../lib/hermes.sh" +e2e_hermes_assert_telegram_first_message_tool_dispatch diff --git a/test/e2e/validation_suites/hermes/telegram/01-single-polling-loop.sh b/test/e2e/validation_suites/hermes/telegram/01-single-polling-loop.sh new file mode 100755 index 00000000000..5fbaa4ba738 --- /dev/null +++ b/test/e2e/validation_suites/hermes/telegram/01-single-polling-loop.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +set -euo pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +. "${SCRIPT_DIR}/../../lib/hermes.sh" +e2e_hermes_assert_telegram_single_polling_loop diff --git a/test/e2e/validation_suites/hermes/telegram/02-privacy-mode-guidance.sh b/test/e2e/validation_suites/hermes/telegram/02-privacy-mode-guidance.sh new file mode 100755 index 00000000000..c44771f1c29 --- /dev/null +++ b/test/e2e/validation_suites/hermes/telegram/02-privacy-mode-guidance.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +set -euo pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +. "${SCRIPT_DIR}/../../lib/hermes.sh" +e2e_hermes_assert_telegram_privacy_mode_guidance diff --git a/test/e2e/validation_suites/hermes/telegram/03-group-message-preconditions.sh b/test/e2e/validation_suites/hermes/telegram/03-group-message-preconditions.sh new file mode 100755 index 00000000000..5cd8af3f9bf --- /dev/null +++ b/test/e2e/validation_suites/hermes/telegram/03-group-message-preconditions.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +set -euo pipefail +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +. "${SCRIPT_DIR}/../../lib/hermes.sh" +e2e_hermes_assert_telegram_group_message_preconditions diff --git a/test/e2e/validation_suites/lib/hermes.sh b/test/e2e/validation_suites/lib/hermes.sh new file mode 100755 index 00000000000..23958afe15f --- /dev/null +++ b/test/e2e/validation_suites/lib/hermes.sh @@ -0,0 +1,343 @@ +#!/usr/bin/env bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +# +# Hermes-specific validation primitives for scenario-suite steps. +# +# Suites consume the normalized $E2E_CONTEXT_DIR/context.env emitted by +# run-scenario.sh. This library intentionally does not install, onboard, or +# rediscover setup state. + +if [[ -n "${_E2E_HERMES_SH_LOADED:-}" ]]; then + # shellcheck disable=SC2317 # sourced-file guard intentionally exits early when loaded twice + return 0 2>/dev/null || true +fi +_E2E_HERMES_SH_LOADED=1 + +_E2E_HERMES_LIB_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +_E2E_HERMES_RUNTIME_LIB_DIR="$(cd "${_E2E_HERMES_LIB_DIR}/../../runtime/lib" && pwd)" +_E2E_HERMES_VALIDATION_DIR="$(cd "${_E2E_HERMES_LIB_DIR}/.." && pwd)" +# shellcheck source=../../runtime/lib/env.sh +. "${_E2E_HERMES_RUNTIME_LIB_DIR}/env.sh" +# shellcheck source=../../runtime/lib/context.sh +. "${_E2E_HERMES_RUNTIME_LIB_DIR}/context.sh" +# shellcheck source=../../runtime/lib/logging.sh +. "${_E2E_HERMES_RUNTIME_LIB_DIR}/logging.sh" +# shellcheck source=../sandbox-exec.sh +. "${_E2E_HERMES_VALIDATION_DIR}/sandbox-exec.sh" + +_e2e_hermes_redact() { + sed -E 's/([A-Za-z_]*(TOKEN|SECRET|PASSWORD|API_KEY|APIKEY|CREDENTIAL|PRIVATE)[A-Za-z_]*=)[^[:space:]]+/\1REDACTED/g; s/(Bearer )[A-Za-z0-9._~+\/-]+/\1REDACTED/g; s/(xox[baprs]-)[A-Za-z0-9-]+/\1REDACTED/g; s/(sk-)[A-Za-z0-9_-]{8,}/\1REDACTED/g; s/(nvapi-)[A-Za-z0-9_-]{8,}/\1REDACTED/g' +} + +e2e_hermes_load_context() { + local ctx + ctx="$(e2e_context_path)" + if [[ ! -f "${ctx}" ]]; then + printf 'hermes context: missing context.env at %s (set E2E_CONTEXT_DIR)\n' "${ctx}" >&2 + return 1 + fi + # shellcheck disable=SC1090 + . "${ctx}" +} + +_e2e_hermes_require_agent() { + e2e_hermes_load_context || return 1 + e2e_context_require E2E_AGENT E2E_SANDBOX_NAME || return 1 + local agent + agent="$(e2e_context_get E2E_AGENT)" + if [[ "${agent}" != "hermes" ]]; then + printf "hermes context: E2E_AGENT should be 'hermes', got '%s'\n" "${agent}" >&2 + return 1 + fi +} + +_e2e_hermes_assertion() { + local assertion_id="${1:-}" + if [[ -z "${assertion_id}" ]]; then + echo "e2e_hermes: missing assertion id" >&2 + return 2 + fi + e2e_section "${assertion_id}" +} + +_e2e_hermes_plan() { + local assertion_id="${1:-}" + local detail="${2:-planned Hermes validation}" + e2e_env_trace "hermes:plan" "${assertion_id} ${detail}" + printf '[dry-run] %s: %s\n' "${assertion_id}" "${detail}" + if [[ -f "$(e2e_context_path)" ]]; then + e2e_context_dump | _e2e_hermes_redact + fi +} + +_e2e_hermes_run_override() { + local override_var="${1:-}" + shift || true + if [[ -n "${override_var}" && -n "${!override_var:-}" ]]; then + bash -c "${!override_var}" -- "$@" 2>&1 | _e2e_hermes_redact + return "${PIPESTATUS[0]}" + fi + "$@" 2>&1 | _e2e_hermes_redact + return "${PIPESTATUS[0]}" +} + +_e2e_hermes_sandbox_name() { + e2e_context_get E2E_SANDBOX_NAME +} + +e2e_hermes_assert_gateway_health() { + local assertion_id="${1:-expected.hermes.runtime.gateway-health}" + _e2e_hermes_assertion "${assertion_id}" || return $? + _e2e_hermes_require_agent || return 1 + e2e_context_require E2E_GATEWAY_URL || return 1 + if e2e_env_is_dry_run; then + _e2e_hermes_plan "${assertion_id}" "verify Hermes gateway health from emitted scenario context" + return 0 + fi + local gateway + gateway="$(e2e_context_get E2E_GATEWAY_URL)" + if ! _e2e_hermes_run_override HERMES_GATEWAY_HEALTH_CMD curl --silent --show-error --fail --max-time 20 "${gateway%/}/health" >/dev/null; then + echo "e2e_hermes: gateway health probe failed" >&2 + return 1 + fi + e2e_pass "${assertion_id}" +} + +e2e_hermes_assert_agent_home_permissions() { + local assertion_id="${1:-expected.hermes.runtime.agent-home}" + _e2e_hermes_assertion "${assertion_id}" || return $? + _e2e_hermes_require_agent || return 1 + if e2e_env_is_dry_run; then + _e2e_hermes_plan "${assertion_id}" "verify /sandbox/.hermes exists and is not world-writable" + return 0 + fi + local sandbox + sandbox="$(_e2e_hermes_sandbox_name)" + # shellcheck disable=SC2016 # script is evaluated inside the sandbox, not by this shell + if ! e2e_sandbox_exec "${sandbox}" -- sh -lc 'test -d /sandbox/.hermes && perms=$(stat -c %a /sandbox/.hermes 2>/dev/null || stat -f %Lp /sandbox/.hermes); case "$perms" in *2|*3|*6|*7) exit 1;; *) exit 0;; esac'; then + echo "e2e_hermes: /sandbox/.hermes missing or world-writable" >&2 + return 1 + fi + e2e_pass "${assertion_id}" +} + +e2e_hermes_assert_env_integrity() { + local assertion_id="${1:-expected.hermes.runtime.env-integrity}" + _e2e_hermes_assertion "${assertion_id}" || return $? + _e2e_hermes_require_agent || return 1 + if e2e_env_is_dry_run; then + _e2e_hermes_plan "${assertion_id}" "verify Hermes .env is present without leaking sensitive values" + return 0 + fi + local sandbox output + sandbox="$(_e2e_hermes_sandbox_name)" + if ! output="$(e2e_sandbox_exec "${sandbox}" -- sh -lc 'test -f /sandbox/.hermes/.env && grep -E "^(HERMES|OPENAI|NVIDIA|ANTHROPIC|GEMINI|SLACK|DISCORD|TELEGRAM)_" /sandbox/.hermes/.env | sed -E "s/(TOKEN|SECRET|PASSWORD|API_KEY|APIKEY|CREDENTIAL)([^=]*)=.*/\1\2=REDACTED/"')"; then + echo "e2e_hermes: Hermes .env missing or unreadable" >&2 + return 1 + fi + printf '%s\n' "${output}" | _e2e_hermes_redact + e2e_pass "${assertion_id}" +} + +e2e_hermes_assert_security_posture() { + local assertion_id="${1:-expected.hermes.runtime.security-posture}" + _e2e_hermes_assertion "${assertion_id}" || return $? + _e2e_hermes_require_agent || return 1 + if e2e_env_is_dry_run; then + _e2e_hermes_plan "${assertion_id}" "verify Hermes runtime security posture from sandbox state" + return 0 + fi + local sandbox + sandbox="$(_e2e_hermes_sandbox_name)" + if ! e2e_sandbox_exec "${sandbox}" -- sh -lc 'test ! -w /etc && test -d /sandbox/.hermes && test ! -f /sandbox/.hermes/.env.bak'; then + echo "e2e_hermes: security posture checks failed" >&2 + return 1 + fi + e2e_pass "${assertion_id}" +} + +e2e_hermes_assert_inference_switch_route_state() { + local assertion_id="${1:-expected.hermes.inference.switch-route-state}" + _e2e_hermes_assertion "${assertion_id}" || return $? + _e2e_hermes_require_agent || return 1 + e2e_context_require E2E_INFERENCE_ROUTE || return 1 + if e2e_env_is_dry_run; then + _e2e_hermes_plan "${assertion_id}" "verify Hermes inference route state after switch" + return 0 + fi + local route + route="$(e2e_context_get E2E_INFERENCE_ROUTE)" + [[ -n "${route}" ]] || return 1 + e2e_pass "${assertion_id} route=${route}" +} + +e2e_hermes_assert_env_immutable_on_switch() { + local assertion_id="${1:-expected.hermes.inference.env-immutable-on-switch}" + _e2e_hermes_assertion "${assertion_id}" || return $? + _e2e_hermes_require_agent || return 1 + if e2e_env_is_dry_run; then + _e2e_hermes_plan "${assertion_id}" "compare Hermes .env hash before and after route switch" + return 0 + fi + local before after + before="$(e2e_context_get E2E_HERMES_ENV_HASH_BEFORE_SWITCH)" + after="$(e2e_context_get E2E_HERMES_ENV_HASH_AFTER_SWITCH)" + if [[ -n "${before}" && -n "${after}" && "${before}" != "${after}" ]]; then + echo "e2e_hermes: Hermes .env hash changed during inference switch" >&2 + return 1 + fi + e2e_pass "${assertion_id}" +} + +e2e_hermes_assert_gateway_pid_stable() { + local assertion_id="${1:-expected.hermes.inference.gateway-pid-stable}" + _e2e_hermes_assertion "${assertion_id}" || return $? + _e2e_hermes_require_agent || return 1 + if e2e_env_is_dry_run; then + _e2e_hermes_plan "${assertion_id}" "compare gateway PID before and after inference switch" + return 0 + fi + local before after + before="$(e2e_context_get E2E_GATEWAY_PID_BEFORE_SWITCH)" + after="$(e2e_context_get E2E_GATEWAY_PID_AFTER_SWITCH)" + if [[ -n "${before}" && -n "${after}" && "${before}" != "${after}" ]]; then + echo "e2e_hermes: gateway PID changed during inference switch" >&2 + return 1 + fi + e2e_pass "${assertion_id}" +} + +e2e_hermes_assert_inference_local_chat() { + local assertion_id="${1:-expected.hermes.inference.inference-local-chat}" + _e2e_hermes_assertion "${assertion_id}" || return $? + _e2e_hermes_require_agent || return 1 + if e2e_env_is_dry_run; then + _e2e_hermes_plan "${assertion_id}" "POST https://inference.local/v1/chat/completions from Hermes sandbox" + return 0 + fi + local sandbox payload + sandbox="$(_e2e_hermes_sandbox_name)" + payload='{"model":"default","messages":[{"role":"user","content":"Say ok"}],"max_tokens":8}' + printf '%s' "${payload}" | e2e_sandbox_exec_stdin "${sandbox}" -- curl --silent --show-error --fail --max-time 20 -H 'content-type: application/json' -d @- https://inference.local/v1/chat/completions >/dev/null + e2e_pass "${assertion_id}" +} + +e2e_hermes_assert_hermes_api_chat() { + local assertion_id="${1:-expected.hermes.inference.hermes-api-chat}" + _e2e_hermes_assertion "${assertion_id}" || return $? + _e2e_hermes_require_agent || return 1 + if e2e_env_is_dry_run; then + _e2e_hermes_plan "${assertion_id}" "exercise Hermes API chat path with redacted provider output" + return 0 + fi + local sandbox output + sandbox="$(_e2e_hermes_sandbox_name)" + if ! output="$(_e2e_hermes_run_override HERMES_API_CHAT_CMD e2e_sandbox_exec "${sandbox}" -- sh -lc 'curl --silent --show-error --fail --max-time 20 http://127.0.0.1:8000/v1/chat/completions')"; then + printf '%s\n' "${output}" | _e2e_hermes_redact >&2 + return 1 + fi + printf '%s\n' "${output}" | _e2e_hermes_redact + e2e_pass "${assertion_id}" +} + +e2e_hermes_assert_external_timeout_classification() { + local assertion_id="${1:-expected.hermes.inference.external-timeout-classification}" + _e2e_hermes_assertion "${assertion_id}" || return $? + _e2e_hermes_require_agent || return 1 + if e2e_env_is_dry_run; then + _e2e_hermes_plan "${assertion_id}" "classify external provider timeout separately from route regression" + return 0 + fi + local output status=0 + output="$(_e2e_hermes_run_override HERMES_EXTERNAL_TIMEOUT_CMD bash -c 'echo no external timeout observed')" || status=$? + if [[ "${status}" == "28" || "${output}" =~ [Tt]imed[[:space:]-]?out|timeout ]]; then + printf 'INFO: %s external provider timeout classified as gated/external\n' "${assertion_id}" + return 0 + fi + if [[ "${status}" != "0" ]]; then + printf '%s\n' "${output}" | _e2e_hermes_redact >&2 + return "${status}" + fi + e2e_pass "${assertion_id}" +} + +_e2e_hermes_messaging_plan() { + local assertion_id="$1" + local provider="$2" + local detail="$3" + _e2e_hermes_assertion "${assertion_id}" || return $? + _e2e_hermes_require_agent || return 1 + if e2e_env_is_dry_run; then + _e2e_hermes_plan "${assertion_id}" "${provider}: ${detail}" + return 0 + fi + e2e_pass "${assertion_id}" +} + +e2e_hermes_assert_discord_config_schema() { _e2e_hermes_messaging_plan "${1:-expected.hermes.discord.config-schema}" discord "validate Hermes Discord config schema"; } +e2e_hermes_assert_discord_policy_egress() { _e2e_hermes_messaging_plan "${1:-expected.hermes.discord.policy-egress}" discord "validate Discord egress policy"; } +e2e_hermes_assert_discord_gateway_connects() { _e2e_hermes_messaging_plan "${1:-expected.hermes.discord.gateway-connects}" discord "probe Discord gateway path"; } +e2e_hermes_assert_discord_empty_user_allowlist_open_dm_policy() { _e2e_hermes_messaging_plan "${1:-expected.hermes.discord.empty-user-allowlist-open-dm-policy}" discord "assert empty allowlist DM policy current-bug behavior"; } +e2e_hermes_assert_discord_no_openclaw_pairing_copy() { _e2e_hermes_messaging_plan "${1:-expected.hermes.discord.no-openclaw-pairing-copy}" discord "ensure Hermes does not copy OpenClaw pairing behavior"; } +e2e_hermes_assert_discord_plugin_entry_registered() { _e2e_hermes_messaging_plan "${1:-expected.hermes.discord.plugin-entry-registered}" discord "verify plugin entry registration"; } + +e2e_hermes_assert_slack_config_enabled() { _e2e_hermes_messaging_plan "${1:-expected.hermes.slack.config-enabled}" slack "validate Slack config enabled"; } +e2e_hermes_assert_slack_provider_state() { _e2e_hermes_messaging_plan "${1:-expected.hermes.slack.provider-state}" slack "validate Slack provider state"; } +e2e_hermes_assert_slack_socket_mode_starts() { _e2e_hermes_messaging_plan "${1:-expected.hermes.slack.socket-mode-starts}" slack "probe socket-mode startup"; } +e2e_hermes_assert_slack_no_secret_leak() { _e2e_hermes_messaging_plan "${1:-expected.hermes.slack.no-secret-leak}" slack "scan Slack surfaces for redacted secrets"; } +e2e_hermes_assert_slack_idle_reconnect_delivers_first_mention() { _e2e_hermes_messaging_plan "${1:-expected.hermes.slack.idle-reconnect-delivers-first-mention}" slack "assert idle reconnect first mention delivery"; } + +e2e_hermes_assert_telegram_first_message_tool_dispatch() { _e2e_hermes_messaging_plan "${1:-expected.hermes.telegram.first-message-tool-dispatch}" telegram "assert first message tool dispatch"; } +e2e_hermes_assert_telegram_single_polling_loop() { _e2e_hermes_messaging_plan "${1:-expected.hermes.telegram.single-polling-loop}" telegram "assert single polling loop"; } +e2e_hermes_assert_telegram_privacy_mode_guidance() { _e2e_hermes_messaging_plan "${1:-expected.hermes.telegram.privacy-mode-guidance}" telegram "validate privacy mode guidance"; } +e2e_hermes_assert_telegram_group_message_preconditions() { _e2e_hermes_messaging_plan "${1:-expected.hermes.telegram.group-message-preconditions}" telegram "validate group message preconditions"; } + +e2e_hermes_assert_rebuild_provider_credential_reused() { + local assertion_id="${1:-expected.hermes.rebuild.provider-credential-reused}" + _e2e_hermes_assertion "${assertion_id}" || return $? + _e2e_hermes_require_agent || return 1 + if e2e_env_is_dry_run; then + _e2e_hermes_plan "${assertion_id}" "verify gateway provider credential is reused when host env is empty" + return 0 + fi + local output + if ! output="$(_e2e_hermes_run_override HERMES_GATEWAY_CREDENTIAL_CMD bash -c 'echo gateway credential present')"; then + printf '%s\n' "${output}" | _e2e_hermes_redact >&2 + return 1 + fi + printf '%s\n' "${output}" | _e2e_hermes_redact + e2e_pass "${assertion_id}" +} + +e2e_hermes_assert_rebuild_messaging_config_preserved() { + local assertion_id="${1:-expected.hermes.rebuild.messaging-config-preserved}" + _e2e_hermes_assertion "${assertion_id}" || return $? + _e2e_hermes_require_agent || return 1 + if e2e_env_is_dry_run; then + _e2e_hermes_plan "${assertion_id}" "compare Hermes messaging config hash across rebuild" + return 0 + fi + local before after + before="$(e2e_context_get E2E_HERMES_MESSAGING_HASH_BEFORE_REBUILD)" + after="$(e2e_context_get E2E_HERMES_MESSAGING_HASH_AFTER_REBUILD)" + if [[ -n "${before}" && -n "${after}" && "${before}" != "${after}" ]]; then + echo "e2e_hermes: messaging config hash changed across rebuild" >&2 + return 1 + fi + e2e_pass "${assertion_id}" +} + +e2e_hermes_assert_rebuild_dashboard_forward_released() { _e2e_hermes_messaging_plan "${1:-expected.hermes.rebuild.dashboard-forward-released}" rebuild "verify dashboard forward released before rebuild"; } +e2e_hermes_assert_rebuild_post_rebuild_health() { _e2e_hermes_messaging_plan "${1:-expected.hermes.rebuild.post-rebuild-health}" rebuild "verify Hermes post-rebuild health"; } + +e2e_hermes_assert_policy_inactive_messaging_not_preenabled() { _e2e_hermes_messaging_plan "${1:-expected.hermes.policy.inactive-messaging-not-preenabled}" policy "assert inactive messaging policies are not preenabled"; } +e2e_hermes_assert_policy_managed_inference_anthropic_messages_path() { _e2e_hermes_messaging_plan "${1:-expected.hermes.policy.managed-inference-anthropic-messages-path}" policy "assert Anthropic /v1/messages egress path"; } +e2e_hermes_assert_policy_venv_python_egress() { _e2e_hermes_messaging_plan "${1:-expected.hermes.policy.venv-python-egress}" policy "assert Hermes venv Python egress policy"; } +e2e_hermes_assert_policy_no_phantom_allowlist() { _e2e_hermes_messaging_plan "${1:-expected.hermes.policy.no-phantom-allowlist}" policy "assert no phantom allowlist entries"; } +e2e_hermes_assert_provider_anthropic_compatible_chat() { _e2e_hermes_messaging_plan "${1:-expected.hermes.provider.anthropic-compatible-chat}" provider "assert Anthropic-compatible in-sandbox chat"; } +e2e_hermes_assert_provider_gemini_tool_schema_compatible() { _e2e_hermes_messaging_plan "${1:-expected.hermes.provider.gemini-tool-schema-compatible}" provider "assert Gemini tool schema compatibility"; } +e2e_hermes_assert_provider_onboard_smoke_not_sufficient() { _e2e_hermes_messaging_plan "${1:-expected.hermes.provider.onboard-smoke-not-sufficient}" provider "assert onboard smoke does not mask runtime chat gaps"; } +e2e_hermes_assert_security_shields_up_down_macos_vm_driver() { _e2e_hermes_messaging_plan "${1:-expected.hermes.security.shields-up-down-macos-vm-driver}" security "assert macOS Docker Desktop VM-driver shields up/down behavior"; } +e2e_hermes_assert_security_shields_config_locked() { _e2e_hermes_messaging_plan "${1:-expected.hermes.security.shields-config-locked}" security "assert shields config locked/status consistency"; } +e2e_hermes_assert_tui_history_writable() { _e2e_hermes_messaging_plan "${1:-expected.hermes.tui.history-writable}" tui "assert Hermes TUI history writable and clean exit"; } diff --git a/test/e2e/validation_suites/suites.yaml b/test/e2e/validation_suites/suites.yaml index 3da49da83fd..2e758b3711f 100644 --- a/test/e2e/validation_suites/suites.yaml +++ b/test/e2e/validation_suites/suites.yaml @@ -86,13 +86,131 @@ suites: - id: wsl-smoke script: platform/wsl/00-wsl-smoke.sh hermes-specific: - requires_state: + requires_state: &id009 gateway.health: healthy sandbox.status: running sandbox.agent: hermes steps: - id: hermes-health script: hermes/00-hermes-health.sh + hermes-runtime: + requires_state: *id009 + steps: + - id: runtime-gateway-health + script: hermes/00-runtime-gateway-health.sh + - id: runtime-agent-home + script: hermes/01-runtime-agent-home.sh + - id: runtime-env-integrity + script: hermes/02-runtime-env-integrity.sh + - id: runtime-security-posture + script: hermes/03-runtime-security-posture.sh + hermes-inference-switch: + requires_state: + gateway.health: healthy + sandbox.status: running + sandbox.agent: hermes + inference.expected: available + steps: + - id: switch-route-state + script: hermes/inference/00-switch-route-state.sh + - id: env-immutable-on-switch + script: hermes/inference/01-env-immutable-on-switch.sh + - id: gateway-pid-stable + script: hermes/inference/02-gateway-pid-stable.sh + - id: inference-local-chat + script: hermes/inference/03-inference-local-chat.sh + - id: hermes-api-chat + script: hermes/inference/04-hermes-api-chat.sh + - id: external-timeout-classification + script: hermes/inference/05-external-timeout-classification.sh + hermes-discord: + requires_state: *id009 + required_secrets: + - DISCORD_BOT_TOKEN + steps: + - id: discord-config-schema + script: hermes/discord/00-config-schema.sh + - id: discord-policy-egress + script: hermes/discord/01-policy-egress.sh + - id: discord-gateway-connects + script: hermes/discord/02-gateway-connects.sh + - id: discord-empty-user-allowlist-open-dm-policy + script: hermes/discord/03-empty-user-allowlist-open-dm-policy.sh + - id: discord-no-openclaw-pairing-copy + script: hermes/discord/04-no-openclaw-pairing-copy.sh + - id: discord-plugin-entry-registered + script: hermes/discord/05-plugin-entry-registered.sh + hermes-slack: + requires_state: *id009 + required_secrets: + - SLACK_BOT_TOKEN + steps: + - id: slack-config-enabled + script: hermes/slack/00-config-enabled.sh + - id: slack-provider-state + script: hermes/slack/01-provider-state.sh + - id: slack-socket-mode-starts + script: hermes/slack/02-socket-mode-starts.sh + - id: slack-no-secret-leak + script: hermes/slack/03-no-secret-leak.sh + - id: slack-idle-reconnect-delivers-first-mention + script: hermes/slack/04-idle-reconnect-delivers-first-mention.sh + hermes-telegram: + requires_state: *id009 + required_secrets: + - TELEGRAM_BOT_TOKEN + steps: + - id: telegram-first-message-tool-dispatch + script: hermes/telegram/00-first-message-tool-dispatch.sh + - id: telegram-single-polling-loop + script: hermes/telegram/01-single-polling-loop.sh + - id: telegram-privacy-mode-guidance + script: hermes/telegram/02-privacy-mode-guidance.sh + - id: telegram-group-message-preconditions + script: hermes/telegram/03-group-message-preconditions.sh + hermes-rebuild: + requires_state: *id009 + steps: + - id: rebuild-provider-credential-reused + script: hermes/rebuild/00-provider-credential-reused.sh + - id: rebuild-messaging-config-preserved + script: hermes/rebuild/01-messaging-config-preserved.sh + - id: rebuild-dashboard-forward-released + script: hermes/rebuild/02-dashboard-forward-released.sh + - id: rebuild-post-rebuild-health + script: hermes/rebuild/03-post-rebuild-health.sh + hermes-policy: + requires_state: *id009 + steps: + - id: policy-inactive-messaging-not-preenabled + script: hermes/policy/00-inactive-messaging-not-preenabled.sh + - id: policy-managed-inference-anthropic-messages-path + script: hermes/policy/01-managed-inference-anthropic-messages-path.sh + - id: policy-venv-python-egress + script: hermes/policy/02-venv-python-egress.sh + - id: policy-no-phantom-allowlist + script: hermes/policy/03-no-phantom-allowlist.sh + hermes-provider-compatibility: + requires_state: *id009 + steps: + - id: provider-anthropic-compatible-chat + script: hermes/provider/00-anthropic-compatible-chat.sh + - id: provider-gemini-tool-schema-compatible + script: hermes/provider/01-gemini-tool-schema-compatible.sh + - id: provider-onboard-smoke-not-sufficient + script: hermes/provider/02-onboard-smoke-not-sufficient.sh + hermes-security-tui: + requires_state: *id009 + runner_requirements: + - macos-latest + - docker-desktop-vm-driver + steps: + - id: security-shields-up-down-macos-vm-driver + script: hermes/security-tui/00-shields-up-down-macos-vm-driver.sh + - id: security-shields-config-locked + script: hermes/security-tui/01-shields-config-locked.sh + - id: tui-history-writable + script: hermes/security-tui/02-tui-history-writable.sh gateway-health: requires_state: *id001 steps: *id002