Skip to content

fix(e2e): route gateway guard through hosted inference - #5889

Merged
cv merged 2 commits into
mainfrom
fix/gateway-guard-hosted-inference-v2
Jun 27, 2026
Merged

cv merged 2 commits into
mainfrom
fix/gateway-guard-hosted-inference-v2

Conversation

@cv

@cv cv commented Jun 27, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Routes the free-standing gateway-guard-recovery Vitest E2E job through hosted-compatible inference. The targeted rerun after #5887 showed the job still selected the public NVIDIA provider and failed early because the CI secret is not nvapi-*.

Changes

  • Adds NEMOCLAW_E2E_USE_HOSTED_INFERENCE=1 to the gateway-guard-recovery job environment in .github/workflows/e2e-vitest-scenarios.yaml.
  • Extends the workflow boundary validator so this routing cannot drift again.

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with doc updates
  • Doc only (prose changes, no code sample modifications)
  • Doc only (includes code sample changes)

Quality Gates

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior — justification:
  • Tests not applicable — justification:
  • Docs updated for user-facing behavior changes
  • Docs not applicable — justification: CI/E2E workflow routing only.
  • Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging)
  • Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: self-review; change passes only the CI mode flag, not credentials, and keeps the secret on the existing step-level boundary.
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

Verification

  • PR description includes the DCO sign-off declaration and every commit appears as Verified in GitHub
  • Git hooks passed during commit and push, or npx prek run --from-ref main --to-ref HEAD passes
  • Targeted tests pass for changed behavior
  • Full npm test passes (broad runtime changes only)
  • Quality Gates section completed with required justifications or waivers
  • No secrets, API keys, or credentials committed
  • npm run docs builds without warnings (doc changes only)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Targeted verification:

npm test -- --run test/e2e-scenario/support-tests/e2e-scenarios-workflow.test.ts
npm run source-shape:check
npm run test-size:check
npm run build:cli
npm run typecheck:cli

Signed-off-by: Carlos Villela cvillela@nvidia.com

Summary by CodeRabbit

  • Bug Fixes
    • Improved end-to-end workflow consistency for the gateway guard recovery scenario by ensuring the hosted inference setting is enabled.
    • Added workflow boundary validation to detect and report misconfigured scenario runs earlier.

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cv cv self-assigned this Jun 27, 2026
@coderabbitai

coderabbitai Bot commented Jun 27, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: b8bede61-9a66-415b-87f5-7c9a8d6726aa

📥 Commits

Reviewing files that changed from the base of the PR and between 512495a and 059ba0c.

📒 Files selected for processing (1)
  • test/e2e-scenario/support-tests/gateway-guard-workflow-boundary.test.ts

📝 Walkthrough

Walkthrough

The gateway-guard-recovery Vitest job now sets NEMOCLAW_E2E_USE_HOSTED_INFERENCE=1. The workflow boundary validator now checks that job for the same setting and reports an error when it is missing or different.

Changes

Gateway guard recovery hosted inference

Layer / File(s) Summary
Workflow job env update
.github/workflows/e2e-vitest-scenarios.yaml
gateway-guard-recovery sets NEMOCLAW_E2E_USE_HOSTED_INFERENCE to "1".
Boundary validation
tools/e2e-scenarios/workflow-boundary.mts, test/e2e-scenario/support-tests/gateway-guard-workflow-boundary.test.ts
Adds validateGatewayGuardRecoveryVitestJob, calls it from validateE2eVitestScenariosWorkflowBoundary, and adds a test that removes the env var and asserts the validation failure.

Estimated review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • NVIDIA/NemoClaw#5600: Also updates tools/e2e-scenarios/workflow-boundary.mts to enforce hosted-inference-related workflow constraints.
  • NVIDIA/NemoClaw#5698: Uses the same NEMOCLAW_E2E_USE_HOSTED_INFERENCE environment variable for a hosted inference workflow path.
  • NVIDIA/NemoClaw#5776: Enforces the same hosted-inference env setting in a related Vitest workflow lane.

Suggested labels

area: ci, area: e2e, bug-fix, area: inference

Suggested reviewers

  • jyaunches

Poem

🐇 I nibbled the YAML in the moonlit glow,
then hopped to the boundary check below.
One tiny flag made the guardrail bright,
and the test suite twinkled in hosted light.
✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately reflects the main CI/E2E routing change to hosted inference.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/gateway-guard-hosted-inference-v2

Comment @coderabbitai help to get the list of available commands.

@github-code-quality

github-code-quality Bot commented Jun 27, 2026 •

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in the fix/gateway-guard-ho... branch is 96%. Coverage data for the main branch is not yet available.

Show a code coverage summary of the most covered files.
File main fix/gateway-guard-ho... 059ba0c +/-
nemoclaw/src/se...cret-scanner.ts — 100% —
nemoclaw/src/commands/slash.ts — 100% —
nemoclaw/src/li...bprocess-env.ts — 100% —
nemoclaw/src/bl...eprint/state.ts — 98% —
nemoclaw/src/onboard/config.ts — 98% —
nemoclaw/src/bl...int/snapshot.ts — 97% —
nemoclaw/src/bl...print/runner.ts — 95% —
nemoclaw/src/co...ration-state.ts — 94% —
nemoclaw/src/bl...ate-networks.ts — 94% —
nemoclaw/src/index.ts — 94% —

TypeScript / code-coverage/cli

The overall coverage in the fix/gateway-guard-ho... branch is 47%. Coverage data for the main branch is not yet available.

Show a code coverage summary of the most covered files.
File main fix/gateway-guard-ho... 059ba0c +/-
src/lib/state/o...oard-session.ts — 91% —
src/lib/sandbox/config.ts — 76% —
src/lib/actions...dbox/rebuild.ts — 73% —
src/lib/onboard/preflight.ts — 62% —
src/lib/shields/index.ts — 62% —
src/lib/actions...licy-channel.ts — 60% —
src/lib/state/sandbox.ts — 56% —
src/lib/policy/index.ts — 48% —
src/lib/onboard...er-gpu-patch.ts — 47% —
src/lib/onboard.ts — 19% —

Updated June 27, 2026 02:20 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@github-actions

github-actions Bot commented Jun 27, 2026 •

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: gateway-guard-recovery
Optional E2E: None

Dispatch hint: gateway-guard-recovery

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E

  • gateway-guard-recovery (high): This PR directly changes the live gateway-guard-recovery workflow job environment. Run the same free-standing recovery scenario to verify the job still provisions, onboards, uses hosted-compatible inference, and validates gateway guard recovery successfully.

Optional E2E

  • None.

New E2E recommendations

  • None.

Dispatch hint

  • Workflow: .github/workflows/e2e-vitest-scenarios.yaml
  • jobs input: gateway-guard-recovery

@github-actions

github-actions Bot commented Jun 27, 2026 •

Copy link
Copy Markdown
Contributor

Vitest E2E Scenario Recommendation

Required Vitest E2E scenarios: gateway-guard-recovery
Optional Vitest E2E scenarios: None

Dispatch required Vitest E2E scenarios:

  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=gateway-guard-recovery

Workflow run

Full Vitest E2E advisor summary

Vitest E2E Scenario Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required Vitest E2E scenarios

  • gateway-guard-recovery: The PR changes the discrete free-standing Vitest workflow job for gateway-guard-recovery by adding hosted-compatible inference mode, and adds/updates workflow-boundary validation for that job. The free-standing job dispatch is the preferred selector for changes to a specific live Vitest job.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=gateway-guard-recovery

Optional Vitest E2E scenarios

  • None.

Relevant changed files

  • .github/workflows/e2e-vitest-scenarios.yaml
  • test/e2e-scenario/support-tests/gateway-guard-workflow-boundary.test.ts
  • tools/e2e-scenarios/workflow-boundary.mts

@github-actions

github-actions Bot commented Jun 27, 2026 •

Copy link
Copy Markdown
Contributor

PR Review Advisor — No blocking findings

Merge posture: No blocking advisor findings
Primary next action: Add or justify PRA-T1 and any related test follow-ups.
Open items: 0 required · 0 warnings · 0 suggestions · 2 test follow-ups
Since last review: 2 prior items resolved · 0 still apply · 0 new items found

Action checklist

  • PRA-T1 Add or justify test follow-up: Runtime validation
  • PRA-T2 Add or justify test follow-up: Acceptance clause
Test follow-ups to resolve or justify

If these cover changed behavior, prefer adding them in this PR; otherwise state why existing coverage is enough or link the follow-up.

  • PRA-T1 Runtime validation — Add or identify targeted runtime/integration validation that dispatches or runs the `gateway-guard-recovery` live scenario with `NEMOCLAW_E2E_USE_HOSTED_INFERENCE=1` and confirms the E2E fixture selects hosted-compatible inference without exposing `NVIDIA_INFERENCE_API_KEY` beyond the existing step env boundary.. Static and support-test coverage is sufficient for the workflow-boundary validator change. Because the behavior also affects a live sandbox/inference E2E job, targeted runtime validation remains useful for infrastructure confidence, but external job status is outside this advisory review.
  • PRA-T2 Acceptance clause — Targeted tests pass for changed behavior — add test evidence or identify existing coverage. A targeted support test for the changed validator behavior is present in the diff, but this advisory review did not execute tests or evaluate external CI status.

Workflow run details

This is an automated, non-binding review; it still expects maintainers and agents to respond to each required or warning item. Treat suggestions as current-PR improvements when they touch changed code; defer only with maintainer rationale or a linked follow-up. A human maintainer must make the final merge decision.

@github-actions

github-actions Bot commented Jun 27, 2026 •

Copy link
Copy Markdown
Contributor

PR Review Advisor (Nemotron Ultra) — Changes requested

Merge posture: Do not merge yet
Primary next action: Add or justify PRA-T1 and any related test follow-ups.
Open items: 0 required · 0 warnings · 3 suggestions · 1 test follow-up
Since last review: 1 prior item resolved · 2 still apply · 0 new items found

Action checklist

  • PRA-T1 Add or justify test follow-up: Test follow-up: explicit defaults validation (conditional on PRA-2 fix)
  • PRA-1 In-scope improvement: Validation only checks hosted inference flag, not auto-configured defaults in tools/e2e-scenarios/workflow-boundary.mts:487
  • PRA-2 In-scope improvement: Workflow inconsistency: gateway-guard-recovery sets only flag, not explicit hosted inference vars in .github/workflows/e2e-vitest-scenarios.yaml:4340
  • PRA-3 In-scope improvement: Test follow-up: explicit defaults validation (conditional on PRA-2 fix) in test/e2e-scenario/support-tests/gateway-guard-workflow-boundary.test.ts

Findings index

ID Severity Category Location Required action
PRA-1 Improvement correctness tools/e2e-scenarios/workflow-boundary.mts:487 Add explicit checks for the auto-configured defaults to match validateChannelsAddRemoveVitestJob pattern. Import and validate against HOSTED_INFERENCE_ENDPOINT_URL and HOSTED_INFERENCE_MODEL constants from providers.ts. This is a local, in-scope improvement.
PRA-2 Improvement workflow .github/workflows/e2e-vitest-scenarios.yaml:4340 Add the explicit hosted inference config vars to gateway-guard-recovery job for consistency with openclaw-tui-chat-correlation-vitest and to make the workflow self-documenting. This is a local, in-scope improvement.
PRA-3 Improvement tests test/e2e-scenario/support-tests/gateway-guard-workflow-boundary.test.ts Only add if PRA-2 is addressed in this PR. Otherwise defer with linked follow-up.
Review findings by urgency: 0 required fixes, 0 items to resolve/justify, 3 in-scope improvements

⚠️ Resolve or justify before merge

Investigate these in the current review; either fix them, explain why they are not applicable, or document the accepted risk.

  • None.

💡 In-scope improvements

These are lower-risk, not throwaway. Prefer fixing them in this PR when they are local to changed code; defer only with rationale or a linked follow-up.

PRA-1 Improvement — Validation only checks hosted inference flag, not auto-configured defaults

  • Location: tools/e2e-scenarios/workflow-boundary.mts:487
  • Category: correctness
  • Problem: validateGatewayGuardRecoveryVitestJob verifies NEMOCLAW_E2E_USE_HOSTED_INFERENCE=1 but does not validate the auto-configured defaults that providers.ts applies when the flag is set: NEMOCLAW_PROVIDER=custom, NEMOCLAW_ENDPOINT_URL=https://inference-api.nvidia.com/v1, NEMOCLAW_MODEL=nvidia/nvidia/nemotron-3-ultra, NEMOCLAW_COMPAT_MODEL=nvidia/nvidia/nemotron-3-ultra, NEMOCLAW_PREFERRED_API=openai-completions. Peer validation validateChannelsAddRemoveVitestJob (lines 5790-5810) checks all five explicitly.
  • Impact: If providers.ts defaults ever change, gateway-guard-recovery could silently use different inference config than intended. Defense-in-depth is weaker than peer validations.
  • Suggested action: Add explicit checks for the auto-configured defaults to match validateChannelsAddRemoveVitestJob pattern. Import and validate against HOSTED_INFERENCE_ENDPOINT_URL and HOSTED_INFERENCE_MODEL constants from providers.ts. This is a local, in-scope improvement.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Read tools/e2e-scenarios/workflow-boundary.mts:487-495 and compare with validateChannelsAddRemoveVitestJob at lines 5790-5810. Check src/lib/onboard/providers.ts:255-285 for auto-configuration logic.
  • Missing regression test: If explicit validation is added, a test that sets NEMOCLAW_E2E_USE_HOSTED_INFERENCE=1 but overrides one default (e.g., NEMOCLAW_MODEL=wrong-model) and expects a validation error.
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: validateGatewayGuardRecoveryVitestJob only checks jobEnv.NEMOCLAW_E2E_USE_HOSTED_INFERENCE !== "1". validateChannelsAddRemoveVitestJob checks PROVIDER, ENDPOINT_URL, MODEL, COMPAT_MODEL, PREFERRED_API.

PRA-2 Improvement — Workflow inconsistency: gateway-guard-recovery sets only flag, not explicit hosted inference vars

  • Location: .github/workflows/e2e-vitest-scenarios.yaml:4340
  • Category: workflow
  • Problem: The gateway-guard-recovery job (line ~4340) sets NEMOCLAW_E2E_USE_HOSTED_INFERENCE=1 but does not set NEMOCLAW_PROVIDER, NEMOCLAW_ENDPOINT_URL, NEMOCLAW_MODEL, NEMOCLAW_COMPAT_MODEL, NEMOCLAW_PREFERRED_API that peer job openclaw-tui-chat-correlation-vitest (line ~4250) sets explicitly. Functionally correct due to providers.ts defaults, but reduces self-documentation and auditability.
  • Impact: Future maintainers may not realize the job uses hosted inference, or may accidentally remove the flag thinking explicit vars are required. Reduces readability and auditability of the workflow.
  • Suggested action: Add the explicit hosted inference config vars to gateway-guard-recovery job for consistency with openclaw-tui-chat-correlation-vitest and to make the workflow self-documenting. This is a local, in-scope improvement.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Compare the env block of gateway-guard-recovery (line ~4340) with openclaw-tui-chat-correlation-vitest (line ~4250) in .github/workflows/e2e-vitest-scenarios.yaml.
  • Missing regression test: None needed — this is a consistency/readability suggestion. Functional behavior is identical due to providers.ts defaults.
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: gateway-guard-recovery env has 7 vars; openclaw-tui-chat-correlation-vitest env has 12 vars including all hosted inference config.

PRA-3 Improvement — Test follow-up: explicit defaults validation (conditional on PRA-2 fix)

  • Location: test/e2e-scenario/support-tests/gateway-guard-workflow-boundary.test.ts
  • Category: tests
  • Problem: If validation is extended to check auto-configured defaults (PRA-2), a test case is needed that sets the hosted inference flag but overrides one default (e.g., NEMOCLAW_MODEL=wrong-model) and asserts the validation error is raised.
  • Impact: Ensures defense-in-depth validation is exercised and prevents regression of the explicit checks.
  • Suggested action: Only add if PRA-2 is addressed in this PR. Otherwise defer with linked follow-up.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Follow the pattern in tunnel-lifecycle-workflow-boundary.test.ts lines 40-70: read workflow YAML, mutate job env, call validateE2eVitestScenariosWorkflowBoundary, assert specific error.
  • Missing regression test: A test that sets NEMOCLAW_E2E_USE_HOSTED_INFERENCE=1 and NEMOCLAW_MODEL=wrong-model, then expects validation error for MODEL mismatch.
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: Current test only validates missing flag case. No test exists for explicit defaults because validation doesn't check them yet.
Test follow-ups to resolve or justify

If these cover changed behavior, prefer adding them in this PR; otherwise state why existing coverage is enough or link the follow-up.

  • PRA-T1 Test follow-up: explicit defaults validation (conditional on PRA-2 fix) — Only add if PRA-2 is addressed in this PR. Otherwise defer with linked follow-up.
Since last review details

Current findings, using the urgency labels above:

PRA-1 Improvement — Validation only checks hosted inference flag, not auto-configured defaults

  • Location: tools/e2e-scenarios/workflow-boundary.mts:487
  • Category: correctness
  • Problem: validateGatewayGuardRecoveryVitestJob verifies NEMOCLAW_E2E_USE_HOSTED_INFERENCE=1 but does not validate the auto-configured defaults that providers.ts applies when the flag is set: NEMOCLAW_PROVIDER=custom, NEMOCLAW_ENDPOINT_URL=https://inference-api.nvidia.com/v1, NEMOCLAW_MODEL=nvidia/nvidia/nemotron-3-ultra, NEMOCLAW_COMPAT_MODEL=nvidia/nvidia/nemotron-3-ultra, NEMOCLAW_PREFERRED_API=openai-completions. Peer validation validateChannelsAddRemoveVitestJob (lines 5790-5810) checks all five explicitly.
  • Impact: If providers.ts defaults ever change, gateway-guard-recovery could silently use different inference config than intended. Defense-in-depth is weaker than peer validations.
  • Suggested action: Add explicit checks for the auto-configured defaults to match validateChannelsAddRemoveVitestJob pattern. Import and validate against HOSTED_INFERENCE_ENDPOINT_URL and HOSTED_INFERENCE_MODEL constants from providers.ts. This is a local, in-scope improvement.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Read tools/e2e-scenarios/workflow-boundary.mts:487-495 and compare with validateChannelsAddRemoveVitestJob at lines 5790-5810. Check src/lib/onboard/providers.ts:255-285 for auto-configuration logic.
  • Missing regression test: If explicit validation is added, a test that sets NEMOCLAW_E2E_USE_HOSTED_INFERENCE=1 but overrides one default (e.g., NEMOCLAW_MODEL=wrong-model) and expects a validation error.
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: validateGatewayGuardRecoveryVitestJob only checks jobEnv.NEMOCLAW_E2E_USE_HOSTED_INFERENCE !== "1". validateChannelsAddRemoveVitestJob checks PROVIDER, ENDPOINT_URL, MODEL, COMPAT_MODEL, PREFERRED_API.

PRA-2 Improvement — Workflow inconsistency: gateway-guard-recovery sets only flag, not explicit hosted inference vars

  • Location: .github/workflows/e2e-vitest-scenarios.yaml:4340
  • Category: workflow
  • Problem: The gateway-guard-recovery job (line ~4340) sets NEMOCLAW_E2E_USE_HOSTED_INFERENCE=1 but does not set NEMOCLAW_PROVIDER, NEMOCLAW_ENDPOINT_URL, NEMOCLAW_MODEL, NEMOCLAW_COMPAT_MODEL, NEMOCLAW_PREFERRED_API that peer job openclaw-tui-chat-correlation-vitest (line ~4250) sets explicitly. Functionally correct due to providers.ts defaults, but reduces self-documentation and auditability.
  • Impact: Future maintainers may not realize the job uses hosted inference, or may accidentally remove the flag thinking explicit vars are required. Reduces readability and auditability of the workflow.
  • Suggested action: Add the explicit hosted inference config vars to gateway-guard-recovery job for consistency with openclaw-tui-chat-correlation-vitest and to make the workflow self-documenting. This is a local, in-scope improvement.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Compare the env block of gateway-guard-recovery (line ~4340) with openclaw-tui-chat-correlation-vitest (line ~4250) in .github/workflows/e2e-vitest-scenarios.yaml.
  • Missing regression test: None needed — this is a consistency/readability suggestion. Functional behavior is identical due to providers.ts defaults.
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: gateway-guard-recovery env has 7 vars; openclaw-tui-chat-correlation-vitest env has 12 vars including all hosted inference config.

PRA-3 Improvement — Test follow-up: explicit defaults validation (conditional on PRA-2 fix)

  • Location: test/e2e-scenario/support-tests/gateway-guard-workflow-boundary.test.ts
  • Category: tests
  • Problem: If validation is extended to check auto-configured defaults (PRA-2), a test case is needed that sets the hosted inference flag but overrides one default (e.g., NEMOCLAW_MODEL=wrong-model) and asserts the validation error is raised.
  • Impact: Ensures defense-in-depth validation is exercised and prevents regression of the explicit checks.
  • Suggested action: Only add if PRA-2 is addressed in this PR. Otherwise defer with linked follow-up.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Follow the pattern in tunnel-lifecycle-workflow-boundary.test.ts lines 40-70: read workflow YAML, mutate job env, call validateE2eVitestScenariosWorkflowBoundary, assert specific error.
  • Missing regression test: A test that sets NEMOCLAW_E2E_USE_HOSTED_INFERENCE=1 and NEMOCLAW_MODEL=wrong-model, then expects validation error for MODEL mismatch.
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: Current test only validates missing flag case. No test exists for explicit defaults because validation doesn't check them yet.

Workflow run details

This is an automated, non-binding review; it still expects maintainers and agents to respond to each required or warning item. Treat suggestions as current-PR improvements when they touch changed code; defer only with maintainer rationale or a linked follow-up. A human maintainer must make the final merge decision.

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cv
cv enabled auto-merge (squash) June 27, 2026 02:24
@cv
cv disabled auto-merge June 27, 2026 02:42
@cv
cv merged commit 5935b28 into main Jun 27, 2026
45 checks passed
@cv
cv deleted the fix/gateway-guard-hosted-inference-v2 branch June 27, 2026 02:42
cv added a commit that referenced this pull request Jun 27, 2026
<!-- markdownlint-disable MD041 -->
## Summary
Normalizes hosted-compatible inference routing for live Vitest jobs that
receive the repository `NVIDIA_INFERENCE_API_KEY` secret. The targeted
reruns after #5887/#5889 showed many live Vitest jobs still interpreted
the hosted-compatible secret as a public `nvapi-*` key and failed before
reaching their behavior under test.

## Changes
- Adds `NEMOCLAW_E2E_USE_HOSTED_INFERENCE=1` to live Vitest jobs that
pass `NVIDIA_INFERENCE_API_KEY` and are not public-NVIDIA-key-specific
lanes.
- Keeps public `nvapi-*` lanes
(`model-router-provider-routed-inference-vitest`,
`device-auth-health-vitest`) excluded from that requirement.
- Extends the workflow boundary validator so secret-bearing live Vitest
jobs must opt into hosted-compatible inference unless explicitly
allowlisted.

## Type of Change

- [x] Code change (feature, bug fix, or refactor)
- [ ] Code change with doc updates
- [ ] Doc only (prose changes, no code sample modifications)
- [ ] Doc only (includes code sample changes)

## Quality Gates
<!-- Check all that apply. For any "covered by existing tests", "not
applicable", or waiver entry, add a brief justification on the same line
or in the Changes section. -->
- [x] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [ ] Tests not applicable — justification:
- [ ] Docs updated for user-facing behavior changes
- [x] Docs not applicable — justification: CI/E2E workflow routing only.
- [x] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [x] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval link/justification: self-review; the change
passes only the hosted-compatible mode flag and does not broaden secret
exposure beyond existing step env boundaries.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Verification
<!-- Check each item you ran and confirmed. Leave unchecked items you
skipped. Doc-only changes do not require npm test unless you ran it. -->
- [x] PR description includes the DCO sign-off declaration and every
commit appears as `Verified` in GitHub
- [ ] Git hooks passed during commit and push, or `npx prek run
--from-ref main --to-ref HEAD` passes
- [x] Targeted tests pass for changed behavior
- [ ] Full `npm test` passes (broad runtime changes only)
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only)
- [ ] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

Targeted verification:

```bash
npm test -- --run test/e2e-scenario/support-tests/e2e-scenarios-workflow.test.ts
npm run source-shape:check
npm run test-size:check
npm run typecheck:cli
```

---
<!-- DCO sign-off is required in this PR description, and every commit
must appear as Verified in GitHub. Run: git config user.name && git
config user.email -->
Signed-off-by: Carlos Villela <cvillela@nvidia.com>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* End-to-end workflow jobs now consistently run with hosted inference
mode enabled.
* Added validation to ensure the main scenario job and related scenario
jobs use the required hosted-compatible inference setting.

* **Bug Fixes**
* Improved workflow checks to catch unsafe or unsupported inference
configurations earlier.

* **Tests**
* Expanded end-to-end boundary coverage to include the new hosted
inference requirement.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cv cv added the v0.0.69 label Jun 27, 2026
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
<!-- markdownlint-disable MD041 -->
## Summary
Routes the free-standing `gateway-guard-recovery` Vitest E2E job through
hosted-compatible inference. The targeted rerun after NVIDIA#5887 showed the
job still selected the public NVIDIA provider and failed early because
the CI secret is not `nvapi-*`.

## Changes
- Adds `NEMOCLAW_E2E_USE_HOSTED_INFERENCE=1` to the
`gateway-guard-recovery` job environment in
`.github/workflows/e2e-vitest-scenarios.yaml`.
- Extends the workflow boundary validator so this routing cannot drift
again.

## Type of Change

- [x] Code change (feature, bug fix, or refactor)
- [ ] Code change with doc updates
- [ ] Doc only (prose changes, no code sample modifications)
- [ ] Doc only (includes code sample changes)

## Quality Gates
<!-- Check all that apply. For any "covered by existing tests", "not
applicable", or waiver entry, add a brief justification on the same line
or in the Changes section. -->
- [x] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [ ] Tests not applicable — justification:
- [ ] Docs updated for user-facing behavior changes
- [x] Docs not applicable — justification: CI/E2E workflow routing only.
- [x] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [x] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval link/justification: self-review; change
passes only the CI mode flag, not credentials, and keeps the secret on
the existing step-level boundary.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Verification
<!-- Check each item you ran and confirmed. Leave unchecked items you
skipped. Doc-only changes do not require npm test unless you ran it. -->
- [x] PR description includes the DCO sign-off declaration and every
commit appears as `Verified` in GitHub
- [ ] Git hooks passed during commit and push, or `npx prek run
--from-ref main --to-ref HEAD` passes
- [x] Targeted tests pass for changed behavior
- [ ] Full `npm test` passes (broad runtime changes only)
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only)
- [ ] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

Targeted verification:

```bash
npm test -- --run test/e2e-scenario/support-tests/e2e-scenarios-workflow.test.ts
npm run source-shape:check
npm run test-size:check
npm run build:cli
npm run typecheck:cli
```

---
<!-- DCO sign-off is required in this PR description, and every commit
must appear as Verified in GitHub. Run: git config user.name && git
config user.email -->
Signed-off-by: Carlos Villela <cvillela@nvidia.com>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Improved end-to-end workflow consistency for the gateway guard
recovery scenario by ensuring the hosted inference setting is enabled.
* Added workflow boundary validation to detect and report misconfigured
scenario runs earlier.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
<!-- markdownlint-disable MD041 -->
## Summary
Normalizes hosted-compatible inference routing for live Vitest jobs that
receive the repository `NVIDIA_INFERENCE_API_KEY` secret. The targeted
reruns after NVIDIA#5887/NVIDIA#5889 showed many live Vitest jobs still interpreted
the hosted-compatible secret as a public `nvapi-*` key and failed before
reaching their behavior under test.

## Changes
- Adds `NEMOCLAW_E2E_USE_HOSTED_INFERENCE=1` to live Vitest jobs that
pass `NVIDIA_INFERENCE_API_KEY` and are not public-NVIDIA-key-specific
lanes.
- Keeps public `nvapi-*` lanes
(`model-router-provider-routed-inference-vitest`,
`device-auth-health-vitest`) excluded from that requirement.
- Extends the workflow boundary validator so secret-bearing live Vitest
jobs must opt into hosted-compatible inference unless explicitly
allowlisted.

## Type of Change

- [x] Code change (feature, bug fix, or refactor)
- [ ] Code change with doc updates
- [ ] Doc only (prose changes, no code sample modifications)
- [ ] Doc only (includes code sample changes)

## Quality Gates
<!-- Check all that apply. For any "covered by existing tests", "not
applicable", or waiver entry, add a brief justification on the same line
or in the Changes section. -->
- [x] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [ ] Tests not applicable — justification:
- [ ] Docs updated for user-facing behavior changes
- [x] Docs not applicable — justification: CI/E2E workflow routing only.
- [x] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [x] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval link/justification: self-review; the change
passes only the hosted-compatible mode flag and does not broaden secret
exposure beyond existing step env boundaries.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Verification
<!-- Check each item you ran and confirmed. Leave unchecked items you
skipped. Doc-only changes do not require npm test unless you ran it. -->
- [x] PR description includes the DCO sign-off declaration and every
commit appears as `Verified` in GitHub
- [ ] Git hooks passed during commit and push, or `npx prek run
--from-ref main --to-ref HEAD` passes
- [x] Targeted tests pass for changed behavior
- [ ] Full `npm test` passes (broad runtime changes only)
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only)
- [ ] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

Targeted verification:

```bash
npm test -- --run test/e2e-scenario/support-tests/e2e-scenarios-workflow.test.ts
npm run source-shape:check
npm run test-size:check
npm run typecheck:cli
```

---
<!-- DCO sign-off is required in this PR description, and every commit
must appear as Verified in GitHub. Run: git config user.name && git
config user.email -->
Signed-off-by: Carlos Villela <cvillela@nvidia.com>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* End-to-end workflow jobs now consistently run with hosted inference
mode enabled.
* Added validation to ensure the main scenario job and related scenario
jobs use the required hosted-compatible inference setting.

* **Bug Fixes**
* Improved workflow checks to catch unsafe or unsupported inference
configurations earlier.

* **Tests**
* Expanded end-to-end boundary coverage to include the new hosted
inference requirement.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions area: e2e End-to-end tests, nightly failures, or validation infrastructure bug-fix PR fixes a bug or regression labels Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci CI workflows, checks, release automation, or GitHub Actions area: e2e End-to-end tests, nightly failures, or validation infrastructure bug-fix PR fixes a bug or regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants