diff --git a/.github/workflows/e2e-vitest-scenarios.yaml b/.github/workflows/e2e-vitest-scenarios.yaml index 279c1fc9dbc..e454d18294c 100644 --- a/.github/workflows/e2e-vitest-scenarios.yaml +++ b/.github/workflows/e2e-vitest-scenarios.yaml @@ -4346,6 +4346,7 @@ jobs: E2E_ARTIFACT_DIR: ${{ github.workspace }}/e2e-artifacts/vitest/gateway-guard-recovery NEMOCLAW_CLI_BIN: ${{ github.workspace }}/bin/nemoclaw.js NEMOCLAW_RUN_E2E_SCENARIOS: "1" + NEMOCLAW_E2E_USE_HOSTED_INFERENCE: "1" NEMOCLAW_NON_INTERACTIVE: "1" NEMOCLAW_ACCEPT_THIRD_PARTY_SOFTWARE: "1" # nemoclaw onboard registers the gateway under the canonical name diff --git a/test/e2e-scenario/support-tests/gateway-guard-workflow-boundary.test.ts b/test/e2e-scenario/support-tests/gateway-guard-workflow-boundary.test.ts new file mode 100644 index 00000000000..fa674865ea5 --- /dev/null +++ b/test/e2e-scenario/support-tests/gateway-guard-workflow-boundary.test.ts @@ -0,0 +1,29 @@ +// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +// SPDX-License-Identifier: Apache-2.0 + +import fs from "node:fs"; +import os from "node:os"; +import path from "node:path"; +import { describe, expect, it } from "vitest"; +import YAML from "yaml"; + +import { validateE2eVitestScenariosWorkflowBoundary } from "../../../tools/e2e-scenarios/workflow-boundary.mts"; + +describe("gateway guard workflow boundary", () => { + it("rejects missing hosted-compatible inference mode", () => { + const workflow = YAML.parse( + fs.readFileSync(".github/workflows/e2e-vitest-scenarios.yaml", "utf8"), + ); + delete workflow.jobs["gateway-guard-recovery"].env.NEMOCLAW_E2E_USE_HOSTED_INFERENCE; + const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "e2e-gateway-guard-workflow-")); + const workflowPath = path.join(tmp, "workflow.yaml"); + try { + fs.writeFileSync(workflowPath, YAML.stringify(workflow)); + expect(validateE2eVitestScenariosWorkflowBoundary(workflowPath)).toContain( + "gateway-guard-recovery job must enable hosted-compatible inference mode", + ); + } finally { + fs.rmSync(tmp, { recursive: true, force: true }); + } + }); +}); diff --git a/tools/e2e-scenarios/workflow-boundary.mts b/tools/e2e-scenarios/workflow-boundary.mts index 08dfe55aeb2..11fda99a688 100644 --- a/tools/e2e-scenarios/workflow-boundary.mts +++ b/tools/e2e-scenarios/workflow-boundary.mts @@ -484,6 +484,15 @@ function validateFreeStandingJobSelector( } } +function validateGatewayGuardRecoveryVitestJob(errors: string[], jobs: WorkflowRecord): void { + const job = asRecord(jobs["gateway-guard-recovery"]); + if (Object.keys(job).length === 0) return; + const jobEnv = asRecord(job.env); + if (jobEnv.NEMOCLAW_E2E_USE_HOSTED_INFERENCE !== "1") { + errors.push("gateway-guard-recovery job must enable hosted-compatible inference mode"); + } +} + function validateFreeStandingInventoryBoundary( errors: string[], jobs: WorkflowRecord, @@ -7757,6 +7766,7 @@ export function validateE2eVitestScenariosWorkflowBoundary( "openclaw-tui-chat-correlation", ); validateFreeStandingJobSelector(errors, jobs, "gateway-guard-recovery"); + validateGatewayGuardRecoveryVitestJob(errors, jobs); validateFreeStandingJobSelector( errors, jobs,