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
1 change: 1 addition & 0 deletions .github/workflows/e2e-vitest-scenarios.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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 });
}
});
});
10 changes: 10 additions & 0 deletions tools/e2e-scenarios/workflow-boundary.mts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -7757,6 +7766,7 @@ export function validateE2eVitestScenariosWorkflowBoundary(
"openclaw-tui-chat-correlation",
);
validateFreeStandingJobSelector(errors, jobs, "gateway-guard-recovery");
validateGatewayGuardRecoveryVitestJob(errors, jobs);
validateFreeStandingJobSelector(
errors,
jobs,
Expand Down
Loading