test(e2e): migrate onboard repair flow to Vitest#5496
Conversation
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
📝 WalkthroughWalkthroughAdds a new live Vitest E2E scenario ( ChangesOnboard Repair E2E Test and CI Wiring
Sequence DiagramsequenceDiagram
participant Test as onboard-repair.test.ts
participant FakeAI as Fake OpenAI Server
participant nemoclaw as nemoclaw CLI
participant Sandbox as Sandbox API
Test->>FakeAI: start fake OpenAI-compatible server
Test->>nemoclaw: onboard (forced policy-step failure, record session)
nemoclaw-->>Test: non-zero exit, session file written
Test->>Sandbox: delete recorded sandbox
Test->>Sandbox: poll until sandbox absent
Test->>nemoclaw: onboard --resume (repair: recreate missing sandbox)
nemoclaw-->>Test: zero exit
Test->>nemoclaw: status
nemoclaw-->>Test: success
Test->>nemoclaw: onboard (reinjected failure)
nemoclaw-->>Test: non-zero exit
Test->>nemoclaw: onboard --resume (conflicting sandbox name)
nemoclaw-->>Test: rejected
Test->>nemoclaw: onboard --resume (conflicting provider/model)
nemoclaw-->>Test: rejected
Test->>Test: cleanup, verify session file removed, write artifact
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Possibly related issues
Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
E2E Advisor RecommendationRequired E2E: Dispatch hint: Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
Dispatch hint
|
Vitest E2E Scenario RecommendationRequired Vitest E2E scenarios: Dispatch required Vitest E2E scenarios:
Full Vitest E2E advisor summaryVitest E2E Scenario AdvisorBase: Required Vitest E2E scenarios
Optional Vitest E2E scenarios
Relevant changed files
|
PR Review AdvisorFindings: 0 needs attention, 1 worth checking, 0 nice ideas Review findings🛠️ Needs attention
🔎 Worth checking
🌱 Nice ideas
Consider writing more tests for
Since last review detailsCurrent findings:
This is an automated advisory review. A human maintainer must make the final merge decision. |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage in the branch is 96%. Coverage data for the branch is not yet available. Show a code coverage summary of the most covered files.
TypeScript / code-coverage/cliThe overall coverage in the branch is 46%. Coverage data for the branch is not yet available. Show a code coverage summary of the most covered files.
Updated |
Vitest E2E Scenario Results — ✅ All jobs passedRun: 27629705352
|
…ard-repair # Conflicts: # .github/workflows/e2e-vitest-scenarios.yaml
Vitest E2E Scenario Results — ✅ All jobs passedRun: 27638945931
|
…ard-repair # Conflicts: # .github/workflows/e2e-vitest-scenarios.yaml
…ard-repair # Conflicts: # .github/workflows/e2e-vitest-scenarios.yaml
Vitest E2E Scenario Results — ✅ All jobs passedRun: 27649247386
|
Summary
Migrate
test-onboard-repair.shinto the live Vitest E2E system. Addstest/e2e-scenario/live/onboard-repair.test.tsandonboard-repair-vitestworkflow wiring. The Vitest test uses a fake OpenAI-compatible endpoint, creates interrupted resumable state, deletes the recorded sandbox, verifies resume repair, rejects conflicting sandbox names, rejects provider/model conflicts, and cleans up session state.Related Issue
Refs #5098
Changes
onboard-repair.onboard-repair-vitestin.github/workflows/e2e-vitest-scenarios.yaml.test-onboard-repair.shwhile leaving legacy shell retirement to Epic: Migrate legacy bash E2E into the Vitest E2E system #5098 Phase 11.Type of Change
Verification
npx prek run --from-ref main --to-ref HEADpassesnpm testpasses (broad runtime changes only)npm run docsbuilds without warnings (doc changes 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=defaultnpm run typecheck:clifor branches adding new TypeScript testsgit diff --checkSelective same-runner dispatch: https://github.com/NVIDIA/NemoClaw/actions/runs/27649247386 — passed after merge-from-main refresh
Signed-off-by: Carlos Villela cvillela@nvidia.com
Summary by CodeRabbit
Tests
--resumecorrectly rejects conflicting sandbox and override inputs.CI / Automation