diff --git a/test/e2e/live/concurrent-gateway-ports.test.ts b/test/e2e/live/concurrent-gateway-ports.test.ts index bc2db09f4ae..5d5fd3f5770 100644 --- a/test/e2e/live/concurrent-gateway-ports.test.ts +++ b/test/e2e/live/concurrent-gateway-ports.test.ts @@ -329,8 +329,12 @@ test("concurrent gateway ports: onboards two sandboxes on isolated gateways and const gatewayA = gatewayNameForPort(GATEWAY_PORT_A); const gatewayB = gatewayNameForPort(GATEWAY_PORT_B); + // OpenShell reaches this fixture from its gateway network namespace, where + // the runner's loopback address is not routable. const fake = await startFakeOpenAiCompatibleServer({ + host: "0.0.0.0", port: Number(process.env.NEMOCLAW_E2E_FAKE_PORT ?? 0), + publicHost: "host.openshell.internal", }); await artifacts.target.declare({ id: "concurrent-gateway-ports", diff --git a/test/e2e/live/double-onboard.test.ts b/test/e2e/live/double-onboard.test.ts index c0b7a6021c5..572c4781d4b 100644 --- a/test/e2e/live/double-onboard.test.ts +++ b/test/e2e/live/double-onboard.test.ts @@ -458,8 +458,12 @@ test("double-onboard: reuses gateway, preserves sibling sandbox, and recovers st "prereq-nemoclaw", ); + // OpenShell reaches this fixture from its gateway network namespace, where + // the runner's loopback address is not routable. const fake = await startFakeOpenAiCompatibleServer({ + host: "0.0.0.0", port: Number(process.env.NEMOCLAW_FAKE_PORT ?? 0), + publicHost: "host.openshell.internal", }); await artifacts.writeJson("fake-openai.json", { baseUrl: fake.baseUrl }); cleanup.trackDisposable("close fake OpenAI-compatible endpoint", async () => { diff --git a/test/e2e/live/hermes-e2e.test.ts b/test/e2e/live/hermes-e2e.test.ts index b36d24b18d7..2c2123eb929 100644 --- a/test/e2e/live/hermes-e2e.test.ts +++ b/test/e2e/live/hermes-e2e.test.ts @@ -380,7 +380,7 @@ test("hermes-e2e: install.sh onboards Hermes and proves health plus live inferen if (hermesDashboardE2eEnabled()) { expect(resultText(install)).toContain( - "Deployment verified — gateway and dashboard are healthy.", + "Deployment verified — gateway, dashboard, and inference route are healthy.", ); expect(resultText(install)).toContain("Hermes Agent Dashboard"); expect(resultText(install)).toContain(`http://127.0.0.1:${HERMES_DASHBOARD_PORT}/`); diff --git a/test/e2e/live/hermes-inference-switch-helpers.ts b/test/e2e/live/hermes-inference-switch-helpers.ts index d0e45a86ee3..d81efbecec1 100644 --- a/test/e2e/live/hermes-inference-switch-helpers.ts +++ b/test/e2e/live/hermes-inference-switch-helpers.ts @@ -84,16 +84,16 @@ export function mockAnthropicSwitchEnabled(runtimeEnv: NodeJS.ProcessEnv = proce ); } -export function expectAuthenticatedBaselineRequest( +export function expectAuthenticatedBaselineInventoryRequest( baseline: Pick | undefined, - model: string, ): void { if (!baseline) return; expect(baseline.requests()).toContainEqual( expect.objectContaining({ auth: "ok", - model, - path: "/v1/chat/completions", + authorizationSent: true, + method: "GET", + path: "/v1/models", }), ); } diff --git a/test/e2e/live/hermes-inference-switch.test.ts b/test/e2e/live/hermes-inference-switch.test.ts index c97dc2fe840..156d9c640c0 100644 --- a/test/e2e/live/hermes-inference-switch.test.ts +++ b/test/e2e/live/hermes-inference-switch.test.ts @@ -16,7 +16,7 @@ import { ensureCompatibleAnthropicSwitchProvider, env, envHash, - expectAuthenticatedBaselineRequest, + expectAuthenticatedBaselineInventoryRequest, expectedApiMode, expectedBaseUrl, hashCheck, @@ -165,7 +165,7 @@ test("Hermes inference set updates route/config and preserves live runtime", { const install = await installHermes(host, apiKey, installEnv); expect(install.exitCode, resultText(install)).toBe(0); - expectAuthenticatedBaselineRequest(mockBaseline, MOCK_BASELINE_MODEL); + expectAuthenticatedBaselineInventoryRequest(mockBaseline); const baselineRoute = await sandbox.openshell(["inference", "get", "-g", "nemoclaw"], { artifactName: "openshell-inference-route-before-switch", env: env(), diff --git a/test/e2e/support/hermes-inference-switch-command-shape.test.ts b/test/e2e/support/hermes-inference-switch-command-shape.test.ts index 92ad6b5098d..a878ca1f08b 100644 --- a/test/e2e/support/hermes-inference-switch-command-shape.test.ts +++ b/test/e2e/support/hermes-inference-switch-command-shape.test.ts @@ -15,6 +15,7 @@ import { apiKeyShapeCommand, cleanupHermesSwitch, compatibleAnthropicMetadataArgs, + expectAuthenticatedBaselineInventoryRequest, hostedInstallModel, inferenceLocalMaxTokens, installHermes, @@ -114,6 +115,36 @@ describe("Hermes inference switch command shape", () => { ).toBe("http://host.openshell.internal:18766"); }); + it("uses authenticated model inventory as baseline readiness evidence", () => { + expect(() => + expectAuthenticatedBaselineInventoryRequest({ + requests: () => [ + { + auth: "ok", + authorizationSent: true, + bodyBytes: 0, + method: "GET", + path: "/v1/models", + }, + ], + }), + ).not.toThrow(); + + expect(() => + expectAuthenticatedBaselineInventoryRequest({ + requests: () => [ + { + auth: "ok", + authorizationSent: true, + bodyBytes: 0, + method: "POST", + path: "/v1/models", + }, + ], + }), + ).toThrow(); + }); + it("enables local baseline inference only for the mock Anthropic lane", () => { const mockAnthropic = { NEMOCLAW_SWITCH_PROVIDER: "compatible-anthropic-endpoint",