Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions test/e2e/live/concurrent-gateway-ports.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 4 additions & 0 deletions test/e2e/live/double-onboard.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/live/hermes-e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}/`);
Expand Down
8 changes: 4 additions & 4 deletions test/e2e/live/hermes-inference-switch-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,16 @@ export function mockAnthropicSwitchEnabled(runtimeEnv: NodeJS.ProcessEnv = proce
);
}

export function expectAuthenticatedBaselineRequest(
export function expectAuthenticatedBaselineInventoryRequest(
baseline: Pick<FakeOpenAiCompatibleServer, "requests"> | 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",
}),
);
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/live/hermes-inference-switch.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
ensureCompatibleAnthropicSwitchProvider,
env,
envHash,
expectAuthenticatedBaselineRequest,
expectAuthenticatedBaselineInventoryRequest,
expectedApiMode,
expectedBaseUrl,
hashCheck,
Expand Down Expand Up @@ -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(),
Expand Down
31 changes: 31 additions & 0 deletions test/e2e/support/hermes-inference-switch-command-shape.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
apiKeyShapeCommand,
cleanupHermesSwitch,
compatibleAnthropicMetadataArgs,
expectAuthenticatedBaselineInventoryRequest,
hostedInstallModel,
inferenceLocalMaxTokens,
installHermes,
Expand Down Expand Up @@ -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",
Expand Down
Loading