Repository navigation
fix(crabbox): report completed source cleanup after capture cancellation - #143349
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 9, 2026, 3:38 PM ET / 19:38 UTC. ClawSweeper reviewWhat this changesThe Crabbox plugin reports successful worker cleanup despite an interrupted optional image capture, with regression coverage for successful and failed cleanup. Merge readiness✅ Ready for maintainer review This remains a useful, focused fix: current main and v2026.9.3 still report capture failure after confirmed source cleanup. No blocking correctness finding was identified. Priority: P2 Review scores
Verification
How this fits togetherThe Crabbox plugin provisions and stops cloud workers for OpenClaw. Its teardown result tells the Gateway whether worker cleanup completed, while image capture recovery is tracked separately. flowchart TD
A[Worker stop request] --> B[Crabbox teardown]
B --> C[Attempt optional image capture]
C --> D[Stop source VM]
C --> E[Retain uncertain capture record]
D --> F{Stop confirmed}
F -->|Yes| G[Report cleanup complete and capture warning]
F -->|No| H[Report cleanup failure]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +1, Tests +46. Total +47 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep VM cleanup completion independent of optional snapshot recovery, while preserving stop failures and unresolved-capture safeguards. Do we have a high-confidence way to reproduce the issue? Yes, from source: cancel project capture, then destroy the lease with a successful stop result; current main still throws the retained capture error. Runtime reproduction was not executed in this read-only review. Is this the best way to solve the issue? Yes. Reporting the optional capture error as a warning at the teardown owner matches existing documentation without changing stop confirmation or capture recovery. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ac0a263eebf9. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
What Problem This Solves
Fixes an issue where stopping a cloud session during project image capture reported worker cleanup as failed even after Crabbox confirmed the source VM was stopped.
Why This Change Was Made
After successful source cleanup, report the optional capture error as a warning. Failed source cleanup still rejects. The uncertain capture reservation and the fence preventing node enrollment remain intact, so successful VM cleanup never claims that an interrupted snapshot was resolved.
User Impact
Stop and reclaim can finish when the worker is actually gone. Operators still receive the existing guidance for reconciling an uncertain image capture.
Evidence
Observed a real canceled project capture where the source lease reached released/cleanup-complete while the Gateway reported an unresolved-capture teardown error. The task-owned snapshot was subsequently identified and deleted; capture recovery state was retained.
The regression failed before the fix. Its successful-stop and failed-stop cases verify allocation retirement, retained capture uncertainty, no repeated capture, and no node enrollment. All 132 focused provider tests passed, the complete changed-file gate passed, and independent isolated P0–P2 review was clean. Existing warm-image documentation already specifies this behavior.