Skip to content

test(e2e): add Vitest live coverage for onboard resume#5147

Merged
jyaunches merged 17 commits into
mainfrom
e2e-migrate/test-onboard-resume
Jun 11, 2026
Merged

test(e2e): add Vitest live coverage for onboard resume#5147
jyaunches merged 17 commits into
mainfrom
e2e-migrate/test-onboard-resume

Conversation

@jyaunches

@jyaunches jyaunches commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a focused Vitest live test for the onboard resume disruption-recovery contract from test/e2e/test-onboard-resume.sh.

This is intentionally a minimal coverage slice, not a migration closeout:

  • Keeps the legacy onboard-resume-e2e bash lane scheduled for now.
  • Does not update the repo-local migration ledger.
  • Does not add a new workflow lane.
  • Does not add shared sandbox helpers for a single assertion.

Related Issue

Refs #4348
Refs #5098
Refs #446

Test shape

test/e2e-scenario/live/onboard-resume.test.ts drives the real nemoclaw onboard CLI through the deterministic E2E failure-injection hook, then resumes with NVIDIA_API_KEY omitted from the resume environment to verify credential hydration from session state.

Assertion chain:

  1. CLI exists, Docker is running, OpenShell is installed, and NVIDIA_API_KEY is available.
  2. First onboard run fails at policies via NEMOCLAW_E2E_FAILURE_INJECTION / NEMOCLAW_E2E_FORCE_FAIL_AT_STEP.
  3. Sandbox exists after interruption and the session file records failed state.
  4. nemoclaw onboard --resume --non-interactive completes without rerunning cached preflight/gateway/sandbox steps.
  5. Sandbox remains manageable and the session file records complete state.
  6. Cleanup asserts final sandbox absence and session-file absence.

Simplicity check

  • Test shape: simple live Vitest test.
  • New shared helpers: none.
  • New framework/registry/ledger: none.
  • Workflow changes: none; bash lane retirement remains a later PR if/when approved.
  • Artifact hygiene: writes minimal session summaries instead of full session objects.

Validation


Signed-off-by: Julie Yaunches jyaunches@nvidia.com

Summary by CodeRabbit

  • Tests
    • Added end-to-end test coverage for onboarding resume functionality, validating failure recovery, session persistence, and credential hydration across multiple phases to ensure reliable resumption of interrupted operations.

Begin migration of test/e2e/test-onboard-resume.sh into the typed Vitest
E2E scenario framework as a free-standing live test under
test/e2e-scenario/live/onboard-resume.test.ts.

Refs: #4348, #5098
@jyaunches jyaunches added the area: e2e End-to-end tests, nightly failures, or validation infrastructure label Jun 10, 2026
@copy-pr-bot

copy-pr-bot Bot commented Jun 10, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Jun 10, 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

This PR adds a comprehensive live Vitest e2e test (onboard-resume) that validates the nemoclaw onboard disruption-recovery flow: forcing a failure at the policies step during initial onboarding, verifying session state and sandbox persistence, resuming the onboard, and confirming successful completion with credential hydration from the session file.

Changes

Live onboard-resume disruption-recovery test

Layer / File(s) Summary
Test setup and session interfaces
test/e2e-scenario/live/onboard-resume.test.ts
Defines TypeScript session state shapes for interrupted and complete onboarding, provides constants for NemoClaw CLI and config file paths, and implements helper functions for reading session JSON, summarizing state transitions, and recursively searching registry tokens.
Test gate and cleanup wiring
test/e2e-scenario/live/onboard-resume.test.ts
Implements live test gate with prerequisites (CLI existence, Docker, openshell, NVIDIA_API_KEY), performs pre-cleanup to remove leftover artifacts, and registers end-of-test cleanup assertions for artifact removal and sandbox non-existence.
Phase 2: Forced onboard failure at policies
test/e2e-scenario/live/onboard-resume.test.ts
Runs onboard with env-driven failure injection; asserts non-zero exit, validates log markers for sandbox creation and failure, verifies persistent session state with status: failed, lastCompletedStep: openclaw, failure.step: policies, and writes interrupted-session artifact.
Phase 3: Resume to successful completion
test/e2e-scenario/live/onboard-resume.test.ts
Runs resume without NVIDIA_API_KEY to test session-file credential recovery; asserts zero exit, validates resume caching, checks sandbox status, verifies session transitions to status: complete with provider: nvidia-prod and all step statuses complete, and confirms registry contains sandbox name.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • NVIDIA/NemoClaw#4531: Adds live onboarding e2e coverage around nemoclaw onboard resume behavior with FSM slice runner phase ordering validation.

Suggested labels

area: onboarding

Suggested reviewers

  • cv
  • prekshivyas

Poem

🐰 A session once stumbled at policies gate,
But our test cried "Resume!"—no need to wait,
Through JSON we hydrate, from session we sip,
Your onboard survives every disruptive skip. ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 45.57% 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 accurately describes the primary change: adding a Vitest live test for the onboard-resume functionality. It is concise, specific, and clearly conveys the main contribution.
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 e2e-migrate/test-onboard-resume

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

@github-actions

github-actions Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

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

Dispatch hint: onboard-resume-e2e

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E

  • None.

Optional E2E

  • onboard-resume-e2e (high): Optional confidence check for the same onboard resume contract covered by the existing legacy nightly lane. This PR is tests-only, so it should not be merge-blocking, but running the existing job can confirm the underlying live onboarding/resume flow remains healthy while adding parallel Vitest coverage.

New E2E recommendations

  • onboarding-resume-coverage (medium): The new Vitest live scenario is under the e2e-scenarios-live project glob, but the existing dispatchable onboard-resume-e2e job still runs the legacy bash test. Add or update a named workflow lane to run NEMOCLAW_RUN_E2E_SCENARIOS=1 npx vitest run --project e2e-scenarios-live test/e2e-scenario/live/onboard-resume.test.ts before relying on this new test in selective CI.
    • Suggested test: vitest-live-onboard-resume-e2e

Dispatch hint

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

@github-actions

github-actions Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Vitest E2E Scenario Recommendation

Required Vitest E2E scenarios: e2e-scenarios-all
Optional Vitest E2E scenarios: None

Dispatch required Vitest E2E scenarios:

  • 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

  • e2e-scenarios-all: The PR adds a new free-standing live Vitest E2E test under test/e2e-scenario/live. It is directly scenario-relevant, but there is no trusted-main live-supported typed scenario ID for this new test surface; use the Vitest scenario fan-out rather than inventing or targeting an unsupported ID.
    • Dispatch: gh workflow run e2e-vitest-scenarios.yaml --ref <pr-head-ref>

Optional Vitest E2E scenarios

  • None.

Relevant changed files

  • test/e2e-scenario/live/onboard-resume.test.ts

Mirrors `openshell sandbox get <name>` exit-code probe from
test/e2e/test-onboard-resume.sh. Lives on SandboxClient (not host) per
fix-location convention: openshell-area helpers belong with the existing
sandbox.list / sandbox.status wrappers.

`exists()` returns boolean from exit code so callers can branch on
sandbox presence without bridging through assertExitZero.

Refs: #4348, #5098
@github-actions

github-actions Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor

Findings: 1 needs attention, 1 worth checking, 0 nice ideas
Since last review: 0 prior items resolved, 2 still apply, 0 new items found

Review findings

🛠️ Needs attention

  • Final session check expects agent_setup complete on the OpenClaw path (test/e2e-scenario/live/onboard-resume.test.ts:328): The migrated live test requires `agent_setup` to be `complete` after an OpenClaw/no-agent onboard resume. That is not part of the legacy bash contract and contradicts the current product implementation and unit-test source of truth: the default OpenClaw branch completes `openclaw` and records `agent_setup` as skipped. This can make the new live test fail against current behavior or encode the wrong session-state contract.
    • Recommendation: Remove `agent_setup` from the complete-step loop, or assert the actual OpenClaw-path state such as `complete.steps.agent_setup.status === "skipped"`. If the intended product contract is changing to mark `agent_setup` complete, land that product change and focused unit coverage separately from this migration test.
    • Evidence: The loop includes `"agent_setup"` and asserts `complete.steps[step]?.status` is `"complete"`. In `src/lib/onboard/machine/handlers/agent-setup.ts`, the no-agent path calls `recordStepSkipped("agent_setup")`; `src/lib/state/onboard-session.ts` `markStepSkipped` sets `step.status = "skipped"`, and `completeSession()` does not rewrite skipped steps. Existing `src/lib/onboard/machine/handlers/agent-setup.test.ts` expects `agent_setup` skipped for OpenClaw/default-agent paths. The legacy `test/e2e/test-onboard-resume.sh` final session check asserts preflight, gateway, sandbox, provider_selection, inference, openclaw, and policies complete, but does not assert agent_setup complete.

🔎 Worth checking

  • Source-of-truth review needed: Final completed session step-state contract for agent_setup: The advisor marked localized patch analysis as needs_followup.
    • Recommendation: Identify the invalid state, source boundary, source-fix constraint, regression test, and removal condition before merging the localized behavior.
    • Evidence: `onboard-resume.test.ts` includes `"agent_setup"` in the final complete-step loop. `handleAgentSetupState` calls `recordStepSkipped("agent_setup")`; `markStepSkipped` sets `status = "skipped"`; legacy bash does not assert `agent_setup` complete.

🌱 Nice ideas

  • None.
Consider writing more tests for
  • **Acceptance clause:** Linked issue/comment acceptance clauses — add test evidence or identify existing coverage. Deterministic context provided `linkedIssues: []`; no trusted linked issue or comment clauses were available to quote. PR-body references to Phase 2: Onboarding and Installer Audit Coverage (E2E audit-coverage) #4348, Epic: Migrate legacy bash E2E into the Vitest E2E system #5098, and nemoclaw onboard` is not resumable — partial failures require full cleanup and restart #446 were treated as untrusted descriptive evidence only.
  • **Acceptance clause:** `nemoclaw onboard --resume --non-interactive` skips cached preflight, gateway, and sandbox work, then completes by hydrating the stored credential. — add test evidence or identify existing coverage. The resume run omits `NVIDIA_API_KEY` from the child env, asserts resume exit 0, cached skip messages for preflight/gateway/sandbox, absence of current 8-step rerun labels, manageable sandbox status, final session completion, and registry presence. However, the final session assertion also requires `agent_setup` complete, which is outside the legacy clause and conflicts with current OpenClaw/no-agent source code that records that step skipped.
  • **Final completed session step-state contract for agent_setup** — Existing `src/lib/onboard/machine/handlers/agent-setup.test.ts` already expects `agent_setup` skipped for OpenClaw/default-agent paths; the new live test should assert the same or omit the step from the complete-step loop.. `onboard-resume.test.ts` includes `"agent_setup"` in the final complete-step loop. `handleAgentSetupState` calls `recordStepSkipped("agent_setup")`; `markStepSkipped` sets `status = "skipped"`; legacy bash does not assert `agent_setup` complete.
Since last review details

Current findings:

  • Source-of-truth review needed: Final completed session step-state contract for agent_setup: The advisor marked localized patch analysis as needs_followup.
    • Recommendation: Identify the invalid state, source boundary, source-fix constraint, regression test, and removal condition before merging the localized behavior.
    • Evidence: `onboard-resume.test.ts` includes `"agent_setup"` in the final complete-step loop. `handleAgentSetupState` calls `recordStepSkipped("agent_setup")`; `markStepSkipped` sets `status = "skipped"`; legacy bash does not assert `agent_setup` complete.
  • Final session check expects agent_setup complete on the OpenClaw path (test/e2e-scenario/live/onboard-resume.test.ts:328): The migrated live test requires `agent_setup` to be `complete` after an OpenClaw/no-agent onboard resume. That is not part of the legacy bash contract and contradicts the current product implementation and unit-test source of truth: the default OpenClaw branch completes `openclaw` and records `agent_setup` as skipped. This can make the new live test fail against current behavior or encode the wrong session-state contract.
    • Recommendation: Remove `agent_setup` from the complete-step loop, or assert the actual OpenClaw-path state such as `complete.steps.agent_setup.status === "skipped"`. If the intended product contract is changing to mark `agent_setup` complete, land that product change and focused unit coverage separately from this migration test.
    • Evidence: The loop includes `"agent_setup"` and asserts `complete.steps[step]?.status` is `"complete"`. In `src/lib/onboard/machine/handlers/agent-setup.ts`, the no-agent path calls `recordStepSkipped("agent_setup")`; `src/lib/state/onboard-session.ts` `markStepSkipped` sets `step.status = "skipped"`, and `completeSession()` does not rewrite skipped steps. Existing `src/lib/onboard/machine/handlers/agent-setup.test.ts` expects `agent_setup` skipped for OpenClaw/default-agent paths. The legacy `test/e2e/test-onboard-resume.sh` final session check asserts preflight, gateway, sandbox, provider_selection, inference, openclaw, and policies complete, but does not assert agent_setup complete.

Workflow run details

This is an automated advisory review. A human maintainer must make the final merge decision.

Discrete free-standing job for the typed migration of
test/e2e/test-onboard-resume.sh, mirroring the openshell-version-pin-vitest
precedent from #5107. Uses bash install.sh to bootstrap openshell CLI and
node, then runs the live Vitest scenario with NVIDIA_API_KEY exposed.

Bash script remains scheduled under nightly-e2e `onboard-resume-e2e`;
this job runs only on workflow_dispatch until typed coverage soaks per
epic #5098 policy.

Refs: #4348, #5098
Migrates the assertion contracts from test/e2e/test-onboard-resume.sh
into a free-standing Vitest live test under test/e2e-scenario/live/.
Drives the real `nemoclaw onboard` CLI via NEMOCLAW_E2E_FAILURE_INJECTION
to deterministically fail at the policies step, then runs
`nemoclaw onboard --resume --non-interactive` with NVIDIA_API_KEY stripped
from the environment to prove credential hydration from the session file.

22 assertions, organized into Phase 1 (prereqs), Phase 2 (interrupted
onboard), and Phase 3 (resume completion). Uses SandboxClient.exists
(added in prior commit) for the `openshell sandbox get` probe; reads
the onboard session JSON inline for state assertions; registers
sandbox/session cleanup with the cleanup fixture.

Bash script at test/e2e/test-onboard-resume.sh kept untouched per epic
#5098 suite-separation rule until typed coverage soaks; it remains
scheduled in nightly-e2e.yaml under onboard-resume-e2e.

Refs: #446, #4348, #5098
@cv

cv commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Thanks for pushing the onboard-resume coverage forward. I think this needs a direction/stacking rework before it should join the #4941 / #5098 migration stack.

Post-#5106, the target state is one Vitest-driven E2E system: TypeScript tests, small shared Vitest fixtures/helpers, and workflow matrix/direct-job fanout where useful. We should avoid reviving a second runner, a separate "scenario framework" roadmap, or stale tracking files.

Concrete asks:

The SandboxClient.get/exists helper may still be a useful local helper if the migrated test needs it. The main blocker is the shape: no ledger update, no parallel soak lane, no second-framework framing.

Pass 1 of phase-5 convergence on dispatch 27283289318. First blocking
assertion: openshell-installed (#3 in chain), failing with
`spawn openshell ENOENT`.

Root cause: shell-probe.ts:127-129 \u2014 when inheritEnv is unset, the child
gets only options.env. My prereq probes passed no env, so spawn had no
PATH to resolve `openshell` against. The onboard runs worked only because
they used inheritEnv:true.

Fix: use buildAvailabilityProbeEnv() everywhere (framework allowlist
incl. PATH/HOME/CI; explicitly excludes NVIDIA_API_KEY). Layer the secret
explicitly only on the first onboard; the resume run's env deliberately
omits it to test credential hydration from the session file \u2014 this is
the typed expression of the bash test's `env -u NVIDIA_API_KEY` invariant.

Also drops inheritEnv:true on the onboard runs in favor of the same
allowlist composition pattern, matching OnboardingPhaseFixture.commandEnv.

Refs: #4348, #5098
Pass 2 of phase-5 convergence on dispatch 27284469157. Line moved
forward (75ms → 127s) clearing all Phase 1 prereqs and the Phase 2
first onboard. New blocking assertion: sandbox-exists-after-interrupt
(#9 in chain), failing again with `spawn openshell ENOENT` \u2014 same root
cause class as pass 1, missed during the previous fix because the
sandbox.exists() call passed no options so options.env was empty.

Fix: thread `env: buildAvailabilityProbeEnv()` into the exists() call.
The SandboxClient correctly does not auto-supply env (mirrors
HostCliClient.expectNemoclawAvailable convention \u2014 callers stay explicit
about the env boundary, helpers-not-bridges per #5049).

Refs: #4348, #5098
Convergence achieved on PR #5147 (epic #5098, owner #4348). Two
consecutive PASS dispatches confirmed the typed live test
(test/e2e-scenario/live/onboard-resume.test.ts) reproduces the bash
script's 22 assertions end-to-end:

  RED  (pass 1, openshell-installed):       runs/27283289318
  RED  (pass 2, sandbox-exists-after-i.):   runs/27284469157
  GREEN (pass 3, all 22 asserts, 144.3s):   runs/27285136703
  GREEN (verification, 140.5s):             runs/27285846914

Inventory transitions to covered. Bash guard at test/e2e/test-onboard-resume.sh
remains scheduled in nightly-e2e.yaml under onboard-resume-e2e until
typed coverage soaks per epic policy; deletion is a follow-up PR with
#4357 approval.

Refs: #446, #4348, #5098
@jyaunches jyaunches marked this pull request as ready for review June 10, 2026 15:20
Two PR-caused CI failures resolved in one batch (Batch-Safe Fix Policy:
same-class mechanical fixes, low risk, testable together):

1. cli-test-shards (1) / cli-tests / checks: the cli vitest project's
   glob 'test/**/*.test.{js,ts}' picks up test/e2e-scenario/live/**
   even though the e2e-scenarios-live project gates that directory on
   NEMOCLAW_RUN_E2E_SCENARIOS=1. Without the env var, this test ran in
   cli-test-shards (1) and failed at the openshell-installed prereq
   probe with spawn ENOENT — runner has no real openshell, no Docker,
   no NVIDIA_API_KEY. Add test.skipIf(!shouldRunLiveE2EScenarios()) so
   the test self-skips when the live gate isn't set, mirroring the
   project-level include glob.

2. static-checks (Files were modified by following hooks: biome format):
   biome reformatted the test body. Reformat is mechanical only, no
   semantic change.

Verified locally:
  - cli project (gate unset):        1 skipped, 0 failed
  - e2e-scenarios-live project:      test still discovered and runs
  - framework-tests e2e-clients:     23/23 pass
  - prek pre-push hooks:             all pass

ShellCheck SARIF check is also red but is ambient (recent PRs alternate
success/failure with the same 'Requires authentication' GH API error on
the SARIF upload step; permissions in code-scanning.yaml are correct).
Not addressed in this commit.

Refs: #4348, #5098
@cv

cv commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

#5126 is now green, so this PR should pause before ready review until it is rebased/reshaped onto the #5126 foundation. It still targets main, edits the removed legacy-inventory.json, uses framework-tests/, and carries “scenario framework” / inventory-transition framing that conflicts with the one Vitest E2E system direction. The onboard-resume coverage itself may be valuable, but the salvage path should be: retarget/rebase onto #5126, remove the ledger update, move tests to support-tests/, reword the body away from framework/runner/bridge taxonomy, and keep deletion evidence in PR text rather than repo-local state.

@cv

cv commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Update after #5126 moved the foundation to the fixtures namespace: the salvage path here should now be retarget/rebase onto #5126, remove the retired ledger update, move any support coverage under test/e2e-scenario/support-tests/ or live coverage under test/e2e-scenario/live/, and import shared helpers from test/e2e-scenario/fixtures/. Please also rename/reword away from “scenario framework” so the PR matches the one Vitest E2E system direction.

@jyaunches

jyaunches commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

Migration-principle review for #5098: this should stay a simple Vitest migration, not grow the old “scenario framework” path back in.

Reference from test/e2e-scenario/docs/MIGRATION.md: Vitest is the harness; fixtures are support code, not a second runner/framework; GitHub issues/PRs are the source of truth; add only the fixture/helper needed; preserve real shell/system boundaries from Vitest.

Concerns in this PR:

  • Title/body still frame this as a “scenario framework” migration.
  • It edits legacy-inventory.json, which test(e2e): simplify legacy migration tracking #5126 removes as stale repo-local migration state.
  • SandboxClient.get/exists may be okay if genuinely reused, but for this PR it looks like a convenience wrapper around one openshell sandbox get assertion.
  • Body says the bash lane remains scheduled; if this is not deleting/replacing the bash lane, it should be framed as an added live coverage slice, not a migration closeout.

Recommended path:

  • Treat this as a minimal live Vitest coverage slice first: keep test/e2e-scenario/live/onboard-resume.test.ts, drop legacy-inventory.json, rename title/body away from “scenario framework,” and explicitly say the bash lane remains until a later retirement PR.
  • Inline the one openshell sandbox get check unless SandboxClient.get/exists is already needed by another active migration. If shared, explain why a local helper was insufficient.

Other acceptable options:

  1. Full retirement PR: if the live test is fully equivalent and has soaked, delete test/e2e/test-onboard-resume.sh, remove its nightly workflow reference, and update the frozen workflow allowlist test in the same PR.
  2. Split helper first: if sandbox.exists/get is broadly useful, land a tiny fixture-support PR with unit tests, then keep this PR focused only on the onboard-resume test.

Suggested immediate changes:

  • Remove ledger edits.
  • Replace “framework” wording with “Vitest live test / fixtures.”
  • Add a short Simplicity check section:
    • Test shape: simple live Vitest test.
    • New shared helpers: none, or SandboxClient.get/exists with reuse justification.
    • New framework/registry/ledger: none.
    • Workflow changes: none for coverage-slice mode, or full lane removal for retirement mode.

Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
@jyaunches jyaunches changed the title test(e2e): migrate test-onboard-resume.sh to scenario framework test(e2e): add Vitest live coverage for onboard resume Jun 10, 2026
@prekshivyas prekshivyas self-assigned this Jun 10, 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

🤖 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/onboard-resume.test.ts`:
- Around line 317-318: The registry assertion currently uses a substring check
which can yield false positives; instead, read and parse the registry JSON from
REGISTRY_FILE (already read via fs.readFileSync), parse it with JSON.parse,
locate the sandbox name token within the parsed structure (e.g., the array or
object key that holds sandbox names), and assert equality against SANDBOX_NAME
(use strict equality or expect(...).toBe(SANDBOX_NAME)) so the test requires an
exact match; update the test around the existing fs.existsSync(REGISTRY_FILE)
check and replace the toContain assertion with the JSON parse + exact match
assertion referencing REGISTRY_FILE and SANDBOX_NAME.
🪄 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: f2d1e696-0c52-43f5-83cf-1a263902ebc7

📥 Commits

Reviewing files that changed from the base of the PR and between 5f60ed6 and 2b4c6ae.

📒 Files selected for processing (1)
  • test/e2e-scenario/live/onboard-resume.test.ts

Comment thread test/e2e-scenario/live/onboard-resume.test.ts Outdated
@copy-pr-bot

copy-pr-bot Bot commented Jun 10, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions

Copy link
Copy Markdown
Contributor

@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 (6)
tools/pr-review-advisor/analyze.mts (1)

1004-1021: 💤 Low value

Optional: Unnecessary nullable coalescing.

Line 1006 uses ?? [] for defensive null-handling, but retiredE2eMigrationLedgerChanges is typed as a required array field (line 166), not optional. The coalescing is harmless but unnecessary.

♻️ Optional simplification
-  for (const ledger of metadata.deterministic.retiredE2eMigrationLedgerChanges ?? []) {
+  for (const ledger of metadata.deterministic.retiredE2eMigrationLedgerChanges) {
🤖 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/pr-review-advisor/analyze.mts` around lines 1004 - 1021, The code uses
unnecessary null-coalescing on a required array: remove the defensive "?? []" in
addDeterministicFindings and iterate directly over
metadata.deterministic.retiredE2eMigrationLedgerChanges (which is typed as a
non-null array), so replace the for-loop source from
metadata.deterministic.retiredE2eMigrationLedgerChanges ?? [] to
metadata.deterministic.retiredE2eMigrationLedgerChanges to simplify the function
while preserving behavior.
docs/about/release-notes.mdx (1)

22-23: ⚡ Quick win

Split multi-sentence bullet lines into one sentence per source line.

Several changed bullets place multiple sentences on one source line, which breaks the docs diff/readability rule.

As per coding guidelines, docs require “One sentence per line in source (makes diffs readable).”

Also applies to: 27-28, 33-33

🤖 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 `@docs/about/release-notes.mdx` around lines 22 - 23, The two multi-sentence
bullet points in the release notes (the one starting "GPU sandbox creation and
local inference checks now match the runtime paths agents use..." and the one
starting "Onboarding and recovery fail earlier and stay quieter on common host
drift...") must be split so each sentence is on its own source line; update
those bullets (and the other noted bullets at lines 27-28 and 33) so every
sentence ends with a newline in the MDX source, preserving existing punctuation
and links (e.g., the reference links like [Use a Local Inference Server] and
[NemoClaw CLI Commands Reference]) and keeping exact wording but breaking them
into one-sentence-per-line for readable diffs.

Source: Coding guidelines

docs/reference/troubleshooting.mdx (1)

1135-1135: ⚡ Quick win

Keep exactly one sentence per source line in the new section.

These lines currently contain two sentences on the same source line; split them so each line contains a single sentence.

As per coding guidelines, “One sentence per line in source (makes diffs readable).”

Also applies to: 1142-1142, 1161-1161, 1168-1168

🤖 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 `@docs/reference/troubleshooting.mdx` at line 1135, The marked source lines
contain multiple sentences on the same line (e.g., the line mentioning
`controlui.bootstrap.config.json` and the other occurrences referenced); edit
the section so each sentence is on its own source line by splitting any line
that holds two sentences into two lines, ensuring every sentence in the new
section occupies exactly one line.

Source: Coding guidelines

test/hermes-gateway-wrapper.test.ts (1)

78-78: ⚡ Quick win

Use POSIX PATH separator : directly instead of path.delimiter.

The tests are already gated on process.platform === "linux" (line 35). Per repo convention, prefer the established POSIX PATH separator : when constructing process.env.PATH in tests, rather than path.delimiter. This aligns with the repo's Linux-only test execution on CI runners.

🔧 Proposed change
-      pathPrefix = `${evilBin}${path.delimiter}`;
+      pathPrefix = `${evilBin}:`;

Based on learnings: "In this repo's test suite, prefer the established POSIX PATH separator : when constructing process.env.PATH in tests (e.g., PATH: ${fakeBin}:${process.env.PATH || ""}``). Do not replace it with path.delimiter in these unit/integration tests, because they only run on Linux runners in CI here."

🤖 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/hermes-gateway-wrapper.test.ts` at line 78, The test sets pathPrefix
using path.delimiter which can vary by platform; since the test is gated to
Linux (process.platform === "linux"), replace path.delimiter with the POSIX
separator ':' when constructing pathPrefix (the variable assigned on the line
with pathPrefix = `${evilBin}${path.delimiter}`) so the test uses a stable ':'
separator consistent with other tests that build process.env.PATH.

Source: Learnings

test/e2e/test-cron-preflight-inference-local-e2e.sh (1)

35-35: 💤 Low value

Consider adding -e to the set flags for stricter error handling.

The script uses set -uo pipefail without -e. While the manual pass/fail tracking works, adding -e would make the script exit immediately on unexpected errors during setup (e.g., directory creation, file writes), which is safer for E2E tests. The pass/fail tracking logic in test assertions can still catch and handle expected failures explicitly.

🔧 Proposed change
-set -uo pipefail
+set -euo pipefail
🤖 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/test-cron-preflight-inference-local-e2e.sh` at line 35, The script's
shell flags are too permissive—update the top-level set invocation in
test-cron-preflight-inference-local-e2e.sh to include -e so the script exits on
unexpected errors; change the existing set -uo pipefail to set -euo pipefail (or
set -o errexit -uo pipefail) and verify any manual pass/fail tracking or traps
in the script still behave as intended after adding -e.
test/generate-openclaw-config-slack-allowlist.test.ts (1)

1-1: ⚡ Quick win

Verify whether @ts-nocheck is necessary.

The @ts-nocheck directive disables TypeScript checking for the entire file. This is unusual for test files in this repository. If there's a specific type issue with the buildConfig import or the any return types in the helpers, prefer fixing the types explicitly (e.g., proper type imports or targeted @ts-expect-error comments) rather than disabling all type checking. This improves type safety and catches potential bugs during development.

🤖 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/generate-openclaw-config-slack-allowlist.test.ts` at line 1, Remove the
top-level "// `@ts-nocheck`" and restore TypeScript checking; then fix the
specific type issues instead of disabling checks by importing or declaring the
correct type for the buildConfig import (use the repository's BuildConfig or
equivalent type) and replace any broad "any" return types in helper functions
with precise types or use targeted `@ts-expect-error` comments for individual
problematic lines; ensure symbols like buildConfig and any helper function names
in this test are properly typed so the file passes type-checking without
disabling it globally.
🤖 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 `@src/lib/onboard.ts`:
- Around line 2924-2949: The call to resolveDisabledChannels() currently runs
before pruneStaleSandboxEntry(sandboxName), allowing disabled channel state from
a stale registry row to leak into disabledChannels used by
enforceMessagingChannelConflicts; either move the
resolveDisabledChannels(sandboxName) invocation to after
pruneStaleSandboxEntry(sandboxName) completes, or change
resolveDisabledChannels/resolveDisabledChannels fallback logic so it does not
call registry.getDisabledChannels() for sandboxes that are not live (i.e.,
consult pruneStaleSandboxEntry or a gateway-liveness check first); update
references to disabledChannels/disabledChannelNames and the
enforceMessagingChannelConflicts call so they use the post-prune resolved value.

---

Nitpick comments:
In `@docs/about/release-notes.mdx`:
- Around line 22-23: The two multi-sentence bullet points in the release notes
(the one starting "GPU sandbox creation and local inference checks now match the
runtime paths agents use..." and the one starting "Onboarding and recovery fail
earlier and stay quieter on common host drift...") must be split so each
sentence is on its own source line; update those bullets (and the other noted
bullets at lines 27-28 and 33) so every sentence ends with a newline in the MDX
source, preserving existing punctuation and links (e.g., the reference links
like [Use a Local Inference Server] and [NemoClaw CLI Commands Reference]) and
keeping exact wording but breaking them into one-sentence-per-line for readable
diffs.

In `@docs/reference/troubleshooting.mdx`:
- Line 1135: The marked source lines contain multiple sentences on the same line
(e.g., the line mentioning `controlui.bootstrap.config.json` and the other
occurrences referenced); edit the section so each sentence is on its own source
line by splitting any line that holds two sentences into two lines, ensuring
every sentence in the new section occupies exactly one line.

In `@test/e2e/test-cron-preflight-inference-local-e2e.sh`:
- Line 35: The script's shell flags are too permissive—update the top-level set
invocation in test-cron-preflight-inference-local-e2e.sh to include -e so the
script exits on unexpected errors; change the existing set -uo pipefail to set
-euo pipefail (or set -o errexit -uo pipefail) and verify any manual pass/fail
tracking or traps in the script still behave as intended after adding -e.

In `@test/generate-openclaw-config-slack-allowlist.test.ts`:
- Line 1: Remove the top-level "// `@ts-nocheck`" and restore TypeScript checking;
then fix the specific type issues instead of disabling checks by importing or
declaring the correct type for the buildConfig import (use the repository's
BuildConfig or equivalent type) and replace any broad "any" return types in
helper functions with precise types or use targeted `@ts-expect-error` comments
for individual problematic lines; ensure symbols like buildConfig and any helper
function names in this test are properly typed so the file passes type-checking
without disabling it globally.

In `@test/hermes-gateway-wrapper.test.ts`:
- Line 78: The test sets pathPrefix using path.delimiter which can vary by
platform; since the test is gated to Linux (process.platform === "linux"),
replace path.delimiter with the POSIX separator ':' when constructing pathPrefix
(the variable assigned on the line with pathPrefix =
`${evilBin}${path.delimiter}`) so the test uses a stable ':' separator
consistent with other tests that build process.env.PATH.

In `@tools/pr-review-advisor/analyze.mts`:
- Around line 1004-1021: The code uses unnecessary null-coalescing on a required
array: remove the defensive "?? []" in addDeterministicFindings and iterate
directly over metadata.deterministic.retiredE2eMigrationLedgerChanges (which is
typed as a non-null array), so replace the for-loop source from
metadata.deterministic.retiredE2eMigrationLedgerChanges ?? [] to
metadata.deterministic.retiredE2eMigrationLedgerChanges to simplify the function
while preserving behavior.
🪄 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: cbe77e94-ddf9-479a-bef3-3a2de6dd1447

📥 Commits

Reviewing files that changed from the base of the PR and between 2b4c6ae and 0ab2c64.

📒 Files selected for processing (138)
  • .agents/skills/nemoclaw-user-configure-inference/SKILL.md
  • .agents/skills/nemoclaw-user-configure-security/references/best-practices.md
  • .agents/skills/nemoclaw-user-manage-sandboxes/references/backup-restore.md
  • .agents/skills/nemoclaw-user-overview/references/release-notes.md
  • .agents/skills/nemoclaw-user-reference/references/commands.md
  • .agents/skills/nemoclaw-user-reference/references/network-policies.md
  • .coderabbit.yaml
  • .github/workflows/nightly-e2e.yaml
  • Dockerfile
  • agents/hermes/Dockerfile
  • agents/hermes/hermes-wrapper.sh
  • agents/hermes/start.sh
  • agents/openclaw/manifest.yaml
  • ci/test-file-size-budget.json
  • docs/about/release-notes.mdx
  • docs/inference/use-local-inference.mdx
  • docs/manage-sandboxes/messaging-channels.mdx
  • docs/reference/commands-nemohermes.mdx
  • docs/reference/commands.mdx
  • docs/reference/troubleshooting.mdx
  • nemoclaw/src/commands/shields-status.test.ts
  • nemoclaw/src/commands/shields-status.ts
  • nemoclaw/src/commands/slash.test.ts
  • nemoclaw/src/commands/slash.ts
  • scripts/install.sh
  • scripts/ollama-auth-proxy.js
  • src/lib/actions/gateway-drift-preflight.test.ts
  • src/lib/actions/sandbox/policy-channel-conflict.test.ts
  • src/lib/actions/sandbox/policy-channel.ts
  • src/lib/actions/sandbox/snapshot.ts
  • src/lib/actions/upgrade-sandboxes.ts
  • src/lib/agent/defs.test.ts
  • src/lib/domain/maintenance/upgrade.test.ts
  • src/lib/domain/maintenance/upgrade.ts
  • src/lib/inference/model-prompts.test.ts
  • src/lib/inference/model-prompts.ts
  • src/lib/inference/ollama/proxy.ts
  • src/lib/inference/vllm-models.test.ts
  • src/lib/inference/vllm-models.ts
  • src/lib/inference/vllm-prompt.ts
  • src/lib/inference/vllm.test.ts
  • src/lib/inference/vllm.ts
  • src/lib/inventory/index.test.ts
  • src/lib/inventory/index.ts
  • src/lib/messaging/applier/conflict-detection-slack-gateway.test.ts
  • src/lib/messaging/applier/conflict-detection/index.ts
  • src/lib/messaging/applier/conflict-detection/slack-socket-mode.ts
  • src/lib/messaging/applier/conflict-detection/types.ts
  • src/lib/onboard.ts
  • src/lib/onboard/bridge-dns-preflight.ts
  • src/lib/onboard/host-dns-preflight.test.ts
  • src/lib/onboard/machine/handlers/sandbox.ts
  • src/lib/onboard/messaging-conflict-guard.test.ts
  • src/lib/onboard/messaging-conflict-guard.ts
  • src/lib/onboard/preflight.ts
  • src/lib/onboard/sandbox-agent.ts
  • src/lib/security/credential-filter.test.ts
  • src/lib/security/credential-filter.ts
  • src/lib/state/registry.ts
  • src/lib/status-command-deps.ts
  • test/cli/list-share-live-inference.test.ts
  • test/control-ui-config-endpoint-docs.test.ts
  • test/e2e-scenario-advisor.test.ts
  • test/e2e-scenario/docs/MIGRATION.md
  • test/e2e-scenario/docs/README.md
  • test/e2e-scenario/docs/RETIREMENT.md
  • test/e2e-scenario/fixtures/artifacts.ts
  • test/e2e-scenario/fixtures/availability-env.ts
  • test/e2e-scenario/fixtures/cleanup.ts
  • test/e2e-scenario/fixtures/clients/command.ts
  • test/e2e-scenario/fixtures/clients/gateway.ts
  • test/e2e-scenario/fixtures/clients/host.ts
  • test/e2e-scenario/fixtures/clients/index.ts
  • test/e2e-scenario/fixtures/clients/provider.ts
  • test/e2e-scenario/fixtures/clients/sandbox.ts
  • test/e2e-scenario/fixtures/clients/state.ts
  • test/e2e-scenario/fixtures/e2e-test.ts
  • test/e2e-scenario/fixtures/live-project-gate.ts
  • test/e2e-scenario/fixtures/phases/environment.ts
  • test/e2e-scenario/fixtures/phases/index.ts
  • test/e2e-scenario/fixtures/phases/lifecycle.ts
  • test/e2e-scenario/fixtures/phases/onboarding.ts
  • test/e2e-scenario/fixtures/phases/runtime.ts
  • test/e2e-scenario/fixtures/phases/state-validation.ts
  • test/e2e-scenario/fixtures/redaction.ts
  • test/e2e-scenario/fixtures/secrets.ts
  • test/e2e-scenario/fixtures/shell-probe.ts
  • test/e2e-scenario/fixtures/shell/supervisor.ts
  • test/e2e-scenario/fixtures/shell/trusted-command.ts
  • test/e2e-scenario/framework-tests/e2e-migration-inventory.test.ts
  • test/e2e-scenario/live/onboard-resume.test.ts
  • test/e2e-scenario/live/openshell-version-pin.test.ts
  • test/e2e-scenario/live/registry-scenarios.test.ts
  • test/e2e-scenario/live/ubuntu-repo-cli-smoke.test.ts
  • test/e2e-scenario/migration/legacy-inventory.json
  • test/e2e-scenario/scenarios/types.ts
  • test/e2e-scenario/support-tests/e2e-clients.test.ts
  • test/e2e-scenario/support-tests/e2e-expected-state.test.ts
  • test/e2e-scenario/support-tests/e2e-fixture-context.test.ts
  • test/e2e-scenario/support-tests/e2e-live-project-config.test.ts
  • test/e2e-scenario/support-tests/e2e-live-registry-discovery.test.ts
  • test/e2e-scenario/support-tests/e2e-live-skip-name-contract.test.ts
  • test/e2e-scenario/support-tests/e2e-manifests.test.ts
  • test/e2e-scenario/support-tests/e2e-migration-policy.test.ts
  • test/e2e-scenario/support-tests/e2e-migration-source-of-truth.test.ts
  • test/e2e-scenario/support-tests/e2e-phase-environment.test.ts
  • test/e2e-scenario/support-tests/e2e-phase-lifecycle.test.ts
  • test/e2e-scenario/support-tests/e2e-phase-onboarding.test.ts
  • test/e2e-scenario/support-tests/e2e-phase-runtime.test.ts
  • test/e2e-scenario/support-tests/e2e-phase-state-validation.test.ts
  • test/e2e-scenario/support-tests/e2e-redaction-entry.test.ts
  • test/e2e-scenario/support-tests/e2e-redaction-parity.test.ts
  • test/e2e-scenario/support-tests/e2e-scenario-matrix.test.ts
  • test/e2e-scenario/support-tests/e2e-scenario-registry.test.ts
  • test/e2e-scenario/support-tests/e2e-scenarios-workflow.test.ts
  • test/e2e-scenario/support-tests/e2e-shell-supervisor.test.ts
  • test/e2e-script-workflow.test.ts
  • test/e2e/docs/parity-inventory.generated.json
  • test/e2e/test-cron-preflight-inference-local-e2e.sh
  • test/e2e/test-hermes-root-entrypoint-smoke.sh
  • test/fetch-guard-patch-regression.test.ts
  • test/generate-openclaw-config-slack-allowlist.test.ts
  • test/helpers/installer-sourced-env.ts
  • test/hermes-gateway-wrapper.test.ts
  • test/hermes-start.test.ts
  • test/install-preflight-docker-bootstrap.test.ts
  • test/install-preflight.test.ts
  • test/ollama-proxy-startup.test.ts
  • test/onboard-selection.test.ts
  • test/pr-review-advisor.test.ts
  • test/pr-workflow-contract.test.ts
  • test/release-latest-tag.test.ts
  • test/snapshot.test.ts
  • tools/e2e-advisor/scenario-comment.mts
  • tools/e2e-advisor/scenarios-schema.json
  • tools/e2e-advisor/scenarios.mts
  • tools/pr-review-advisor/analyze.mts
  • vitest.config.ts
💤 Files with no reviewable changes (2)
  • test/e2e-scenario/migration/legacy-inventory.json
  • test/e2e-scenario/framework-tests/e2e-migration-inventory.test.ts
✅ Files skipped from review due to trivial changes (27)
  • .agents/skills/nemoclaw-user-reference/references/network-policies.md
  • test/e2e-scenario/fixtures/phases/lifecycle.ts
  • test/e2e-scenario/fixtures/clients/provider.ts
  • test/e2e-scenario/fixtures/secrets.ts
  • src/lib/inference/model-prompts.ts
  • test/e2e-scenario/fixtures/shell/trusted-command.ts
  • test/e2e-scenario/live/ubuntu-repo-cli-smoke.test.ts
  • docs/inference/use-local-inference.mdx
  • test/e2e-scenario/support-tests/e2e-fixture-context.test.ts
  • agents/openclaw/manifest.yaml
  • test/e2e-scenario/scenarios/types.ts
  • test/e2e-scenario/support-tests/e2e-phase-lifecycle.test.ts
  • tools/e2e-advisor/scenarios-schema.json
  • agents/hermes/start.sh
  • test/release-latest-tag.test.ts
  • test/e2e-scenario/fixtures/shell/supervisor.ts
  • test/e2e-scenario/fixtures/shell-probe.ts
  • tools/e2e-advisor/scenario-comment.mts
  • .agents/skills/nemoclaw-user-overview/references/release-notes.md
  • .agents/skills/nemoclaw-user-manage-sandboxes/references/backup-restore.md
  • .agents/skills/nemoclaw-user-reference/references/commands.md
  • .agents/skills/nemoclaw-user-configure-inference/SKILL.md
  • docs/reference/commands.mdx
  • test/e2e-scenario/docs/MIGRATION.md
  • test/e2e-scenario/support-tests/e2e-phase-onboarding.test.ts
  • docs/reference/commands-nemohermes.mdx
  • test/e2e-scenario/fixtures/phases/state-validation.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • test/e2e-scenario/live/onboard-resume.test.ts

Comment thread src/lib/onboard.ts

@prekshivyas prekshivyas 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.

Reviewed (code + 9-cat security). New gated live Vitest test for onboard --resume: forces a policies-step failure via the E2E injection hook, then resumes with NVIDIA_API_KEY stripped to prove credential hydration from the session file. The resume/skip strings, the session-failure assertions (status:"failed", failure.step:"policies"), and the credential-layering design are all verified correct against source, and credential handling is exemplary.

🔴 Request changes — the no-rerun guard is vacuous. The negative assertions use stale step labels: not.toContain("[1/7] Preflight checks"), "[2/7] …gateway", "[5/7] Creating sandbox"). But the flow is 8 steps, so the CLI emits [1/8], [2/8], and sandbox is [6/8] (verified against machine/definition.ts + prompt-helpers.ts). The /7 strings never appear in output, so all three not.toContain checks pass even if those steps were re-run — defeating the test's headline purpose. Same at line 281: ranInference checks [4/7] (actual [4/8]), so that positive branch is dead.

Fix: correct the labels to [1/8] / [2/8] / [6/8] / [4/8] — or assert on the positive [resume] Skipping … lines (those are verified correct). Minor: SessionStateComplete omits the 8th step (agent_setup).

Security: all 9 pass; the source-shape budget gate is NOT tripped (the file reads target $HOME state files, not production paths).

Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
@jyaunches

Copy link
Copy Markdown
Contributor Author

@prekshivyas addressed the requested-change item in 0c5774864: updated the no-rerun guards to the current 8-step labels ([1/8], [2/8], [6/8]), updated the inference positive branch to [4/8], and added agent_setup to the completed-session step assertions. CI and PR Review Advisor are green; could you please re-review when you have a chance?

@jyaunches jyaunches merged commit 6622476 into main Jun 11, 2026
38 checks passed
@jyaunches jyaunches deleted the e2e-migrate/test-onboard-resume branch June 11, 2026 12:24
@cv cv added the v0.0.64 Release target label Jun 12, 2026
cv added a commit that referenced this pull request Jun 16, 2026
## Summary
Migrate `test-onboard-resume.sh` into the live Vitest E2E system. Wires
the existing `test/e2e-scenario/live/onboard-resume.test.ts` replacement
into `e2e-vitest-scenarios.yaml` as `onboard-resume-vitest`, closing out
the partial migration from PR #5147 with a dispatchable same-runner
Vitest path.

## Related Issue
Refs #5098

## Changes
- Adds or wires the free-standing live Vitest scenario `onboard-resume`.
- Adds selective workflow dispatch via `onboard-resume-vitest` in
`.github/workflows/e2e-vitest-scenarios.yaml`.
- Preserves the legacy system boundaries from `test-onboard-resume.sh`
while leaving legacy shell retirement to #5098 Phase 11.

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

## Verification
- [x] Git hooks passed during commit and push, or `npx prek run
--from-ref main --to-ref HEAD` passes
- [x] Targeted tests pass for changed behavior
- [ ] Full `npm test` passes (broad runtime changes only)
- [x] Tests added or updated for new or changed behavior
- [x] No secrets, API keys, or credentials committed
- [ ] Docs updated for user-facing behavior changes
- [ ] `npm run docs` builds without warnings (doc changes only)
- [ ] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

Targeted local checks run while preparing these branches:
- `npx vitest run --project e2e-vitest-support
test/e2e-scenario/support-tests/e2e-scenarios-workflow.test.ts
--silent=false --reporter=default`
- `npm run typecheck:cli` for branches adding new TypeScript tests
- `git diff --check`

Selective same-runner dispatch:
https://github.com/NVIDIA/NemoClaw/actions/runs/27636907033 — passed
after hosted-compatible env fix

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


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

* **Bug Fixes**
* Improved resume behavior to avoid repeating sandbox creation and
gateway startup.
* Updated resume verification to correctly respect the hosted provider
and to allow steps to be either completed or skipped without failing.
* **Tests / CI**
* Added automated live e2e coverage for the onboarding resume flow and
ensured its results are included in PR feedback.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
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 v0.0.64 Release target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants