fix(recover): preserve state across supervisor relaunch - #7654
Conversation
Signed-off-by: Ho Lim <subhoya@gmail.com>
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe managed sandbox relaunch now backs up and restores declared state, validates replacement container identity, reports restoration and rollback outcomes, securely cleans up backups, and stops recovery when state restoration fails. ChangesSandbox relaunch recovery
Estimated code review effort: 4 (Complex) | ~45 minutes Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant checkAndRecoverSandboxProcesses
participant relaunchManagedSupervisorSession
participant sameContainerId
participant sandboxState
participant deps.finalize
checkAndRecoverSandboxProcesses->>relaunchManagedSupervisorSession: start managed supervisor relaunch
relaunchManagedSupervisorSession->>sandboxState: back up declared sandbox state
relaunchManagedSupervisorSession->>sameContainerId: validate replacement container identity
relaunchManagedSupervisorSession->>sandboxState: restore state from backup manifest
sandboxState-->>relaunchManagedSupervisorSession: restoration and cleanup outcome
relaunchManagedSupervisorSession->>deps.finalize: finalize relaunch outcome
deps.finalize-->>checkAndRecoverSandboxProcesses: stateRestored or rolledBack result
checkAndRecoverSandboxProcesses-->>checkAndRecoverSandboxProcesses: stop readiness and forwarding on failure
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/lib/actions/sandbox/process-recovery.ts (1)
1-1: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick winThe double-failure branch (state not restored AND rollback failed) is both unfixed and untested. The new failure-handling block in
process-recovery.tsomits operator recovery hints for this worst-case outcome, and the new test only exercises the milderrolledBack: truecase, so the gap in guidance has no regression coverage.
src/lib/actions/sandbox/process-recovery.ts#L1281-1295: add theprintHostManagedGatewayRecoveryHints(...)call in the!completion.rolledBackbranch (see diff in the per-site comment above).test/process-recovery-supervisor-relaunch.test.ts#L223-266: add a companion test wherefinalizereturns{ backupRemoved: false, rolledBack: false, stateRestored: false }and assert the recovery hints are surfaced (e.g., via aprintHostManagedGatewayRecoveryHints/console spy) alongsiderecovered: false.🤖 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 `@src/lib/actions/sandbox/process-recovery.ts` at line 1, Update the double-failure handling in the process-recovery completion path to call printHostManagedGatewayRecoveryHints(...) when !completion.rolledBack, while preserving recovered: false. Add companion coverage in the supervisor relaunch tests with finalize returning backupRemoved: false, rolledBack: false, and stateRestored: false, asserting both recovery hints and the unrecovered result.
🧹 Nitpick comments (1)
src/lib/actions/sandbox/supervisor-relaunch.ts (1)
183-222: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winExtract the duplicated rollback-outcome construction.
The
!supervisorReady,!replacementOwned, and!stateRestoredbranches all build the identical outcome shape ({ ...finalize({ result, supervisorReady: false }), stateRestored: false }). In this critical transactional path, keeping three copies risks one being updated while the others are missed in a future change.As per coding guidelines, "**/*.{js,ts,tsx}: Keep function complexity low; existing complexity hotspots are tracked separately."♻️ Proposed extraction
+ const rollback = (): DockerGpuPatchFinalizeOutcome & { stateRestored: boolean } => ({ + ...finalize({ result, supervisorReady: false }), + stateRestored: false, + }); return { containerId: result.newContainerId, finalize(supervisorReady) { if (completed) { if (completed.supervisorReady !== supervisorReady) { throw new Error( "Supervisor relaunch transaction was finalized with conflicting state.", ); } return completed.outcome; } if (!supervisorReady) { - const outcome = { ...finalize({ result, supervisorReady: false }), stateRestored: false }; + const outcome = rollback(); completed = { supervisorReady, outcome }; return outcome; } let replacementOwned = false; try { replacementOwned = sameContainerId( resolveContainer(sandboxName, driver), result.newContainerId, ); } catch { replacementOwned = false; } if (!replacementOwned) { - const outcome = { - ...finalize({ result, supervisorReady: false }), - stateRestored: false, - }; + const outcome = rollback(); completed = { supervisorReady, outcome }; return outcome; } let stateRestored = false; try { stateRestored = restoreState(sandboxName, backupManifest.backupPath).success; } catch { stateRestored = false; } if (!stateRestored) { - const outcome = { - ...finalize({ result, supervisorReady: false }), - stateRestored: false, - }; + const outcome = rollback(); completed = { supervisorReady, outcome }; return outcome; }🤖 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 `@src/lib/actions/sandbox/supervisor-relaunch.ts` around lines 183 - 222, Extract the repeated rollback outcome construction into a local helper within the surrounding relaunch flow, using the existing result and supervisorReady context to return the finalized outcome with stateRestored set to false. Replace the !supervisorReady, !replacementOwned, and !stateRestored branches with calls to this helper while preserving their completed assignment and early returns.Source: Coding guidelines
🤖 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/actions/sandbox/process-recovery.ts`:
- Around line 1281-1295: Update the failure branch handling
completion.stateRestored === false || completion.rolledBack in the surrounding
recovery function to call printHostManagedGatewayRecoveryHints(...) when both
state restoration and rollback fail, matching the equivalent !gatewayReady path.
Also replace the “state restore failed” wording with a generic recovery-failure
message that remains accurate when restoration was never attempted.
In `@src/lib/actions/sandbox/supervisor-relaunch.ts`:
- Around line 135-158: The relaunch flow leaves backupManifest.backupPath behind
after recovery. Update the supervisor relaunch logic around the restore/rollback
completion paths to remove the backup after the container is successfully
settled, including rollback handling, while preserving cleanup behavior when
restore or recreation fails.
---
Outside diff comments:
In `@src/lib/actions/sandbox/process-recovery.ts`:
- Line 1: Update the double-failure handling in the process-recovery completion
path to call printHostManagedGatewayRecoveryHints(...) when
!completion.rolledBack, while preserving recovered: false. Add companion
coverage in the supervisor relaunch tests with finalize returning backupRemoved:
false, rolledBack: false, and stateRestored: false, asserting both recovery
hints and the unrecovered result.
---
Nitpick comments:
In `@src/lib/actions/sandbox/supervisor-relaunch.ts`:
- Around line 183-222: Extract the repeated rollback outcome construction into a
local helper within the surrounding relaunch flow, using the existing result and
supervisorReady context to return the finalized outcome with stateRestored set
to false. Replace the !supervisorReady, !replacementOwned, and !stateRestored
branches with calls to this helper while preserving their completed assignment
and early returns.
🪄 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: 38b8b51b-72fe-48be-b0e5-a4482544276a
📒 Files selected for processing (4)
src/lib/actions/sandbox/process-recovery.tssrc/lib/actions/sandbox/supervisor-relaunch.test.tssrc/lib/actions/sandbox/supervisor-relaunch.tstest/process-recovery-supervisor-relaunch.test.ts
PR Review Advisor — No blocking findings reportedAdvisor assessment: No blocking advisor findings reported Model lanes
Nemotron output stays in workflow artifacts and does not change the assessment above. E2E guidanceAdvisory only. E2E / PR Gate selects and runs jobs independently. Recommended E2E: 1 optional E2E recommendation
This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge. |
Signed-off-by: Ho Lim <subhoya@gmail.com>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
test/snapshot-recovery-validation.test.ts (1)
56-65: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winAdd a symlink-rejection regression case.
This verifies lexical containment but not the security boundary at
removeSandboxStateBackup’s symlink check. Add a symlink inside the sandbox backup root pointing tooutsidePath, then assert removal returnsfalseand the outside directory remains untouched.As per path instructions, destructive lifecycle operations must validate before mutation and cover failure/recovery 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/snapshot-recovery-validation.test.ts` around lines 56 - 65, Extend the test case around removeSandboxStateBackup to create a symlink within the sandbox backup root that points to outsidePath, then assert removal returns false and outsidePath still exists. Keep the existing exact-child success and lexical-containment checks, ensuring the symlink rejection is validated before any mutation.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/snapshot-recovery-validation.test.ts`:
- Around line 56-65: Extend the test case around removeSandboxStateBackup to
create a symlink within the sandbox backup root that points to outsidePath, then
assert removal returns false and outsidePath still exists. Keep the existing
exact-child success and lexical-containment checks, ensuring the symlink
rejection is validated before any mutation.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: b9dbce3f-af13-4ac7-882f-d79cf63e96c4
📒 Files selected for processing (6)
src/lib/actions/sandbox/process-recovery.tssrc/lib/actions/sandbox/supervisor-relaunch.test.tssrc/lib/actions/sandbox/supervisor-relaunch.tssrc/lib/state/sandbox.tstest/process-recovery-supervisor-relaunch.test.tstest/snapshot-recovery-validation.test.ts
🚧 Files skipped from review as they are similar to previous changes (4)
- src/lib/actions/sandbox/process-recovery.ts
- src/lib/actions/sandbox/supervisor-relaunch.test.ts
- test/process-recovery-supervisor-relaunch.test.ts
- src/lib/actions/sandbox/supervisor-relaunch.ts
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
prekshivyas
left a comment
There was a problem hiding this comment.
Security review: PASS at head 0c2a03033f0c6d70e7c43d714df1e36aa92b908f
- Secrets and credentials — PASS. The transaction uses the existing sanitized manifest backup path and does not add credential propagation or logging.
- Input and path validation — PASS. Cleanup is limited to an exact child of the sandbox backup root, rejects symlinks before mutation, and has outside-target regression coverage.
- Authentication and authorization — PASS. No authentication or authorization behavior changes.
- Dependencies and supply chain — PASS. No dependencies or generated artifacts are added.
- Error handling and logging — PASS. Backup, identity, restore, and rollback failures fail closed; logs are redacted and preserve the original failure.
- Cryptography — PASS / not applicable. No cryptographic behavior changes.
- Configuration and environment — PASS. Existing recovery opt-out and driver constraints remain; reconstructed launch environment continues to omit credential variables.
- Testing — PASS. Focused CLI tests pass 13/13, integration recovery tests pass 26/26, CLI typecheck passes, and the docs build passes. Coverage includes partial-backup cleanup, exact replacement identity, restore failure, rollback retention, and symlink rejection.
- System security — PASS. Destructive recreation requires a complete backup, legacy-startup match, missing-supervisor confirmation, and exact container identity. State backups are removed only after successful restore or successful rollback and are retained for operator recovery after total failure.
No blocking security finding remains. Final approval should wait for required CI and automated review checks on this exact head.
prekshivyas
left a comment
There was a problem hiding this comment.
Exact-head correction for the preceding review: the reviewed and pushed head is 0c2a030. GitHub correctly anchored both reviews to that commit. The nine-category PASS assessment and CI-pending disposition are unchanged.
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
prekshivyas
left a comment
There was a problem hiding this comment.
Nine-category security review — exact head a8dc94a11a3f51b22300e15340bd1dd1f91d46ee
- Prompt injection / unsafe tool use — PASS. Recovery is host-controlled and consumes no model output.
- SSRF / network policy — PASS. No network policy or outbound request changes.
- Secrets — PASS. Startup-command persistence retains the existing credential redaction behavior; failure diagnostics remain redacted.
- Privilege / filesystem boundaries — PASS. Backup and restore remain limited to manifest-declared sandbox state.
- Authorization / identity — PASS. Recreation and restore remain pinned to the selected old container and exact replacement identity.
- Supply chain — PASS. No dependency or artifact-source changes.
- Input validation / command injection — PASS. Existing validated sandbox names and reconstructed command boundaries are unchanged.
- State integrity / failure ordering — PASS. A successful state backup is now removed if recreation throws before a replacement transaction exists; cleanup failure is isolated so the original recreation diagnostic is preserved.
- Tests / operational handling — PASS. The new tests cover cleanup on recreation failure and cleanup-throw diagnostic preservation. Focused 14/14, affected 705/705, CLI typecheck, and
check:diffpassed.
Overall: PASS at this exact head. The prior PR Review Advisor warning about leaking the temporary backup when recreate throws is fixed. This is a COMMENT review while fresh CI and E2E run.
|
Exact-head ordinary CI is green, but credentialed E2E is blocked by the repository's fork-approval environment configuration.
The controller refused to start the plan because |
cjagwani
left a comment
There was a problem hiding this comment.
Exact-head security receipt for 6d9bb081b (diff fingerprint 2276e0fec546e501c81bb1108e8e9cc387ccaed1c05a1288d925235eb13d98d9): PASS. The verified current-main merge touched recovery code, so I compared the complete pre/post-refresh PR patch: the stable patch ID is identical (d9305656ce90729ed8ef5f7bb8bb4ee71988d0e7) and git range-diff reports all six non-merge commits unchanged. The existing nine-category review therefore remains valid: complete manifest backup precedes recreation; restore is bound to exact replacement identity and managed health; failed restore rolls back; settled backups are removed; total failure retains recovery evidence and prints bounded guidance. No new findings across credentials, paths, authorization, dependencies, error handling, state integrity, configuration, tests, or system security.
cjagwani
left a comment
There was a problem hiding this comment.
Approved exact head 6d9bb081bb9f439d26c711032f9dcd0b9d0d8884 after the maintainer gate. The reviewed recovery/supervisor patch has no remaining security blocker; all commits are validly signed, the primary advisor is green, no unresolved current review threads remain, and the trusted protected E2E plan completed successfully (including onboard repair/resume coverage). Superseded cancelled runs were not treated as current evidence.
cjagwani
left a comment
There was a problem hiding this comment.
Exact-head approval after refresh onto current main. Deterministic maintainer gate passes with all 42 current checks green, clean merge state, verified history, and no unresolved major findings. Protected onboard-repair and onboard-resume both passed on this head.
<!-- markdownlint-disable MD041 --> ## Summary Adds the canonical July 30 release entry for `v0.0.99` before the release tag is captured. The entry covers all 37 merged PRs since `v0.0.98` and bounds experimental or dormant work without presenting it as supported behavior. ## Changes - Adds `docs/changelog/2026-07-30.mdx` with the exact `## v0.0.99` heading, parser-safe MDX SPDX comment, summary, detailed release bullets, and published documentation routes. - Records user-visible recovery, snapshot, shared-route, Hermes, readiness, inference, image, documentation, and release E2E changes. - States that the managed-image selection and startup-profile contracts remain dormant and do not activate buildless onboarding. Source summary: - [#7972](#7972) -> `docs/changelog/2026-07-30.mdx`: Records restored managed OpenClaw configuration modes during recovery. - [#7834](#7834) -> `docs/changelog/2026-07-30.mdx`: Records clone-bound pairing verification after snapshot restore. - [#7975](#7975) -> `docs/changelog/2026-07-30.mdx`: Records managed startup recovery coverage. - [#7960](#7960) -> `docs/changelog/2026-07-30.mdx`: Records dormant startup-profile coordination without activating a supported surface. - [#7856](#7856) -> `docs/changelog/2026-07-30.mdx`: Records persistence of the credential-free OpenClaw startup command. - [#7959](#7959) -> `docs/changelog/2026-07-30.mdx`: Records dormant startup-profile construction without changing onboarding. - [#7946](#7946) -> `docs/changelog/2026-07-30.mdx`: Records the internal startup-profile schema and transport contract. - [#7951](#7951) -> `docs/changelog/2026-07-30.mdx`: Records platform-pull cleanup before managed-image validation. - [#7949](#7949) -> `docs/changelog/2026-07-30.mdx`: Records rejection of retained Hermes `uv` build cache metadata. - [#7597](#7597) -> `docs/changelog/2026-07-30.mdx`: Records separate command and agent first-turn latency evidence. - [#7931](#7931) -> `docs/changelog/2026-07-30.mdx`: Records focused E2E replacement evidence for retired selectors. - [#7950](#7950) -> `docs/changelog/2026-07-30.mdx`: Records exclusion of build-only BuildKit telemetry from the Deep Agents Code probe. - [#7665](#7665) -> `docs/changelog/2026-07-30.mdx`: Records consolidated priority 2 E2E coverage. - [#7911](#7911) -> `docs/changelog/2026-07-30.mdx`: Records the corrected NVIDIA DORI installation pin. - [#7934](#7934) -> `docs/changelog/2026-07-30.mdx`: Records the staging image-family wait before Brev Launchable deployment. - [#7772](#7772) -> `docs/changelog/2026-07-30.mdx`: Records dormant managed-image selection contracts without activating buildless onboarding. - [#7941](#7941) -> `docs/changelog/2026-07-30.mdx`: Records corrected agent-specific provider and policy guidance. - [#7819](#7819) -> `docs/changelog/2026-07-30.mdx`: Records removal of empty Deep Agents Code provider-switch sections. - [#7932](#7932) -> `docs/changelog/2026-07-30.mdx`: Records independent credential-generation E2E execution. - [#7840](#7840) -> `docs/changelog/2026-07-30.mdx`: Records shared-route preservation and pre-delete peer validation during upgrades. - [#7874](#7874) -> `docs/changelog/2026-07-30.mdx`: Records the split between pre-tag release entries and post-tag Announcements. - [#7876](#7876) -> `docs/changelog/2026-07-30.mdx`: Records the writable Hermes runtime root within lockdown. - [#7756](#7756) -> `docs/changelog/2026-07-30.mdx`: Records validated multi-platform managed-image publication. - [#7914](#7914) -> `docs/changelog/2026-07-30.mdx`: Records accepted `uv` version metadata in Hermes image validation. - [#7686](#7686) -> `docs/changelog/2026-07-30.mdx`: Records the explicitly experimental Microsoft Entra runtime identity reference. - [#7869](#7869) -> `docs/changelog/2026-07-30.mdx`: Records classified gateway relaunch quarantine and rebuild guidance. - [#7814](#7814) -> `docs/changelog/2026-07-30.mdx`: Records state restore into replacement sandboxes and SQLite write verification. - [#7839](#7839) -> `docs/changelog/2026-07-30.mdx`: Records quieter onboarding test execution without a user-facing behavior claim. - [#7854](#7854) -> `docs/changelog/2026-07-30.mdx`: Records generalized agent-selection guidance. - [#7845](#7845) -> `docs/changelog/2026-07-30.mdx`: Records isolated CDI test evidence without a user-facing behavior claim. - [#7843](#7843) -> `docs/changelog/2026-07-30.mdx`: Records the corrected Omni sub-agent model ID. - [#7908](#7908) -> `docs/changelog/2026-07-30.mdx`: Records reviewed Hermes and Deep Agents Code dependency pins. - [#7887](#7887) -> `docs/changelog/2026-07-30.mdx`: Records rejection of a symlinked DGX Station release marker. - [#7747](#7747) -> `docs/changelog/2026-07-30.mdx`: Records the internal compute-driver separation without a user-facing behavior claim. - [#7660](#7660) -> `docs/changelog/2026-07-30.mdx`: Records atomic publication of rebuild recovery manifests. - [#7661](#7661) -> `docs/changelog/2026-07-30.mdx`: Records bounded local inference health-response retention. - [#7654](#7654) -> `docs/changelog/2026-07-30.mdx`: Records state preservation across supervisor relaunch recovery. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [x] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Quality Gates - [ ] Tests added or updated for changed behavior - [x] Existing tests cover changed behavior — justification: `test/changelog-docs.test.ts` validates the dated changelog contract, SPDX comment, version heading, and published routes. - [ ] Tests not applicable — justification: - [x] Docs updated for user-facing behavior changes - [ ] Docs not applicable — justification: - [ ] Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) - [ ] Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: ## Documentation Writer Review - [x] Documentation writer subagent reviewed the completed changes - Result: `docs-updated` - Evidence: `docs/changelog/2026-07-30.mdx`; the documentation-only diff passed review against `WRITING.md`, the controlled word list, and `docs/CONTRIBUTING.md`. The review covered terminology, structure, active voice, release meaning, product-scope boundaries, and link and code presentation. Changelog tests passed 6/6, and the docs build reported 0 errors with 2 pre-existing warnings. - Agent: Codex CLI <!-- docs-review-head-sha: 200940f --> <!-- docs-review-agents-blob-sha: c052d60 --> ## DGX Station Hardware Evidence - [ ] Tested on DGX Station - Tested commit: - Station profile/scenario: - Result: - Supporting evidence: ## Verification - [x] PR description includes a `Signed-off-by:` line and every commit appears as `Verified` in GitHub - [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or `npm run validate:pr` passed after refreshing `origin/main` when hooks were skipped or unavailable - [x] Targeted behavior tests pass for the current change set, or tests are marked not applicable above — command/result or justification: `npx vitest run test/changelog-docs.test.ts` passed 6/6 tests. - [ ] Applicable broad gate passed — `npm test` for broad runtime/test-harness changes; `npm run check` for repo-wide validation/coverage changes — command/result: Not applicable to this documentation-only release entry. - [x] Quality Gates section completed with required justifications or waivers - [x] No secrets, API keys, or credentials committed - [ ] `npm run docs` builds without warnings (doc changes only) — result: Build passed with 0 errors and 2 pre-existing warnings. - [x] 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) --- Signed-off-by: San Dang <sdang@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added release notes for v0.0.99 covering snapshot restoration, sandbox recovery, gateway route upgrades, and Hermes security updates. * Documented experimental Microsoft Entra runtime identity support and enhanced readiness checks. * Added details on managed image validation, trusted CI image promotion, and end-to-end release evidence. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Summary
Legacy supervisor recovery now backs up the complete manifest-declared sandbox state before recreating its container, restores that state only after exact replacement identity and managed health are proven, and rolls back on any backup, identity, or restore failure. Settled recovery and rollback transactions remove their temporary host backup, while total failure preserves it and prints actionable recovery guidance.
Related Issue
Addresses the workspace-loss recovery path in #7404 without closing the separate exit-0 crash-loop report.
Changes
Type of Change
Quality Gates
6d9bb081b; diff fingerprint2276e0fec546e501c81bb1108e8e9cc387ccaed1c05a1288d925235eb13d98d9; the stable patch ID is unchanged across the current-main merge.Documentation Writer Review
docs-updateddocs/manage-sandboxes/recover-rebuild-sandboxes.mdxanddocs/reference/commands.mdxdocument manifest-declared state backup and restore, exact replacement identity, rollback cleanup, retained-backup guidance, and the remaining writable-layer boundary. Changed comments, test titles, and terminology conform to the writing guides. Exact-head current-main refresh preserves the reviewed patch byte-for-byte by stable patch ID, so no additional docs edit is needed; focused tests passed 14/14, affected tests passed 705/705, CLI typecheck passed, andcheck:diffpassed.Verification
Signed-off-by:line and every commit is signed for GitHub verificationpre-commit,commit-msg, andpre-pushhooks passednpx vitest run --project cli src/lib/actions/sandbox/supervisor-relaunch.test.ts(14 passed);npm run test:changed(705 passed); the earlier recovery integration suites remain 26/26npm run typecheck:cliandnpm run check:diff; normal hooks passed during commits and pushnpm run docsbuilds without warnings (doc changes only) — command exited 0; Fern reported 0 errors and 2 warningsSigned-off-by: Ho Lim subhoya@gmail.com
Summary by CodeRabbit