Skip to content

test(e2e): hermeticize onboard resume - #5702

Merged
cv merged 10 commits into
mainfrom
fix/onboard-resume-hermetic-inference
Jun 25, 2026
Merged

test(e2e): hermeticize onboard resume#5702
cv merged 10 commits into
mainfrom
fix/onboard-resume-hermetic-inference

Conversation

@jyaunches

@jyaunches jyaunches commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • convert onboard-resume-e2e from hosted NVIDIA inference to a local fake OpenAI-compatible endpoint
  • build/install the source CLI + OpenShell in the nightly job instead of running install.sh auto-onboard against hosted inference
  • add workflow contract coverage that onboard-resume no longer consumes NVIDIA_INFERENCE_API_KEY or COMPATIBLE_API_KEY from GitHub secrets
  • establish the reusable test/e2e/lib/hermetic-compatible-inference.sh pattern for follow-on issue test(e2e): hermeticize bash E2E inference to reduce nightly 429s #5747 direct bash conversions

Test plan

  • git diff --check
  • bash -n test/e2e/test-onboard-resume.sh
  • npm run source-shape:check
  • npm test -- test/e2e-advisor-dispatch.test.ts test/e2e-script-workflow.test.ts
  • npm run build:cli
  • bash -n test/e2e/lib/hermetic-compatible-inference.sh

Note: full pre-commit Test (CLI) was skipped for commit because the local full-suite run currently fails on unrelated local environment/setup issues (missing nemoclaw/node_modules/json5, ssrf-parity plugin dist, one local timeout). Targeted workflow-contract validation passed.

Summary by CodeRabbit

Release Notes

  • Tests

    • Updated onboard-resume E2E to run against a locally reachable OpenAI-compatible fake endpoint with stronger authenticated-request validation and improved setup/teardown.
    • Tightened hermeticity checks to ensure hosted-inference-related configuration is not used.
    • Updated workflow-step routing expectations and added new assertions covering the hermetic compatible-inference flow.
  • Documentation

    • Added guidance for choosing hermetic compatible inference helpers and updated script prerequisites (no longer requires setting an NVIDIA inference key).
  • CI/Workflow

    • Reordered the nightly onboard-resume E2E job to use a Node-based build/CLI setup flow before running the E2E tests.

@coderabbitai

coderabbitai Bot commented Jun 24, 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
📝 Walkthrough

Walkthrough

The onboard-resume-e2e job now builds the CLI locally and runs against a hermetic fake OpenAI-compatible endpoint. The bash fixture and workflow tests were updated to match the new setup.

Changes

onboard-resume-e2e Hermetic Refactor

Layer / File(s) Summary
CI workflow: local build setup
.github/workflows/nightly-e2e.yaml
The onboard-resume-e2e job replaces the prior install step with Node.js setup, root dependency installation, CLI build, and OpenShell installation before the E2E test step.
Hermetic compatible-inference helper
test/e2e/lib/hermetic-compatible-inference.sh
The new helper derives a sandbox-reachable host IP, starts and stops the fake OpenAI-compatible API, unsets hosted-inference variables, and verifies authenticated inference requests in the fake endpoint log.
Onboard resume script: hermetic endpoint flow
test/e2e/test-onboard-resume.sh, test/e2e/README.md
The script updates its prerequisites, switches to the hermetic helper, starts the fake endpoint, checks /models, and asserts the fake endpoint handled authenticated inference; the README adds the matching usage notes.
Workflow tests: hermetic assertions
test/e2e-script-workflow.test.ts
The workflow test updates the hosted-secret step expectations, lowers the direct-secret threshold, and adds coverage for the hermetic compatible-inference path without hosted-inference env vars or the old CI helper.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

Possibly related PRs

  • NVIDIA/NemoClaw#5751 — This PR touches the same workflow-test area for hosted-inference routing expectations and environment-variable coverage.

Suggested labels

area: ci, v0.0.68

Suggested reviewers

  • cv

Poem

🐇 Hop, hop, the CLI is built with care,
A fake endpoint hums in the sandbox air.
No hosted secrets trail the run tonight,
Just tidy test hops and inference 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 clearly reflects the main change: making the onboard-resume E2E flow hermetic.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/onboard-resume-hermetic-inference

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

@github-code-quality

github-code-quality Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in the fix/onboard-resume-h... 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/onboard-resume-h... 2db77b4 +/-
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/onboard-resume-h... 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/onboard-resume-h... 2db77b4 +/-
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 70%
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 01:53 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ⚠️ Run cancelled — no signal

Run: 28066695405
Target ref: fix/onboard-resume-hermetic-inference
Workflow ref: main
Requested jobs: onboard-resume-e2e
Summary: 0 passed, 0 failed, 1 cancelled, 0 skipped

Job Result
onboard-resume-e2e ⚠️ cancelled

@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: onboard-resume-e2e
Optional E2E: onboard-repair-e2e

Dispatch hint: onboard-resume-e2e

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E

  • onboard-resume-e2e (medium): This is the job being converted from hosted NVIDIA inference secrets to a hermetic fake OpenAI-compatible endpoint. It is required to prove the updated workflow setup builds the CLI, installs OpenShell, starts the fake endpoint, completes interrupted onboard/resume, and verifies authenticated fake inference usage.

Optional E2E

  • onboard-repair-e2e (medium): Adjacent onboarding resume/repair coverage remains hosted and was not directly modified. Running it is useful confidence that the workflow edits did not unintentionally disturb neighboring onboarding lanes, but this PR is tests/workflow-only and does not modify onboard state-machine implementation.

New E2E recommendations

  • None.

Dispatch hint

  • Workflow: .github/workflows/nightly-e2e.yaml
  • jobs input: onboard-resume-e2e

@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Vitest E2E Scenario Recommendation

Required Vitest E2E scenarios: None
Optional Vitest E2E scenarios: None

Workflow run

Full Vitest E2E advisor summary

Vitest E2E Scenario Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required Vitest E2E scenarios

  • None. Changes are limited to the legacy nightly/direct bash E2E workflow and test/e2e scripts/docs/tests outside test/e2e-scenario, with no changes to the Vitest scenario workflow, registry, runtime support, live tests, or shared Vitest fixtures. No Vitest E2E scenario dispatch is required.

Optional Vitest E2E scenarios

  • None.

Relevant changed files

  • None.

@github-actions

github-actions Bot commented Jun 24, 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 · 4 test follow-ups
Since last review: 0 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: Runtime validation
  • PRA-T3 Add or justify test follow-up: Runtime validation
  • PRA-T4 Add or justify test follow-up: Runtime validation
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 — Run or identify onboard-resume-e2e, or equivalently bash test/e2e/test-onboard-resume.sh in a Docker/OpenShell environment, proving the sandbox reaches the fake OpenAI-compatible endpoint via FAKE_OPENAI_PUBLIC_HOST, the fake endpoint records an authenticated inference POST, and explicit onboard --resume succeeds with NVIDIA_INFERENCE_API_KEY and COMPATIBLE_API_KEY absent from the resume environment.. Static workflow-contract coverage is strong, but the changed behavior crosses GitHub Actions workflow setup, repo-local CLI build, OpenShell installation, Docker/OpenShell sandbox networking, fake endpoint authentication, and persisted compatible credential hydration.
  • PRA-T2 Runtime validation — Run or identify shell syntax validation for both changed bash files: bash -n test/e2e/test-onboard-resume.sh and bash -n test/e2e/lib/hermetic-compatible-inference.sh.. Static workflow-contract coverage is strong, but the changed behavior crosses GitHub Actions workflow setup, repo-local CLI build, OpenShell installation, Docker/OpenShell sandbox networking, fake endpoint authentication, and persisted compatible credential hydration.
  • PRA-T3 Runtime validation — Run or identify static workflow/source-shape validation for this change: npm test -- test/e2e-advisor-dispatch.test.ts test/e2e-script-workflow.test.ts, npm run source-shape:check, and git diff --check.. Static workflow-contract coverage is strong, but the changed behavior crosses GitHub Actions workflow setup, repo-local CLI build, OpenShell installation, Docker/OpenShell sandbox networking, fake endpoint authentication, and persisted compatible credential hydration.
  • PRA-T4 Runtime validation — Run or identify npm run build:cli, matching the new onboard-resume-e2e workflow path that builds the repo-local CLI before invoking the bash E2E.. Static workflow-contract coverage is strong, but the changed behavior crosses GitHub Actions workflow setup, repo-local CLI build, OpenShell installation, Docker/OpenShell sandbox networking, fake endpoint authentication, and persisted compatible credential hydration.

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)
test/e2e-script-workflow.test.ts (1)

1035-1041: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Strengthen hermiticity assertions for secret/env routing.

Line 1036 verifies -u NVIDIA_INFERENCE_API_KEY, but the contract also depends on unsetting GITHUB_TOKEN and keeping hosted-inference env knobs off the run step. Add explicit assertions so regressions are caught immediately.

Suggested test hardening
     expect(installOpenShellStep?.run).toContain("scripts/install-openshell.sh");
     expect(installOpenShellStep?.run).toContain("-u NVIDIA_INFERENCE_API_KEY");
+    expect(installOpenShellStep?.run).toContain("-u GITHUB_TOKEN");
     expect(runStep?.env?.NVIDIA_INFERENCE_API_KEY).toBeUndefined();
     expect(runStep?.env?.COMPATIBLE_API_KEY).toBeUndefined();
     expect(runStep?.env?.NEMOCLAW_ENDPOINT_URL).toBeUndefined();
     expect(runStep?.env?.NEMOCLAW_PROVIDER).toBeUndefined();
+    expect(runStep?.env?.NEMOCLAW_E2E_USE_HOSTED_INFERENCE).toBeUndefined();
+    expect(runStep?.env?.NEMOCLAW_MODEL).toBeUndefined();
+    expect(runStep?.env?.NEMOCLAW_COMPAT_MODEL).toBeUndefined();
+    expect(runStep?.env?.NEMOCLAW_PREFERRED_API).toBeUndefined();

As per path instructions, the onboard-resume job must avoid hosted-inference secrets/env wiring and preserve hermetic local-endpoint behavior.

🤖 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-script-workflow.test.ts` around lines 1035 - 1041, The test
assertions for the onboard-resume job need strengthening to catch regressions in
secret and environment variable routing. In addition to the existing assertion
that checks for "-u NVIDIA_INFERENCE_API_KEY" in the installOpenShellStep?.run,
add an explicit assertion to verify that "-u GITHUB_TOKEN" is also present in
the installOpenShellStep?.run to ensure the script is unsetting the GitHub
token. Additionally, add explicit assertions to verify that any hosted-inference
related environment variables are not present on the runStep?.env object to
maintain hermetic local-endpoint behavior and prevent accidental wiring of
hosted-inference secrets.

Source: Path instructions

🤖 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 `@test/e2e-script-workflow.test.ts`:
- Around line 1035-1041: The test assertions for the onboard-resume job need
strengthening to catch regressions in secret and environment variable routing.
In addition to the existing assertion that checks for "-u
NVIDIA_INFERENCE_API_KEY" in the installOpenShellStep?.run, add an explicit
assertion to verify that "-u GITHUB_TOKEN" is also present in the
installOpenShellStep?.run to ensure the script is unsetting the GitHub token.
Additionally, add explicit assertions to verify that any hosted-inference
related environment variables are not present on the runStep?.env object to
maintain hermetic local-endpoint behavior and prevent accidental wiring of
hosted-inference secrets.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 55b28b1e-cbd0-49f7-a92d-e572335d0c66

📥 Commits

Reviewing files that changed from the base of the PR and between 9ad9b5d and 92e88a0.

📒 Files selected for processing (3)
  • .github/workflows/nightly-e2e.yaml
  • test/e2e-script-workflow.test.ts
  • test/e2e/test-onboard-resume.sh

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 28066708126
Target ref: fix/onboard-resume-hermetic-inference
Requested jobs: onboard-resume-e2e
Summary: 1 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
onboard-resume-e2e ✅ success

@jyaunches
jyaunches requested a review from cv June 24, 2026 01:35
@wscurran wscurran added area: e2e End-to-end tests, nightly failures, or validation infrastructure chore Build, CI, dependency, or tooling maintenance labels Jun 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 28122464627
Target ref: fix/onboard-resume-hermetic-inference
Requested jobs: onboard-resume-e2e
Summary: 1 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
onboard-resume-e2e ✅ success

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 28136867216
Target ref: fix/onboard-resume-hermetic-inference
Requested jobs: onboard-resume-e2e
Summary: 1 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
onboard-resume-e2e ✅ success

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 28141810361
Target ref: fix/onboard-resume-hermetic-inference
Requested jobs: onboard-resume-e2e
Summary: 1 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
onboard-resume-e2e ✅ success

@cv
cv merged commit 0a6569f into main Jun 25, 2026
112 checks passed
@cv
cv deleted the fix/onboard-resume-hermetic-inference branch June 25, 2026 18:44
@cv cv added the v0.0.69 label Jun 26, 2026
jyaunches added a commit that referenced this pull request Jun 26, 2026
## Summary
Restore issue #5849 parity package `Package A` for merged bash-suite
deltas from #5702 only.

This moves the `onboard-resume-vitest` path to the same hermetic fake
OpenAI-compatible contract as the late bash guard:
- no `NVIDIA_INFERENCE_API_KEY` / hosted `COMPATIBLE_API_KEY` workflow
dependency
- local fake OpenAI-compatible endpoint started by the Vitest
- authenticated fake endpoint request capture asserted
- resume runs with both hosted secret env vars absent and must hydrate
from gateway/session state

## Related Issues
Refs #5849
Refs #5702

## Scope gate
- Package: `Package A`
- Included PRs all merged and touched `test/e2e`: yes — #5702 touched
`test/e2e/README.md`, `test/e2e/lib/hermetic-compatible-inference.sh`,
`test/e2e/test-onboard-resume.sh`
- Out of scope: unmerged/non-bash PRs; shell lane retirement / PR #5756
cleanup

## Parity map
| ID | Source PR | Contract | Inference classification | Vitest
assertion / waiver | Status |
| --- | --- | --- | --- | --- | --- |
| A1 | #5702 | Onboard-resume uses a local fake OpenAI-compatible
endpoint instead of hosted NVIDIA inference secrets. |
`hermetic-default` | `test/e2e-scenario/live/onboard-resume.test.ts`
starts `startFakeOpenAiCompatibleServer`, sets
`NEMOCLAW_PROVIDER=custom` + `COMPATIBLE_API_KEY` only for first
onboard, and asserts fake authenticated inference requests. | covered |
| A2 | #5702 | Resume run removes both `NVIDIA_INFERENCE_API_KEY` and
`COMPATIBLE_API_KEY`, proving credential recovery comes from
gateway/session state. | `hermetic-default` |
`test/e2e-scenario/live/onboard-resume.test.ts` builds resume env from
fixture allowlist and asserts both secret env vars are undefined. |
covered |
| A3 | #5702 | Selective Vitest workflow routing must not inject hosted
inference secrets into onboard-resume. | `hermetic-default` |
`.github/workflows/e2e-vitest-scenarios.yaml` removes hosted env/model
wiring; `test/e2e-scenario/support-tests/e2e-scenarios-workflow.test.ts`
guards the workflow shape. | covered |
| A4 | #5702 | Legacy bash workflow remains hermetic until shell
retirement. | `hermetic-default` | Existing
`test/e2e-script-workflow.test.ts` guard still covers `nightly-e2e.yaml`
/ bash lane shape. | already covered |

## Inference mode support
- Default mode for touched live targets: `mock/hermetic`
- Real inference support preserved: not applicable; this package
explicitly removes hosted inference dependency for onboard-resume
- Modes validated in this PR: hermetic/source-shape locally; selective
`onboard-resume-vitest` workflow required for full live Docker/OpenShell
execution
- If not validated with real inference: real inference is not required
by `hermetic-default`; the regression contract is fake-compatible
auth/request capture without hosted secrets

## Validation
- [x] `git diff --check`
- [x] `npx vitest run --project e2e-vitest-support
test/e2e-scenario/support-tests/e2e-scenarios-workflow.test.ts`
- [x] `npx tsc --noEmit --allowImportingTsExtensions --module ESNext
--moduleResolution Bundler --target ES2022 --types node,vitest/globals
--skipLibCheck test/e2e-scenario/live/onboard-resume.test.ts`
- [x] `npx vitest run test/e2e-script-workflow.test.ts`
- [x] selective `onboard-resume-vitest` workflow:
https://github.com/NVIDIA/NemoClaw/actions/runs/28241580508

## Follow-ups / waivers
- None.


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

* **Bug Fixes**
* Improved the resume onboarding flow to work with a local compatible
inference endpoint instead of relying on hosted credentials.
* Tightened credential handling so sensitive keys are no longer passed
into the related setup and test steps.
* Updated end-to-end coverage to verify the workflow runs without
injecting inference secrets and still completes successfully.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
## Summary
- convert onboard-resume-e2e from hosted NVIDIA inference to a local
fake OpenAI-compatible endpoint
- build/install the source CLI + OpenShell in the nightly job instead of
running install.sh auto-onboard against hosted inference
- add workflow contract coverage that onboard-resume no longer consumes
NVIDIA_INFERENCE_API_KEY or COMPATIBLE_API_KEY from GitHub secrets
- establish the reusable `test/e2e/lib/hermetic-compatible-inference.sh`
pattern for follow-on issue NVIDIA#5747 direct bash conversions

## Test plan
- git diff --check
- bash -n test/e2e/test-onboard-resume.sh
- npm run source-shape:check
- npm test -- test/e2e-advisor-dispatch.test.ts
test/e2e-script-workflow.test.ts
- npm run build:cli
- bash -n test/e2e/lib/hermetic-compatible-inference.sh

Note: full pre-commit Test (CLI) was skipped for commit because the
local full-suite run currently fails on unrelated local
environment/setup issues (missing nemoclaw/node_modules/json5,
ssrf-parity plugin dist, one local timeout). Targeted workflow-contract
validation passed.

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

## Release Notes

* **Tests**
* Updated onboard-resume E2E to run against a locally reachable
OpenAI-compatible fake endpoint with stronger authenticated-request
validation and improved setup/teardown.
* Tightened hermeticity checks to ensure hosted-inference-related
configuration is not used.
* Updated workflow-step routing expectations and added new assertions
covering the hermetic compatible-inference flow.

* **Documentation**
* Added guidance for choosing hermetic compatible inference helpers and
updated script prerequisites (no longer requires setting an NVIDIA
inference key).

* **CI/Workflow**
* Reordered the nightly onboard-resume E2E job to use a Node-based
build/CLI setup flow before running the E2E tests.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
## Summary
Restore issue NVIDIA#5849 parity package `Package A` for merged bash-suite
deltas from NVIDIA#5702 only.

This moves the `onboard-resume-vitest` path to the same hermetic fake
OpenAI-compatible contract as the late bash guard:
- no `NVIDIA_INFERENCE_API_KEY` / hosted `COMPATIBLE_API_KEY` workflow
dependency
- local fake OpenAI-compatible endpoint started by the Vitest
- authenticated fake endpoint request capture asserted
- resume runs with both hosted secret env vars absent and must hydrate
from gateway/session state

## Related Issues
Refs NVIDIA#5849
Refs NVIDIA#5702

## Scope gate
- Package: `Package A`
- Included PRs all merged and touched `test/e2e`: yes — NVIDIA#5702 touched
`test/e2e/README.md`, `test/e2e/lib/hermetic-compatible-inference.sh`,
`test/e2e/test-onboard-resume.sh`
- Out of scope: unmerged/non-bash PRs; shell lane retirement / PR NVIDIA#5756
cleanup

## Parity map
| ID | Source PR | Contract | Inference classification | Vitest
assertion / waiver | Status |
| --- | --- | --- | --- | --- | --- |
| A1 | NVIDIA#5702 | Onboard-resume uses a local fake OpenAI-compatible
endpoint instead of hosted NVIDIA inference secrets. |
`hermetic-default` | `test/e2e-scenario/live/onboard-resume.test.ts`
starts `startFakeOpenAiCompatibleServer`, sets
`NEMOCLAW_PROVIDER=custom` + `COMPATIBLE_API_KEY` only for first
onboard, and asserts fake authenticated inference requests. | covered |
| A2 | NVIDIA#5702 | Resume run removes both `NVIDIA_INFERENCE_API_KEY` and
`COMPATIBLE_API_KEY`, proving credential recovery comes from
gateway/session state. | `hermetic-default` |
`test/e2e-scenario/live/onboard-resume.test.ts` builds resume env from
fixture allowlist and asserts both secret env vars are undefined. |
covered |
| A3 | NVIDIA#5702 | Selective Vitest workflow routing must not inject hosted
inference secrets into onboard-resume. | `hermetic-default` |
`.github/workflows/e2e-vitest-scenarios.yaml` removes hosted env/model
wiring; `test/e2e-scenario/support-tests/e2e-scenarios-workflow.test.ts`
guards the workflow shape. | covered |
| A4 | NVIDIA#5702 | Legacy bash workflow remains hermetic until shell
retirement. | `hermetic-default` | Existing
`test/e2e-script-workflow.test.ts` guard still covers `nightly-e2e.yaml`
/ bash lane shape. | already covered |

## Inference mode support
- Default mode for touched live targets: `mock/hermetic`
- Real inference support preserved: not applicable; this package
explicitly removes hosted inference dependency for onboard-resume
- Modes validated in this PR: hermetic/source-shape locally; selective
`onboard-resume-vitest` workflow required for full live Docker/OpenShell
execution
- If not validated with real inference: real inference is not required
by `hermetic-default`; the regression contract is fake-compatible
auth/request capture without hosted secrets

## Validation
- [x] `git diff --check`
- [x] `npx vitest run --project e2e-vitest-support
test/e2e-scenario/support-tests/e2e-scenarios-workflow.test.ts`
- [x] `npx tsc --noEmit --allowImportingTsExtensions --module ESNext
--moduleResolution Bundler --target ES2022 --types node,vitest/globals
--skipLibCheck test/e2e-scenario/live/onboard-resume.test.ts`
- [x] `npx vitest run test/e2e-script-workflow.test.ts`
- [x] selective `onboard-resume-vitest` workflow:
https://github.com/NVIDIA/NemoClaw/actions/runs/28241580508

## Follow-ups / waivers
- None.


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

* **Bug Fixes**
* Improved the resume onboarding flow to work with a local compatible
inference endpoint instead of relying on hosted credentials.
* Tightened credential handling so sensitive keys are no longer passed
into the related setup and test steps.
* Updated end-to-end coverage to verify the workflow runs without
injecting inference secrets and still completes successfully.
<!-- 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: 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.

3 participants