Skip to content

ci(e2e): use canonical inference key in Vitest - #5688

Merged
jyaunches merged 5 commits into
mainfrom
fix/vitest-only-nvidia-inference-key
Jun 25, 2026
Merged

ci(e2e): use canonical inference key in Vitest#5688
jyaunches merged 5 commits into
mainfrom
fix/vitest-only-nvidia-inference-key

Conversation

@jyaunches

@jyaunches jyaunches commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Route Vitest E2E workflow secret wiring through NVIDIA_INFERENCE_API_KEY only.
  • Update Vitest live tests/helpers to require/stage NVIDIA_INFERENCE_API_KEY instead of NVIDIA_API_KEY.
  • Update workflow boundary guards so Vitest jobs no longer depend on secrets.NVIDIA_API_KEY.

Scope

Vitest-only: .github/workflows/e2e-vitest-scenarios.yaml, test/e2e-scenario/**, and tools/e2e-scenarios/workflow-boundary.mts.

Validation

  • npm test -- test/e2e-scenario/support-tests/e2e-scenarios-workflow.test.ts test/e2e-scenario/support-tests/tunnel-lifecycle-workflow-boundary.test.ts test/e2e-scenario/support-tests/spark-install-workflow-boundary.test.ts test/e2e-scenario/support-tests/openclaw-discord-workflow-boundary.test.ts test/e2e-scenario/support-tests/openclaw-slack-workflow-boundary.test.ts test/e2e-scenario/support-tests/cloud-inference-provider-skip.test.ts test/e2e-scenario/support-tests/network-policy-transient-provider.test.ts
  • git diff --check
  • rg NVIDIA_API_KEY .github/workflows/e2e-vitest-scenarios.yaml test/e2e-scenario tools/e2e-scenarios (no matches)

Note: local all-test hooks are currently blocked by pre-existing local fixture/build issues (missing nemoclaw/dist and nemoclaw/node_modules/json5 in this worktree), so the commit/push used targeted validation for this Vitest-only change.

Summary by CodeRabbit

Release Notes

  • Chores

    • Updated E2E/Vitest GitHub workflow and scenario boundary validations to use NVIDIA_INFERENCE_API_KEY (and to unset it where appropriate) instead of NVIDIA_API_KEY.
    • Enabled hosted-inference mode (NEMOCLAW_E2E_USE_HOSTED_INFERENCE=1) and standardized how hosted inference configuration is propagated into jobs and steps.
  • Tests

    • Refreshed live E2E scenarios and helpers to source inference credentials via hosted-inference configuration, updating credential redaction/leak checks and expected boundary/error messages accordingly.

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

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: f39f8f22-b0f0-4c9c-83a6-d5e87f90d87c

📥 Commits

Reviewing files that changed from the base of the PR and between d52254a and 6d44605.

📒 Files selected for processing (3)
  • .github/workflows/e2e-vitest-scenarios.yaml
  • test/e2e-scenario/live/cloud-inference.test.ts
  • tools/e2e-scenarios/workflow-boundary.mts
🚧 Files skipped from review as they are similar to previous changes (1)
  • tools/e2e-scenarios/workflow-boundary.mts

📝 Walkthrough

Walkthrough

Updates hosted inference configuration, workflow env wiring, boundary validation, and live E2E scenarios to use NVIDIA_INFERENCE_API_KEY. Several jobs also enable hosted-inference mode through NEMOCLAW_E2E_USE_HOSTED_INFERENCE.

Changes

E2E NVIDIA inference credential contract migration

Layer / File(s) Summary
Hosted inference fixture and switch-helper contract baseline
test/e2e-scenario/fixtures/hosted-inference.ts, test/e2e-scenario/support-tests/hosted-inference.test.ts, test/e2e-scenario/live/hermes-inference-switch-helpers.ts, test/e2e-scenario/live/openclaw-inference-switch.test.ts
requireHostedInferenceConfig returns hosted-mode env flags, the hosted fixture test asserts them, and switch defaults and env injection vary with NEMOCLAW_E2E_USE_HOSTED_INFERENCE.
Live scenarios refactored to shared hosted-inference config
test/e2e-scenario/live/cloud-inference.test.ts, test/e2e-scenario/live/common-egress-agent.test.ts, test/e2e-scenario/live/cron-preflight-inference-local.test.ts, test/e2e-scenario/live/hermes-e2e.test.ts, test/e2e-scenario/live/issue-4434-tui-unreachable-inference.test.ts, test/e2e-scenario/live/launchable-smoke.test.ts, test/e2e-scenario/live/openclaw-skill-cli.test.ts, test/e2e-scenario/live/sandbox-survival.test.ts, test/e2e-scenario/live/shields-config.test.ts, test/e2e-scenario/live/skill-agent.test.ts
Live tests derive hosted.apiKey and hosted.env from shared helper output and pass the hosted env into install, onboard, probe, and redaction flows.
Helper env wiring and direct scenario key renames
test/e2e-scenario/live/agent-turn-latency-helpers.ts, test/e2e-scenario/live/brave-search-helpers.ts, test/e2e-scenario/live/device-auth-health-helpers.ts, test/e2e-scenario/live/upgrade-stale-sandbox-helpers.ts, test/e2e-scenario/live/messaging-providers-helpers.ts, test/e2e-scenario/live/phase6-messaging-helpers.ts, test/e2e-scenario/live/messaging-providers.test.ts, test/e2e-scenario/live/sessions-agents-cli.test.ts, test/e2e-scenario/live/snapshot-commands.test.ts, test/e2e-scenario/live/spark-install.test.ts, test/e2e-scenario/live/state-backup-restore.test.ts, test/e2e-scenario/live/hermes-discord.test.ts, test/e2e-scenario/live/channels-add-remove.test.ts, test/e2e-scenario/live/diagnostics.test.ts, test/e2e-scenario/live/network-policy.test.ts, test/e2e-scenario/live/rebuild-openclaw.test.ts, test/e2e-scenario/live/sandbox-rebuild.test.ts, test/e2e-scenario/live/credential-sanitization.test.ts, test/e2e-scenario/support-tests/cloud-inference-provider-skip.test.ts, test/e2e-scenario/support-tests/network-policy-transient-provider.test.ts
Helpers and simpler scenarios retarget env injection, secret lookup, skip conditions, contract text, and prefix assertions from NVIDIA_API_KEY to NVIDIA_INFERENCE_API_KEY.
Workflow job env wiring and OpenShell sanitization
.github/workflows/e2e-vitest-scenarios.yaml
Vitest job env blocks and OpenShell env -u directives rename to NVIDIA_INFERENCE_API_KEY, and several hosted-inference jobs add NEMOCLAW_E2E_USE_HOSTED_INFERENCE: "1".
Canonical workflow-boundary validator migration
tools/e2e-scenarios/workflow-boundary.mts
Shared secret lists, per-job disallow checks, OpenShell sanitization assertions, and Vitest step secret-source checks switch from NVIDIA_API_KEY to NVIDIA_INFERENCE_API_KEY.
Workflow boundary support tests retargeted to inference key
test/e2e-scenario/support-tests/e2e-scenarios-workflow.test.ts, test/e2e-scenario/support-tests/spark-install-workflow-boundary.test.ts, test/e2e-scenario/support-tests/tunnel-lifecycle-workflow-boundary.test.ts, test/e2e-scenario/support-tests/openclaw-discord-workflow-boundary.test.ts, test/e2e-scenario/support-tests/openclaw-slack-workflow-boundary.test.ts
Workflow mutations and expected violations retarget boundary checks to NVIDIA_INFERENCE_API_KEY, and some old-key drift assertions are removed.
Additional workflow-boundary support cases
test/e2e-scenario/support-tests/e2e-scenarios-workflow.test.ts
Boundary coverage updates for snapshot, free-standing, channels, diagnostics, and related jobs rewrite env injections and expected errors to the inference key.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

Possibly related PRs

  • NVIDIA/NemoClaw#5600: Overlaps on the shared E2E hosted-inference wiring and workflow boundary validation around NVIDIA_INFERENCE_API_KEY.
  • NVIDIA/NemoClaw#5608: Shares the Spark installer live E2E flow changes in spark-install.test.ts and matching workflow wiring.
  • NVIDIA/NemoClaw#5607: Touches the same workflow-boundary enforcement path for NVIDIA inference credential handling.

Suggested labels

bug-fix

Suggested reviewers

  • cv
  • sandl99

🐇 A key renamed, the tunnels gleam,
Hosted hops now fit the stream.
NVIDIA_INFERENCE_API_KEY takes the throne,
And hosted config is neatly sewn.

🚥 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 clearly summarizes the main change: switching Vitest E2E to the canonical inference key.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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/vitest-only-nvidia-inference-key

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

@github-code-quality

github-code-quality Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in the fix/vitest-only-nvid... 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/vitest-only-nvid... 6d44605 +/-
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/vitest-only-nvid... 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/vitest-only-nvid... 6d44605 +/-
src/lib/state/o...oard-session.ts 91%
src/lib/inference/local.ts 76%
src/lib/sandbox/config.ts 72%
src/lib/actions...dbox/rebuild.ts 71%
src/lib/onboard/preflight.ts 64%
src/lib/actions...licy-channel.ts 60%
src/lib/state/sandbox.ts 55%
src/lib/onboard...er-gpu-patch.ts 50%
src/lib/policy/index.ts 49%
src/lib/onboard.ts 19%

Updated June 25, 2026 14:05 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: cloud-inference-vitest, openclaw-inference-switch-vitest, hermes-inference-switch-vitest, credential-sanitization-vitest, network-policy-vitest, common-egress-agent-vitest
Optional E2E: skill-agent-vitest, openclaw-skill-cli-vitest, sessions-agents-cli-vitest, state-backup-restore-vitest, sandbox-survival-vitest, diagnostics-vitest, messaging-providers-vitest, channels-add-remove-vitest, launchable-smoke-vitest

Dispatch hint: cloud-inference-vitest,openclaw-inference-switch-vitest,hermes-inference-switch-vitest,credential-sanitization-vitest,network-policy-vitest,common-egress-agent-vitest

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E

  • cloud-inference-vitest (medium): Canonical hosted-inference install/onboard path was changed to use NVIDIA_INFERENCE_API_KEY and NEMOCLAW_E2E_USE_HOSTED_INFERENCE; this job proves live inference.local still works through the sandbox.
  • openclaw-inference-switch-vitest (high): OpenClaw inference-switch code and workflow env now use hosted inference and the new secret name; this directly covers inference routing, config persistence, and assistant-turn behavior for OpenClaw.
  • hermes-inference-switch-vitest (medium): Hermes inference-switch helpers were changed for the hosted-compatible path; run the Hermes counterpart to catch agent-specific routing or credential regressions.
  • credential-sanitization-vitest (medium): The PR changes secret names and workflow secret passthrough for live jobs; this job validates that credentials remain redacted and confined across install/onboard/sandbox state.
  • network-policy-vitest (high): Network policy live coverage and install-time secret scrubbing changed; this validates allowed/denied egress behavior with the updated NVIDIA_INFERENCE_API_KEY handling.
  • common-egress-agent-vitest (high): Common-egress assistant flow now opts into hosted inference and uses the renamed secret; this is the representative real assistant egress policy check across OpenClaw/Hermes behavior.

Optional E2E

  • skill-agent-vitest (medium): Useful adjacent confidence for the hosted-inference env change in the live skill injection and real OpenClaw agent-turn contract.
  • openclaw-skill-cli-vitest (medium): Validates the workflow secret rename for the direct OpenClaw skills CLI contract.
  • sessions-agents-cli-vitest (medium): Good follow-up coverage for the NVIDIA_INFERENCE_API_KEY workflow migration in sessions/agents gateway command handling.
  • state-backup-restore-vitest (medium): Optional sandbox lifecycle confidence because the job secret env changed from NVIDIA_API_KEY to NVIDIA_INFERENCE_API_KEY.
  • sandbox-survival-vitest (medium): Optional installer/onboard/gateway restart confidence for a job newly opting into hosted inference.
  • diagnostics-vitest (medium): Optional credential-boundary follow-up for diagnostics archive and credentials list/reset behavior after the secret rename.
  • messaging-providers-vitest (high): Optional messaging-provider confidence because helper/test env now uses NVIDIA_INFERENCE_API_KEY while preserving fake-token and optional real-provider boundaries.
  • channels-add-remove-vitest (high): Optional real channel lifecycle coverage for touched add/remove tests and gateway credential reuse behavior.
  • launchable-smoke-vitest (low): Optional quick smoke for the launchable hosted-inference workflow env addition.

New E2E recommendations

  • None.

Dispatch hint

  • Workflow: .github/workflows/e2e-vitest-scenarios.yaml
  • jobs input: cloud-inference-vitest,openclaw-inference-switch-vitest,hermes-inference-switch-vitest,credential-sanitization-vitest,network-policy-vitest,common-egress-agent-vitest

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Vitest E2E Scenario Recommendation

Required Vitest E2E scenarios: channels-add-remove-vitest, cloud-inference-vitest, common-egress-agent-vitest, credential-sanitization-vitest, cron-preflight-inference-local-vitest, diagnostics-vitest, hermes-discord-vitest, issue-4434-tui-unreachable-inference-vitest, launchable-smoke-vitest, messaging-providers-vitest, network-policy-vitest, openclaw-inference-switch-vitest, openclaw-skill-cli-vitest, rebuild-openclaw-vitest, sandbox-rebuild-vitest, sandbox-survival-vitest, sessions-agents-cli-vitest, shields-config-vitest, skill-agent-vitest, snapshot-commands-vitest, spark-install-vitest, state-backup-restore-vitest, e2e-scenarios-all
Optional Vitest E2E scenarios: None

Dispatch required Vitest E2E scenarios:

  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=channels-add-remove-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=cloud-inference-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=common-egress-agent-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=credential-sanitization-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=cron-preflight-inference-local-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=diagnostics-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=hermes-discord-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=issue-4434-tui-unreachable-inference-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=launchable-smoke-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=messaging-providers-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=network-policy-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=openclaw-inference-switch-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=openclaw-skill-cli-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=rebuild-openclaw-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=sandbox-rebuild-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=sandbox-survival-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=sessions-agents-cli-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=shields-config-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=skill-agent-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=snapshot-commands-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=spark-install-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=state-backup-restore-vitest
  • gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref>

Workflow run

Full Vitest E2E advisor summary

Vitest E2E Scenario Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required Vitest E2E scenarios

  • channels-add-remove-vitest: Focused free-standing Vitest job wired for changed live test test/e2e-scenario/live/channels-add-remove.test.ts.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=channels-add-remove-vitest
  • cloud-inference-vitest: Focused free-standing Vitest job wired for changed live test test/e2e-scenario/live/cloud-inference.test.ts.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=cloud-inference-vitest
  • common-egress-agent-vitest: Focused free-standing Vitest job wired for changed live test test/e2e-scenario/live/common-egress-agent.test.ts.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=common-egress-agent-vitest
  • credential-sanitization-vitest: Focused free-standing Vitest job wired for changed live test test/e2e-scenario/live/credential-sanitization.test.ts.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=credential-sanitization-vitest
  • cron-preflight-inference-local-vitest: Focused free-standing Vitest job wired for changed live test test/e2e-scenario/live/cron-preflight-inference-local.test.ts.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=cron-preflight-inference-local-vitest
  • diagnostics-vitest: Focused free-standing Vitest job wired for changed live test test/e2e-scenario/live/diagnostics.test.ts.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=diagnostics-vitest
  • hermes-discord-vitest: Focused free-standing Vitest job wired for changed live test test/e2e-scenario/live/hermes-discord.test.ts.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=hermes-discord-vitest
  • issue-4434-tui-unreachable-inference-vitest: Focused free-standing Vitest job wired for changed live test test/e2e-scenario/live/issue-4434-tui-unreachable-inference.test.ts.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=issue-4434-tui-unreachable-inference-vitest
  • launchable-smoke-vitest: Focused free-standing Vitest job wired for changed live test test/e2e-scenario/live/launchable-smoke.test.ts.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=launchable-smoke-vitest
  • messaging-providers-vitest: Focused free-standing Vitest job wired for changed live test test/e2e-scenario/live/messaging-providers.test.ts.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=messaging-providers-vitest
  • network-policy-vitest: Focused free-standing Vitest job wired for changed live test test/e2e-scenario/live/network-policy.test.ts.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=network-policy-vitest
  • openclaw-inference-switch-vitest: Focused free-standing Vitest job wired for changed live test test/e2e-scenario/live/openclaw-inference-switch.test.ts.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=openclaw-inference-switch-vitest
  • openclaw-skill-cli-vitest: Focused free-standing Vitest job wired for changed live test test/e2e-scenario/live/openclaw-skill-cli.test.ts.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=openclaw-skill-cli-vitest
  • rebuild-openclaw-vitest: Focused free-standing Vitest job wired for changed live test test/e2e-scenario/live/rebuild-openclaw.test.ts.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=rebuild-openclaw-vitest
  • sandbox-rebuild-vitest: Focused free-standing Vitest job wired for changed live test test/e2e-scenario/live/sandbox-rebuild.test.ts.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=sandbox-rebuild-vitest
  • sandbox-survival-vitest: Focused free-standing Vitest job wired for changed live test test/e2e-scenario/live/sandbox-survival.test.ts.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=sandbox-survival-vitest
  • sessions-agents-cli-vitest: Focused free-standing Vitest job wired for changed live test test/e2e-scenario/live/sessions-agents-cli.test.ts.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=sessions-agents-cli-vitest
  • shields-config-vitest: Focused free-standing Vitest job wired for changed live test test/e2e-scenario/live/shields-config.test.ts.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=shields-config-vitest
  • skill-agent-vitest: Focused free-standing Vitest job wired for changed live test test/e2e-scenario/live/skill-agent.test.ts.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=skill-agent-vitest
  • snapshot-commands-vitest: Focused free-standing Vitest job wired for changed live test test/e2e-scenario/live/snapshot-commands.test.ts.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=snapshot-commands-vitest
  • spark-install-vitest: Focused free-standing Vitest job wired for changed live test test/e2e-scenario/live/spark-install.test.ts.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=spark-install-vitest
  • state-backup-restore-vitest: Focused free-standing Vitest job wired for changed live test test/e2e-scenario/live/state-backup-restore.test.ts.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref> --field jobs=state-backup-restore-vitest
  • e2e-scenarios-all: The PR changes the shared Vitest scenario workflow, hosted-inference fixture/support surface, workflow-boundary tooling/tests, and many live Vitest scenario files, so the full e2e-vitest-scenarios fan-out is required to validate shared workflow machinery and broad scenario behavior.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref>

Optional Vitest E2E scenarios

  • None.

Relevant changed files

  • .github/workflows/e2e-vitest-scenarios.yaml
  • test/e2e-scenario/fixtures/hosted-inference.ts
  • test/e2e-scenario/live/agent-turn-latency-helpers.ts
  • test/e2e-scenario/live/brave-search-helpers.ts
  • test/e2e-scenario/live/channels-add-remove.test.ts
  • test/e2e-scenario/live/cloud-inference.test.ts
  • test/e2e-scenario/live/common-egress-agent.test.ts
  • test/e2e-scenario/live/credential-sanitization.test.ts
  • test/e2e-scenario/live/cron-preflight-inference-local.test.ts
  • test/e2e-scenario/live/device-auth-health-helpers.ts
  • test/e2e-scenario/live/diagnostics.test.ts
  • test/e2e-scenario/live/hermes-discord.test.ts
  • test/e2e-scenario/live/hermes-e2e.test.ts
  • test/e2e-scenario/live/hermes-inference-switch-helpers.ts
  • test/e2e-scenario/live/issue-4434-tui-unreachable-inference.test.ts
  • test/e2e-scenario/live/launchable-smoke.test.ts
  • test/e2e-scenario/live/messaging-providers-helpers.ts
  • test/e2e-scenario/live/messaging-providers.test.ts
  • test/e2e-scenario/live/network-policy.test.ts
  • test/e2e-scenario/live/openclaw-inference-switch.test.ts
  • test/e2e-scenario/live/openclaw-skill-cli.test.ts
  • test/e2e-scenario/live/phase6-messaging-helpers.ts
  • test/e2e-scenario/live/rebuild-openclaw.test.ts
  • test/e2e-scenario/live/sandbox-rebuild.test.ts
  • test/e2e-scenario/live/sandbox-survival.test.ts
  • test/e2e-scenario/live/sessions-agents-cli.test.ts
  • test/e2e-scenario/live/shields-config.test.ts
  • test/e2e-scenario/live/skill-agent.test.ts
  • test/e2e-scenario/live/snapshot-commands.test.ts
  • test/e2e-scenario/live/spark-install.test.ts
  • test/e2e-scenario/live/state-backup-restore.test.ts
  • test/e2e-scenario/live/upgrade-stale-sandbox-helpers.ts
  • test/e2e-scenario/support-tests/cloud-inference-provider-skip.test.ts
  • test/e2e-scenario/support-tests/e2e-scenarios-workflow.test.ts
  • test/e2e-scenario/support-tests/hosted-inference.test.ts
  • test/e2e-scenario/support-tests/network-policy-transient-provider.test.ts
  • test/e2e-scenario/support-tests/openclaw-discord-workflow-boundary.test.ts
  • test/e2e-scenario/support-tests/openclaw-slack-workflow-boundary.test.ts
  • test/e2e-scenario/support-tests/spark-install-workflow-boundary.test.ts
  • test/e2e-scenario/support-tests/tunnel-lifecycle-workflow-boundary.test.ts
  • tools/e2e-scenarios/workflow-boundary.mts

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — Changes requested

Merge posture: Do not merge yet
Primary next action: Resolve or justify PRA-1: Source-of-truth review needed: Vitest workflow boundary versus runtime NVIDIA_API_KEY compatibility alias.
Open items: 0 required · 2 warnings · 0 suggestions · 5 test follow-ups
Since last review: 2 prior items resolved · 1 still applies · 0 new items found

Action checklist

  • PRA-1 Resolve or justify: Source-of-truth review needed: Vitest workflow boundary versus runtime NVIDIA_API_KEY compatibility alias
  • PRA-2 Resolve or justify: Installer boundary validation does not require unsetting legacy NVIDIA_API_KEY in tools/e2e-scenarios/workflow-boundary.mts:1037
  • PRA-T1 Add or justify test follow-up: Runtime validation
  • PRA-T2 Add or justify test follow-up: Runtime validation
  • PRA-T3 Add or justify test follow-up: Runtime validation
  • PRA-T4 Add or justify test follow-up: Acceptance clause
  • PRA-T5 Add or justify test follow-up: Vitest workflow boundary versus runtime NVIDIA_API_KEY compatibility alias

Findings index

ID Severity Category Location Required action
PRA-1 Resolve/justify architecture Identify the invalid state, source boundary, source-fix constraint, regression test, and removal condition before merging the localized behavior.
PRA-2 Resolve/justify security tools/e2e-scenarios/workflow-boundary.mts:1037 Add '-u NVIDIA_API_KEY' to the installer-boundary requireRunContains checks, preferably through a small shared helper for the existing explicit installer checks, while preserving the existing canonical '-u NVIDIA_INFERENCE_API_KEY' checks and current workflow unsets.
Review findings by urgency: 0 required fixes, 2 items to resolve/justify, 0 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.

PRA-1 Resolve/justify — Source-of-truth review needed: Vitest workflow boundary versus runtime NVIDIA_API_KEY compatibility alias

  • Location: not file-specific
  • Category: architecture
  • Problem: The advisor marked localized patch analysis as needs_followup.
  • Impact: A localized workaround can preserve or hide an invalid state when the source boundary is unclear.
  • Recommended action: Identify the invalid state, source boundary, source-fix constraint, regression test, and removal condition before merging the localized behavior.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Inspect the localized patch and source-of-truth review fields for a concrete invalid state, source boundary, source-fix constraint, regression test, and removal condition.
  • Missing regression test: Partially present: the workflow currently unsets both aliases and COMMON_SECRET_ENV_NAMES denies both names. Missing: boundary-validator tests and checks that fail when installer steps omit only '-u NVIDIA_API_KEY'.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Inspect the localized patch and source-of-truth review fields for a concrete invalid state, source boundary, source-fix constraint, regression test, and removal condition.
  • Evidence: The diff restores legacy alias unsetting in workflow installer commands and adds NVIDIA_API_KEY to COMMON_SECRET_ENV_NAMES, but inspected installer validator checks still require only '-u NVIDIA_INFERENCE_API_KEY'.

PRA-2 Resolve/justify — Installer boundary validation does not require unsetting legacy NVIDIA_API_KEY

  • Location: tools/e2e-scenarios/workflow-boundary.mts:1037
  • Category: security
  • Problem: The workflow now unsets both NVIDIA_API_KEY and NVIDIA_INFERENCE_API_KEY before branch-controlled OpenShell installer steps, and COMMON_SECRET_ENV_NAMES includes the legacy alias. However, the job-specific installer validators I inspected still require only '-u NVIDIA_INFERENCE_API_KEY' alongside Docker/GitHub secrets. Because runtime code still accepts NVIDIA_API_KEY as a credential alias, the validator should also fail if a future workflow edit keeps canonical unsetting but drops '-u NVIDIA_API_KEY'.
  • Impact: A later workflow drift could pass the support boundary test while allowing a legacy runner/job-level NVIDIA_API_KEY to be inherited by installer/setup commands intended to run without inference credentials, increasing credential exposure risk through subprocess environments, installer behavior, logs, or artifacts.
  • Recommended action: Add '-u NVIDIA_API_KEY' to the installer-boundary requireRunContains checks, preferably through a small shared helper for the existing explicit installer checks, while preserving the existing canonical '-u NVIDIA_INFERENCE_API_KEY' checks and current workflow unsets.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read tools/e2e-scenarios/workflow-boundary.mts around the Install OpenShell validators, for example the network-policy/common-egress installer checks, and confirm both requireRunContains(..., '-u NVIDIA_API_KEY') and requireRunContains(..., '-u NVIDIA_INFERENCE_API_KEY') are present. Cross-check .github/workflows/e2e-vitest-scenarios.yaml installer run scripts still include both '-u' flags.
  • Missing regression test: Add support-test mutations for validateE2eVitestScenariosWorkflowBoundary(): one that removes only '-u NVIDIA_API_KEY' from an installer step while leaving '-u NVIDIA_INFERENCE_API_KEY' intact and expects a validation error, and one that injects NVIDIA_API_KEY into a job env or non-live step env and expects rejection.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read tools/e2e-scenarios/workflow-boundary.mts around the Install OpenShell validators, for example the network-policy/common-egress installer checks, and confirm both requireRunContains(..., '-u NVIDIA_API_KEY') and requireRunContains(..., '-u NVIDIA_INFERENCE_API_KEY') are present. Cross-check .github/workflows/e2e-vitest-scenarios.yaml installer run scripts still include both '-u' flags.
  • Evidence: tools/e2e-scenarios/workflow-boundary.mts includes NVIDIA_API_KEY in COMMON_SECRET_ENV_NAMES, and the workflow grep shows installer commands currently unset both names. But inspected installer validators such as the network-policy Install OpenShell check require '-u NVIDIA_INFERENCE_API_KEY' and not the legacy '-u NVIDIA_API_KEY'.

💡 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.

  • None.
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 — validateE2eVitestScenariosWorkflowBoundary rejects NVIDIA_API_KEY in a free-standing job env and in a non-live setup step env. The changed surfaces include a secret-bearing GitHub Actions workflow, a custom workflow-boundary validator, installer trusted-code boundaries, and live sandbox/inference tests. Static support tests cover many canonical-key cases, but the legacy alias boundary needs targeted negative validation because runtime still accepts that alias.
  • PRA-T2 Runtime validation — validateE2eVitestScenariosWorkflowBoundary rejects an Install OpenShell step that unsets NVIDIA_INFERENCE_API_KEY but omits -u NVIDIA_API_KEY. The changed surfaces include a secret-bearing GitHub Actions workflow, a custom workflow-boundary validator, installer trusted-code boundaries, and live sandbox/inference tests. Static support tests cover many canonical-key cases, but the legacy alias boundary needs targeted negative validation because runtime still accepts that alias.
  • PRA-T3 Runtime validation — hosted cloud-inference mode uses the same model from requireHostedInferenceConfig for onboarding env and the inference.local chat payload. The changed surfaces include a secret-bearing GitHub Actions workflow, a custom workflow-boundary validator, installer trusted-code boundaries, and live sandbox/inference tests. Static support tests cover many canonical-key cases, but the legacy alias boundary needs targeted negative validation because runtime still accepts that alias.
  • PRA-T4 Acceptance clause — Update workflow boundary guards so Vitest jobs no longer depend on secrets.NVIDIA_API_KEY. — add test evidence or identify existing coverage. COMMON_SECRET_ENV_NAMES now includes NVIDIA_API_KEY and NVIDIA_INFERENCE_API_KEY, and the workflow no longer references secrets.NVIDIA_API_KEY. The remaining gap is that job-specific installer validators appear to require only '-u NVIDIA_INFERENCE_API_KEY', so they do not fully prove legacy NVIDIA_API_KEY stays unset at installer boundaries.
  • PRA-T5 Vitest workflow boundary versus runtime NVIDIA_API_KEY compatibility alias — Partially present: the workflow currently unsets both aliases and COMMON_SECRET_ENV_NAMES denies both names. Missing: boundary-validator tests and checks that fail when installer steps omit only '-u NVIDIA_API_KEY'.. The diff restores legacy alias unsetting in workflow installer commands and adds NVIDIA_API_KEY to COMMON_SECRET_ENV_NAMES, but inspected installer validator checks still require only '-u NVIDIA_INFERENCE_API_KEY'.
Since last review details

Current findings, using the urgency labels above:

PRA-1 Resolve/justify — Source-of-truth review needed: Vitest workflow boundary versus runtime NVIDIA_API_KEY compatibility alias

  • Location: not file-specific
  • Category: architecture
  • Problem: The advisor marked localized patch analysis as needs_followup.
  • Impact: A localized workaround can preserve or hide an invalid state when the source boundary is unclear.
  • Recommended action: Identify the invalid state, source boundary, source-fix constraint, regression test, and removal condition before merging the localized behavior.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Inspect the localized patch and source-of-truth review fields for a concrete invalid state, source boundary, source-fix constraint, regression test, and removal condition.
  • Missing regression test: Partially present: the workflow currently unsets both aliases and COMMON_SECRET_ENV_NAMES denies both names. Missing: boundary-validator tests and checks that fail when installer steps omit only '-u NVIDIA_API_KEY'.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Inspect the localized patch and source-of-truth review fields for a concrete invalid state, source boundary, source-fix constraint, regression test, and removal condition.
  • Evidence: The diff restores legacy alias unsetting in workflow installer commands and adds NVIDIA_API_KEY to COMMON_SECRET_ENV_NAMES, but inspected installer validator checks still require only '-u NVIDIA_INFERENCE_API_KEY'.

PRA-2 Resolve/justify — Installer boundary validation does not require unsetting legacy NVIDIA_API_KEY

  • Location: tools/e2e-scenarios/workflow-boundary.mts:1037
  • Category: security
  • Problem: The workflow now unsets both NVIDIA_API_KEY and NVIDIA_INFERENCE_API_KEY before branch-controlled OpenShell installer steps, and COMMON_SECRET_ENV_NAMES includes the legacy alias. However, the job-specific installer validators I inspected still require only '-u NVIDIA_INFERENCE_API_KEY' alongside Docker/GitHub secrets. Because runtime code still accepts NVIDIA_API_KEY as a credential alias, the validator should also fail if a future workflow edit keeps canonical unsetting but drops '-u NVIDIA_API_KEY'.
  • Impact: A later workflow drift could pass the support boundary test while allowing a legacy runner/job-level NVIDIA_API_KEY to be inherited by installer/setup commands intended to run without inference credentials, increasing credential exposure risk through subprocess environments, installer behavior, logs, or artifacts.
  • Recommended action: Add '-u NVIDIA_API_KEY' to the installer-boundary requireRunContains checks, preferably through a small shared helper for the existing explicit installer checks, while preserving the existing canonical '-u NVIDIA_INFERENCE_API_KEY' checks and current workflow unsets.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read tools/e2e-scenarios/workflow-boundary.mts around the Install OpenShell validators, for example the network-policy/common-egress installer checks, and confirm both requireRunContains(..., '-u NVIDIA_API_KEY') and requireRunContains(..., '-u NVIDIA_INFERENCE_API_KEY') are present. Cross-check .github/workflows/e2e-vitest-scenarios.yaml installer run scripts still include both '-u' flags.
  • Missing regression test: Add support-test mutations for validateE2eVitestScenariosWorkflowBoundary(): one that removes only '-u NVIDIA_API_KEY' from an installer step while leaving '-u NVIDIA_INFERENCE_API_KEY' intact and expects a validation error, and one that injects NVIDIA_API_KEY into a job env or non-live step env and expects rejection.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read tools/e2e-scenarios/workflow-boundary.mts around the Install OpenShell validators, for example the network-policy/common-egress installer checks, and confirm both requireRunContains(..., '-u NVIDIA_API_KEY') and requireRunContains(..., '-u NVIDIA_INFERENCE_API_KEY') are present. Cross-check .github/workflows/e2e-vitest-scenarios.yaml installer run scripts still include both '-u' flags.
  • Evidence: tools/e2e-scenarios/workflow-boundary.mts includes NVIDIA_API_KEY in COMMON_SECRET_ENV_NAMES, and the workflow grep shows installer commands currently unset both names. But inspected installer validators such as the network-policy Install OpenShell check require '-u NVIDIA_INFERENCE_API_KEY' and not the legacy '-u NVIDIA_API_KEY'.

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
tools/e2e-scenarios/workflow-boundary.mts (1)

2479-2491: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Deduplicate repeated NVIDIA secret checks in step validators.

These branches call requireEnvDoesNotExposeSecret(..., "NVIDIA_INFERENCE_API_KEY") twice for the same step, which can emit duplicate boundary errors for a single violation.

♻️ Suggested cleanup pattern
-      requireEnvDoesNotExposeSecret(
-        errors,
-        stepName,
-        stepEnv,
-        "NVIDIA_INFERENCE_API_KEY",
-      );
       requireEnvDoesNotExposeSecret(
         errors,
         stepName,
         stepEnv,
         "NVIDIA_INFERENCE_API_KEY",
       );

Also applies to: 5221-5233, 5336-5347, 5503-5509, 6861-6872

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tools/e2e-scenarios/workflow-boundary.mts` around lines 2479 - 2491, Remove
the duplicate call to requireEnvDoesNotExposeSecret that checks for
"NVIDIA_INFERENCE_API_KEY" in the step validation logic. The function is being
called twice consecutively with identical parameters within the same conditional
block, which causes duplicate boundary errors when a violation occurs. Keep only
one call to requireEnvDoesNotExposeSecret for this secret and apply the same
deduplication fix to the other locations mentioned in the comment (around lines
5221-5233, 5336-5347, 5503-5509, and 6861-6872) where the same pattern of
duplicate secret checks appears.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@tools/e2e-scenarios/workflow-boundary.mts`:
- Around line 2479-2491: Remove the duplicate call to
requireEnvDoesNotExposeSecret that checks for "NVIDIA_INFERENCE_API_KEY" in the
step validation logic. The function is being called twice consecutively with
identical parameters within the same conditional block, which causes duplicate
boundary errors when a violation occurs. Keep only one call to
requireEnvDoesNotExposeSecret for this secret and apply the same deduplication
fix to the other locations mentioned in the comment (around lines 5221-5233,
5336-5347, 5503-5509, and 6861-6872) where the same pattern of duplicate secret
checks appears.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: fbbf5254-abca-4c26-8571-cfcad696f5f0

📥 Commits

Reviewing files that changed from the base of the PR and between df08bcf and 5acd71e.

📒 Files selected for processing (29)
  • .github/workflows/e2e-vitest-scenarios.yaml
  • test/e2e-scenario/live/agent-turn-latency-helpers.ts
  • test/e2e-scenario/live/brave-search-helpers.ts
  • test/e2e-scenario/live/channels-add-remove.test.ts
  • test/e2e-scenario/live/cloud-inference.test.ts
  • test/e2e-scenario/live/common-egress-agent.test.ts
  • test/e2e-scenario/live/cron-preflight-inference-local.test.ts
  • test/e2e-scenario/live/device-auth-health-helpers.ts
  • test/e2e-scenario/live/diagnostics.test.ts
  • test/e2e-scenario/live/hermes-discord.test.ts
  • test/e2e-scenario/live/hermes-inference-switch-helpers.ts
  • test/e2e-scenario/live/messaging-providers-helpers.ts
  • test/e2e-scenario/live/messaging-providers.test.ts
  • test/e2e-scenario/live/openclaw-inference-switch.test.ts
  • test/e2e-scenario/live/openclaw-skill-cli.test.ts
  • test/e2e-scenario/live/phase6-messaging-helpers.ts
  • test/e2e-scenario/live/sessions-agents-cli.test.ts
  • test/e2e-scenario/live/snapshot-commands.test.ts
  • test/e2e-scenario/live/spark-install.test.ts
  • test/e2e-scenario/live/state-backup-restore.test.ts
  • test/e2e-scenario/live/upgrade-stale-sandbox-helpers.ts
  • test/e2e-scenario/support-tests/cloud-inference-provider-skip.test.ts
  • test/e2e-scenario/support-tests/e2e-scenarios-workflow.test.ts
  • test/e2e-scenario/support-tests/network-policy-transient-provider.test.ts
  • test/e2e-scenario/support-tests/openclaw-discord-workflow-boundary.test.ts
  • test/e2e-scenario/support-tests/openclaw-slack-workflow-boundary.test.ts
  • test/e2e-scenario/support-tests/spark-install-workflow-boundary.test.ts
  • test/e2e-scenario/support-tests/tunnel-lifecycle-workflow-boundary.test.ts
  • tools/e2e-scenarios/workflow-boundary.mts
💤 Files with no reviewable changes (5)
  • test/e2e-scenario/live/cron-preflight-inference-local.test.ts
  • test/e2e-scenario/live/brave-search-helpers.ts
  • test/e2e-scenario/support-tests/tunnel-lifecycle-workflow-boundary.test.ts
  • test/e2e-scenario/support-tests/openclaw-slack-workflow-boundary.test.ts
  • test/e2e-scenario/support-tests/openclaw-discord-workflow-boundary.test.ts

@jyaunches

Copy link
Copy Markdown
Contributor Author

Full Vitest run triage: inference key + Jetson runner blockers

Run: https://github.com/NVIDIA/NemoClaw/actions/runs/28052592018

Findings from failed job logs:

  • The dominant failure mode is the canonical secret value, not workflow propagation.
    • 27 failed jobs receive NVIDIA_INFERENCE_API_KEY, but fail immediately with either:
      • NVIDIA_INFERENCE_API_KEY must start with nvapi-
      • Invalid NVIDIA API key. Must start with nvapi-
    • This means this PR is routing the canonical key into Vitest as intended, but the repo secret NVIDIA_INFERENCE_API_KEY currently does not appear to be an nvapi-* hosted NVIDIA Endpoints key.
  • A smaller second group fails later around rebuild/provider reuse:
    • upgrade-stale-sandbox-vitest
    • hermes-discord-vitest
    • hermes-inference-switch-vitest
    • onboard-repair-vitest
    • channels-stop-start-vitest (hermes)
    • Logs include COMPATIBLE_API_KEY → MISSING, provider reuse, or rebuild-after-destroy failures. These should be rechecked after the canonical secret is valid.
  • One separate-looking failure:
    • kimi-inference-compat-vitest: OpenShell rejects a command argument containing newline/control characters.
  • The run also has a completion/reporting blocker:
    • jetson-nvmap-gpu-vitest remains queued because the default runner label is ${{ vars.JETSON_E2E_RUNNER_LABEL || 'linux-arm64-gpu-jetson-orin-latest-1' }} and we do not appear to have an available Jetson runner.
    • report-to-pr currently needs jetson-nvmap-gpu-vitest, so a full-suite dispatch can stay stuck and never produce the final PR summary.

Recommended next steps:

  1. Rotate/verify repo secret NVIDIA_INFERENCE_API_KEY to a real nvapi-* key.
  2. Patch the Jetson Vitest job so it only runs when explicitly selected, or remove it from default/full-suite reporting needs until a runner exists.
  3. Re-run full Vitest; then triage any remaining rebuild/provider-reuse failures separately.

async ({ artifacts, cleanup, host, sandbox, secrets, skip }) => {
const apiKey = await assertPrerequisites(host, secrets, skip);
const hosted = await assertPrerequisites(host, secrets, skip);
const apiKey = hosted.apiKey;
async ({ artifacts, cleanup, host, sandbox, secrets, skip }) => {
const apiKey = await assertPrerequisites(host, secrets, skip);
const hosted = await assertPrerequisites(host, secrets, skip);
const apiKey = hosted.apiKey;
@cv cv added the v0.0.67 label Jun 23, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
test/e2e-scenario/live/cloud-inference.test.ts (1)

251-251: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use helper-provided contract text instead of duplicating a literal.

This assertion should consume hosted.contractLabel to keep boundary wording in one source of truth and avoid drift across scenarios.

♻️ Proposed change
-        "NVIDIA_INFERENCE_API_KEY is staged as the compatible endpoint credential",
+        hosted.contractLabel,
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/e2e-scenario/live/cloud-inference.test.ts` at line 251, The assertion at
line 251 uses a hardcoded literal string "NVIDIA_INFERENCE_API_KEY is staged as
the compatible endpoint credential" instead of referencing the helper-provided
contract text. Replace this hardcoded string with `hosted.contractLabel` to
maintain a single source of truth for the boundary wording and prevent drift
across scenarios.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@test/e2e-scenario/live/common-egress-agent.test.ts`:
- Around line 265-271: Add a format validation check immediately after the
hosted variable is assigned from requireHostedInferenceConfig(secrets) call. The
validation should ensure the hosted key starts with the expected nvapi- prefix
format and throw or expect an error with a clear message if it does not match
the format. This fast-fail check should be placed before the return statement to
catch invalid key formats early with clear diagnostics rather than allowing them
to fail later during onboarding with less informative error messages.

---

Nitpick comments:
In `@test/e2e-scenario/live/cloud-inference.test.ts`:
- Line 251: The assertion at line 251 uses a hardcoded literal string
"NVIDIA_INFERENCE_API_KEY is staged as the compatible endpoint credential"
instead of referencing the helper-provided contract text. Replace this hardcoded
string with `hosted.contractLabel` to maintain a single source of truth for the
boundary wording and prevent drift across scenarios.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 3455e748-5a97-4f65-8d42-d86f118835cf

📥 Commits

Reviewing files that changed from the base of the PR and between 5acd71e and dfee0bf.

📒 Files selected for processing (15)
  • .github/workflows/e2e-vitest-scenarios.yaml
  • test/e2e-scenario/fixtures/hosted-inference.ts
  • test/e2e-scenario/live/cloud-inference.test.ts
  • test/e2e-scenario/live/common-egress-agent.test.ts
  • test/e2e-scenario/live/cron-preflight-inference-local.test.ts
  • test/e2e-scenario/live/hermes-e2e.test.ts
  • test/e2e-scenario/live/hermes-inference-switch-helpers.ts
  • test/e2e-scenario/live/issue-4434-tui-unreachable-inference.test.ts
  • test/e2e-scenario/live/launchable-smoke.test.ts
  • test/e2e-scenario/live/openclaw-inference-switch.test.ts
  • test/e2e-scenario/live/openclaw-skill-cli.test.ts
  • test/e2e-scenario/live/sandbox-survival.test.ts
  • test/e2e-scenario/live/shields-config.test.ts
  • test/e2e-scenario/live/skill-agent.test.ts
  • test/e2e-scenario/support-tests/hosted-inference.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • test/e2e-scenario/live/openclaw-skill-cli.test.ts

Comment on lines +265 to +271
const hosted = requireHostedInferenceConfig(secrets);
expect(process.env.NEMOCLAW_NON_INTERACTIVE, "NEMOCLAW_NON_INTERACTIVE=1 is required").toBe("1");
expect(
process.env.NEMOCLAW_ACCEPT_THIRD_PARTY_SOFTWARE,
"NEMOCLAW_ACCEPT_THIRD_PARTY_SOFTWARE=1 is required",
).toBe("1");
return apiKey;
return hosted;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Add a fast-fail hosted key format check in prerequisites.

At Line 265, requireHostedInferenceConfig guarantees presence but not nvapi- format; invalid secrets then fail deeper in onboarding with noisier diagnostics. Add a local format assertion here to fail immediately.

Suggested patch
   const hosted = requireHostedInferenceConfig(secrets);
+  expect(
+    hosted.apiKey.startsWith("nvapi-"),
+    "NVIDIA_INFERENCE_API_KEY must start with `nvapi-` for hosted inference",
+  ).toBe(true);
   expect(process.env.NEMOCLAW_NON_INTERACTIVE, "NEMOCLAW_NON_INTERACTIVE=1 is required").toBe("1");
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/e2e-scenario/live/common-egress-agent.test.ts` around lines 265 - 271,
Add a format validation check immediately after the hosted variable is assigned
from requireHostedInferenceConfig(secrets) call. The validation should ensure
the hosted key starts with the expected nvapi- prefix format and throw or expect
an error with a clear message if it does not match the format. This fast-fail
check should be placed before the return statement to catch invalid key formats
early with clear diagnostics rather than allowing them to fail later during
onboarding with less informative error messages.

@github-actions

Copy link
Copy Markdown
Contributor

Vitest E2E Scenario Results — ❌ Some jobs failed

Run: 28057277765
Workflow ref: fix/vitest-only-nvidia-inference-key
Requested scenarios: (default — all supported)
Requested jobs: cloud-inference-vitest
Summary: 0 passed, 1 failed, 0 cancelled, 0 skipped

Job Result
cloud-inference-vitest ❌ failure

Failed jobs: cloud-inference-vitest. Check run artifacts for logs.

@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions area: e2e End-to-end tests, nightly failures, or validation infrastructure chore Build, CI, dependency, or tooling maintenance labels Jun 23, 2026
@jyaunches jyaunches added v0.0.68 and removed v0.0.67 labels Jun 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Vitest E2E Scenario Results — ❌ Some jobs failed

Run: 28052592018
Workflow ref: fix/vitest-only-nvidia-inference-key
Requested scenarios: (default — all supported)
Requested jobs: (default — all free-standing when no scenarios are requested)
Summary: 32 passed, 35 failed, 1 cancelled, 0 skipped

Job Result
agent-turn-latency-vitest ❌ failure
bedrock-runtime-compatible-anthropic-vitest ✅ success
brave-search-vitest ✅ success
channels-add-remove-vitest ❌ failure
channels-stop-start-vitest ❌ failure
cloud-inference-vitest ❌ failure
cloud-onboard-vitest ✅ success
common-egress-agent-vitest ❌ failure
concurrent-gateway-ports-vitest ✅ success
credential-migration-vitest ✅ success
credential-sanitization-vitest ❌ failure
cron-preflight-inference-local-vitest ❌ failure
device-auth-health-vitest ✅ success
diagnostics-vitest ❌ failure
double-onboard-vitest ❌ failure
full-e2e-vitest ✅ success
gateway-drift-preflight-vitest ✅ success
gateway-guard-recovery ❌ failure
gateway-health-honest-vitest ✅ success
generate-matrix ✅ success
gpu-double-onboard-vitest ✅ success
gpu-e2e-vitest ✅ success
hermes-discord-vitest ❌ failure
hermes-e2e-vitest ❌ failure
hermes-inference-switch-vitest ❌ failure
hermes-root-entrypoint-smoke-vitest ✅ success
hermes-sandbox-secret-boundary-vitest ✅ success
hermes-slack-vitest ✅ success
inference-routing-vitest ✅ success
issue-2478-crash-loop-recovery-vitest ✅ success
issue-4434-tui-unreachable-inference-vitest ❌ failure
issue-4462-scope-upgrade-approval-vitest ✅ success
jetson-nvmap-gpu-vitest ⚠️ cancelled
kimi-inference-compat-vitest ❌ failure
launchable-smoke-vitest ❌ failure
live-scenarios ❌ failure
messaging-compatible-endpoint-vitest ✅ success
messaging-providers-vitest ❌ failure
model-router-provider-routed-inference-vitest ❌ failure
network-policy-vitest ❌ failure
ollama-auth-proxy-vitest ✅ success
onboard-negative-paths-vitest ✅ success
onboard-repair-vitest ❌ failure
onboard-resume-vitest ❌ failure
openclaw-discord-pairing-vitest ✅ success
openclaw-inference-switch-vitest ❌ failure
openclaw-skill-cli-vitest ❌ failure
openclaw-slack-pairing-vitest ✅ success
openclaw-tui-chat-correlation-vitest ❌ failure
openshell-gateway-upgrade-vitest ✅ success
openshell-version-pin-vitest ✅ success
overlayfs-autofix-vitest ✅ success
rebuild-hermes-stale-base-vitest ✅ success
rebuild-hermes-vitest ✅ success
rebuild-openclaw-vitest ❌ failure
runtime-overrides-vitest ✅ success
sandbox-rebuild-vitest ❌ failure
sandbox-survival-vitest ❌ failure
sessions-agents-cli-vitest ❌ failure
shields-config-vitest ❌ failure
skill-agent-vitest ❌ failure
snapshot-commands-vitest ❌ failure
spark-install-vitest ❌ failure
state-backup-restore-vitest ❌ failure
telegram-injection-vitest ✅ success
token-rotation-vitest ✅ success
tunnel-lifecycle-vitest ✅ success
upgrade-stale-sandbox-vitest ❌ failure

Failed jobs: agent-turn-latency-vitest, channels-add-remove-vitest, channels-stop-start-vitest, cloud-inference-vitest, common-egress-agent-vitest, credential-sanitization-vitest, cron-preflight-inference-local-vitest, diagnostics-vitest, double-onboard-vitest, gateway-guard-recovery, hermes-discord-vitest, hermes-e2e-vitest, hermes-inference-switch-vitest, issue-4434-tui-unreachable-inference-vitest, kimi-inference-compat-vitest, launchable-smoke-vitest, live-scenarios, messaging-providers-vitest, model-router-provider-routed-inference-vitest, network-policy-vitest, onboard-repair-vitest, onboard-resume-vitest, openclaw-inference-switch-vitest, openclaw-skill-cli-vitest, openclaw-tui-chat-correlation-vitest, rebuild-openclaw-vitest, sandbox-rebuild-vitest, sandbox-survival-vitest, sessions-agents-cli-vitest, shields-config-vitest, skill-agent-vitest, snapshot-commands-vitest, spark-install-vitest, state-backup-restore-vitest, upgrade-stale-sandbox-vitest. Check run artifacts for logs.

assertTestOwnedSandboxName();
const apiKey = secrets.required("NVIDIA_API_KEY");
expect(apiKey.startsWith("nvapi-"), "NVIDIA_API_KEY must start with nvapi-").toBe(true);
const apiKey = secrets.required("NVIDIA_INFERENCE_API_KEY");
assertTestOwnedSandboxName();
const apiKey = secrets.required("NVIDIA_API_KEY");
expect(apiKey.startsWith("nvapi-"), "NVIDIA_API_KEY must start with nvapi-").toBe(true);
const apiKey = secrets.required("NVIDIA_INFERENCE_API_KEY");
@jyaunches
jyaunches merged commit 3cedcbf into main Jun 25, 2026
90 of 115 checks passed
@jyaunches
jyaunches deleted the fix/vitest-only-nvidia-inference-key branch June 25, 2026 14:43
@github-actions

Copy link
Copy Markdown
Contributor

Vitest E2E Scenario Results — ❌ Some jobs failed

Run: 28176166049
Workflow ref: fix/vitest-only-nvidia-inference-key
Requested scenarios: (default — all supported)
Requested jobs: (default — all default-enabled free-standing jobs; explicit-only jobs such as jetson-nvmap-gpu-vitest are skipped unless selected)
Summary: 43 passed, 24 failed, 0 cancelled, 1 skipped

Job Result
agent-turn-latency-vitest ❌ failure
bedrock-runtime-compatible-anthropic-vitest ✅ success
brave-search-vitest ✅ success
channels-add-remove-vitest ❌ failure
channels-stop-start-vitest ✅ success
cloud-inference-vitest ✅ success
cloud-onboard-vitest ✅ success
common-egress-agent-vitest ✅ success
concurrent-gateway-ports-vitest ✅ success
credential-migration-vitest ✅ success
credential-sanitization-vitest ✅ success
cron-preflight-inference-local-vitest ❌ failure
device-auth-health-vitest ✅ success
diagnostics-vitest ❌ failure
double-onboard-vitest ✅ success
full-e2e-vitest ✅ success
gateway-drift-preflight-vitest ✅ success
gateway-guard-recovery ❌ failure
gateway-health-honest-vitest ✅ success
generate-matrix ✅ success
gpu-double-onboard-vitest ✅ success
gpu-e2e-vitest ✅ success
hermes-discord-vitest ✅ success
hermes-e2e-vitest ❌ failure
hermes-inference-switch-vitest ❌ failure
hermes-root-entrypoint-smoke-vitest ✅ success
hermes-sandbox-secret-boundary-vitest ✅ success
hermes-slack-vitest ✅ success
inference-routing-vitest ✅ success
issue-2478-crash-loop-recovery-vitest ✅ success
issue-4434-tui-unreachable-inference-vitest ❌ failure
issue-4462-scope-upgrade-approval-vitest ❌ failure
jetson-nvmap-gpu-vitest ⏭️ skipped
kimi-inference-compat-vitest ❌ failure
launchable-smoke-vitest ❌ failure
live-scenarios ❌ failure
messaging-compatible-endpoint-vitest ✅ success
messaging-providers-vitest ❌ failure
model-router-provider-routed-inference-vitest ❌ failure
network-policy-vitest ❌ failure
ollama-auth-proxy-vitest ✅ success
onboard-negative-paths-vitest ✅ success
onboard-repair-vitest ✅ success
onboard-resume-vitest ✅ success
openclaw-discord-pairing-vitest ❌ failure
openclaw-inference-switch-vitest ✅ success
openclaw-skill-cli-vitest ✅ success
openclaw-slack-pairing-vitest ✅ success
openclaw-tui-chat-correlation-vitest ❌ failure
openshell-gateway-upgrade-vitest ❌ failure
openshell-version-pin-vitest ✅ success
overlayfs-autofix-vitest ✅ success
rebuild-hermes-stale-base-vitest ✅ success
rebuild-hermes-vitest ✅ success
rebuild-openclaw-vitest ❌ failure
runtime-overrides-vitest ✅ success
sandbox-rebuild-vitest ❌ failure
sandbox-survival-vitest ❌ failure
sessions-agents-cli-vitest ❌ failure
shields-config-vitest ✅ success
skill-agent-vitest ✅ success
snapshot-commands-vitest ✅ success
spark-install-vitest ❌ failure
state-backup-restore-vitest ❌ failure
telegram-injection-vitest ✅ success
token-rotation-vitest ✅ success
tunnel-lifecycle-vitest ✅ success
upgrade-stale-sandbox-vitest ✅ success

Explicit-only jobs skipped: jetson-nvmap-gpu-vitest (default dispatch excludes Jetson until a stable Jetson runner is available; validate with jobs=jetson-nvmap-gpu-vitest or scenarios=jetson-nvmap-gpu).

Failed jobs: agent-turn-latency-vitest, channels-add-remove-vitest, cron-preflight-inference-local-vitest, diagnostics-vitest, gateway-guard-recovery, hermes-e2e-vitest, hermes-inference-switch-vitest, issue-4434-tui-unreachable-inference-vitest, issue-4462-scope-upgrade-approval-vitest, kimi-inference-compat-vitest, launchable-smoke-vitest, live-scenarios, messaging-providers-vitest, model-router-provider-routed-inference-vitest, network-policy-vitest, openclaw-discord-pairing-vitest, openclaw-tui-chat-correlation-vitest, openshell-gateway-upgrade-vitest, rebuild-openclaw-vitest, sandbox-rebuild-vitest, sandbox-survival-vitest, sessions-agents-cli-vitest, spark-install-vitest, state-backup-restore-vitest. Check run artifacts for logs.

Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
## Summary
- Route Vitest E2E workflow secret wiring through
NVIDIA_INFERENCE_API_KEY only.
- Update Vitest live tests/helpers to require/stage
NVIDIA_INFERENCE_API_KEY instead of NVIDIA_API_KEY.
- Update workflow boundary guards so Vitest jobs no longer depend on
secrets.NVIDIA_API_KEY.

## Scope
Vitest-only: .github/workflows/e2e-vitest-scenarios.yaml,
test/e2e-scenario/**, and tools/e2e-scenarios/workflow-boundary.mts.

## Validation
- npm test --
test/e2e-scenario/support-tests/e2e-scenarios-workflow.test.ts
test/e2e-scenario/support-tests/tunnel-lifecycle-workflow-boundary.test.ts
test/e2e-scenario/support-tests/spark-install-workflow-boundary.test.ts
test/e2e-scenario/support-tests/openclaw-discord-workflow-boundary.test.ts
test/e2e-scenario/support-tests/openclaw-slack-workflow-boundary.test.ts
test/e2e-scenario/support-tests/cloud-inference-provider-skip.test.ts
test/e2e-scenario/support-tests/network-policy-transient-provider.test.ts
- git diff --check
- rg NVIDIA_API_KEY .github/workflows/e2e-vitest-scenarios.yaml
test/e2e-scenario tools/e2e-scenarios (no matches)

Note: local all-test hooks are currently blocked by pre-existing local
fixture/build issues (missing nemoclaw/dist and
nemoclaw/node_modules/json5 in this worktree), so the commit/push used
targeted validation for this Vitest-only change.

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

## Release Notes

* **Chores**
* Updated E2E/Vitest GitHub workflow and scenario boundary validations
to use `NVIDIA_INFERENCE_API_KEY` (and to unset it where appropriate)
instead of `NVIDIA_API_KEY`.
* Enabled hosted-inference mode (`NEMOCLAW_E2E_USE_HOSTED_INFERENCE=1`)
and standardized how hosted inference configuration is propagated into
jobs and steps.

* **Tests**
* Refreshed live E2E scenarios and helpers to source inference
credentials via hosted-inference configuration, updating credential
redaction/leak checks and expected boundary/error messages accordingly.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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 chore Build, CI, dependency, or tooling maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants