fix(cli): auto-recover non-interactive onboard when no sandbox recorded - #5629
fix(cli): auto-recover non-interactive onboard when no sandbox recorded#5629jason-ma-nv wants to merge 1 commit into
Conversation
When a previous onboarding run was interrupted before sandbox creation, the saved session has no sandbox name. install.sh auto-attaches --resume for any in_progress session, so non-interactive onboard then aborted with exit 1 and no recovery path for curl|bash installs. Treat this case as recoverable: in non-interactive resume with no recoverable sandbox name, discard the stale session and start a fresh onboard instead of exiting. Interactive resume and resumes with a requested/recorded sandbox name are unchanged. Fixes #5626 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Jason Ma <jama@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthrough
ChangesNon-interactive onboard auto-recovery
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage in the Show a code coverage summary of the most covered files.
Code Coverage is in Public Preview. Learn more and provide us with your feedback. |
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 Advisor — Changes requestedMerge posture: Do not merge yet Action checklist
Findings index
🚨 Required before mergeAddress these before merging unless a maintainer explicitly overrides the advisor with rationale.
|
|
Superseded by #5641. The original approach changed the CLI resume bootstrap ( |
Summary
When a previous onboarding run was interrupted before sandbox creation completed, the saved session has no sandbox name.
install.shauto-attaches--resumefor anyin_progresssession, so a non-interactivenemoclaw onboardthen aborted with exit 1 and leftcurl|bashinstalls with no recovery path. This change treats that state as recoverable by discarding the stale session and starting a fresh onboard.Related Issue
Fixes #5626
Changes
src/lib/onboard/session-bootstrap.ts: in non-interactive resume with no recoverable sandbox name (interrupted before sandbox creation), discard the stale session and fall back to a fresh onboard instead of callingexitProcess(1). Replaced theassertRecoverableResumeSandboxNameabort helper with a purerecoverableResumeSandboxNamecheck. Interactive resume and resumes with a requested/recorded sandbox name (--name/NEMOCLAW_SANDBOX_NAME) are unchanged.src/lib/onboard/session-bootstrap.test.ts: replaced the test asserting the old abort with one asserting auto-recovery (clears the stale session, starts fresh, emits an explanatory message), plus a test confirming a requested sandbox name still resumes.Type of Change
Verification
Verifiedin GitHubnpx prek run --from-ref main --to-ref HEADpassesnpm testpasses (broad runtime changes only)npm run docsbuilds without warnings (doc changes only)Signed-off-by: Jason Ma jama@nvidia.com
Summary by CodeRabbit
Bug Fixes
Tests