Repository navigation
fix(crabbox): allow native snapshots to finish before enrollment - #143288
Conversation
Match the explicit native-capture wait with provider source lifecycle and child-settlement budgets. Keep long-running captures distinct from uncertain outcomes in operator guidance, preserving capture ownership and manual recovery guards. Validation covers delayed readiness, provider cancellation and cleanup, the landed non-submission behavior, and CLI/Doctor/maintenance guidance. Live AWS qualification follows on the prepared-checkout integration.
|
🦞👀 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: blocked before merge. Reviewed September 9, 2026, 2:19 PM ET / 18:19 UTC (Revision 4). ClawSweeper reviewWhat this changesThe Crabbox plugin extends native snapshot deadlines and updates operator guidance to distinguish long-running captures from uncertain outcomes. Merge readiness⛔ Blocked before merge - 1 item remains This remains a useful, focused repair: current main still cuts off ordinary native captures prematurely. No blocking defect was found, and the updated AWS evidence resolves the earlier proof concern for the shared capture boundary. Priority: P2 Review scores
Verification
How this fits togetherCrabbox provisions cloud workers and saves prepared machine images for later reuse. Its capture owner scrubs worker state, waits for the native snapshot, then permits project enrollment or completes worker teardown. flowchart TD
A[Prepared cloud worker] --> B[Scrub worker state]
B --> C[Native snapshot with bounded wait]
C --> D{Capture outcome}
D -->|Available| E[Publish reusable image]
E --> F[Enroll project worker or finish teardown]
D -->|Uncertain| G[Retain reservation and recovery guidance]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +33, Tests +87, Docs 0. Total +120 across 12 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep snapshot waiting aligned with Crabbox's bounded native contract while preserving cancellation, capture ownership, and explicit recovery for uncertain outcomes. Do we have a high-confidence way to reproduce the issue? Yes: current main terminates ordinary checkpoint commands after 180 seconds despite Crabbox's 45-minute native wait contract. The supplied AWS failure and four-minute regression describe the matching trigger; this review did not execute it. Is this the best way to solve the issue? Yes: repairing the shared capture deadline and its enclosing budgets addresses the mismatch without retrying submission or changing stored ownership, while phase-based guidance avoids treating elapsed time as failure. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7c1824faa6c9. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
Retain the independent plugin registration boundary checks and account for the explicit native-capture wait plus command settlement. The old literals failed in CI and locally; all 29 registration, lazy-load, cancellation, and stop cases pass with the corrected budget arithmetic.
|
Merged via squash.
|
…nclaw#143288) * fix(crabbox): align native checkpoint capture deadlines Match the explicit native-capture wait with provider source lifecycle and child-settlement budgets. Keep long-running captures distinct from uncertain outcomes in operator guidance, preserving capture ownership and manual recovery guards. Validation covers delayed readiness, provider cancellation and cleanup, the landed non-submission behavior, and CLI/Doctor/maintenance guidance. Live AWS qualification follows on the prepared-checkout integration. * test(crabbox): align registered lifecycle budget expectations Retain the independent plugin registration boundary checks and account for the explicit native-capture wait plus command settlement. The old literals failed in CI and locally; all 29 registration, lazy-load, cancellation, and stop cases pass with the corrected budget arithmetic.
Related: #134931, #143227, #142221
What Problem This Solves
Fixes an issue where cloud project provisioning aborts an ordinary pending native snapshot after three minutes on AWS, leaving an uncertain capture and preventing worker enrollment. The CLI and Doctor also tell operators to stop and recover a capture after 20 minutes even while it can still be within the provider's normal capture window.
Why This Change Was Made
Pass Crabbox's explicit 45-minute native-capture budget and let the enclosing command cover submission, source lifecycle, and child settlement. Preserve provider-specific timing: Machine0 has separate default stop/restore windows; Daytona includes preparation and stop inside its native-capture budget and has separate recovery afterward.
Distinguish a recorded uncertain outcome from a merely long-running capture in CLI, Doctor, and maintenance guidance. Stored phase/stale data, the 20-minute warning threshold, capture ownership, publication, non-submission handling, and manual recovery guards remain unchanged. This introduces no extra capture attempt, configuration option, or schema change.
User Impact
Legitimate pending snapshots can finish within the CLI's bounded contract before enrollment. Operators see wait/inspect guidance for long-running work and retain explicit recovery instructions for uncertain outcomes. Cancellation, failed capture, source cleanup, and reservation safety remain enforced.
Evidence
An actual installed-Gateway AWS campaign reproduced the issue: OpenClaw terminated checkpoint creation at 180 seconds while AWS repeatedly reported the snapshot pending. The exact retained checkpoint later verified completed through Crabbox. The instance and matched snapshot were deleted; the original failed run and supplemental cleanup evidence are preserved. No successful session from that failed campaign is claimed.
The delayed-readiness regression advances an existing command-deadline model to four minutes: the original code fails with unresolved capture; repaired AWS/Azure/GCP cases publish and enroll exactly once. The broader reconciled provider, cancellation, stop, and receipt suites passed 396 tests.
Six existing diagnostic cases reproduced premature stop/recovery advice for old creating/scrubbing phases. The final owner, CLI, Doctor, maintenance, and recovery suites passed 151 tests; the final maintenance wording passed its 14-case rerun. These test counts overlap and are not summed.
The full changed-file gate, formatting, and documentation checks passed. Independent P2 review completed with no accepted actionable finding remaining. Source-based review dispositions preserve Machine0's direct lifecycle route and clarify that Daytona preparation shares the native-capture budget; no unsupported budget extension was added.
The exact Crabbox v0.51.0 source contract was inspected at commit
745eb21f8fb97582a7e0ec176ee9671562eba2b9. The Machine0 allowance covers its default lifecycle windows, not arbitrary external timeout overrides.Post-fix native AWS proof passed on
4ddee76e9413ea6fffa11831bc8b2d8829cb50ebwith pinned installed Crabbox v0.51.0 and onem7a.large/ 400 GiB lease. Actualprovider.provisionfollowed by the optional teardownprovider.destroyentrypoint ran the real scrub and one native EBS checkpoint with--wait --wait-timeout 2700000ms. Capture completed successfully in 45.25 seconds, verified available before the ordinary stop, and published an available image. Normal destroy, source deletion, and exact checkpoint deletion/absence all passed; cleanup completed and every command settled normally.Runtime installation/enrollment in that positive proof is explicitly synthetic, and capture enters through non-project optional teardown. It does not establish a running node, real session, or project dispatch/enrollment, nor Machine0/Daytona live qualification. The 45.25-second capture is below the old 180-second cutoff and does not exercise that regression boundary or the 45-minute maximum. The original live pending-snapshot failure and separate four-minute delayed-readiness regression establish the deadline rationale; the positive run verifies the current native command contract and successful cleanup. The experiment retains its 30-minute main, 10-minute cleanup, and 40-minute total caps.
CI exposed two stale lifecycle-budget expectations in the plugin registration integration test. The independent expected values now account for the 46-minute-10-second capture-envelope increase. The original failures were reproduced locally; all 29 registration, lazy-load, cancellation, and stop cases passed after the test-only correction, followed by changed-file checks and scoped review. Production code and native command arguments did not change.