Repository navigation
fix: cancel guest workspace preparation while waiting - #188957
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. What this changesThis PR forwards the run abort signal into guest sandbox preparation so queued reconciliation can stop promptly. Example: A guest run preparing source.txt is cancelled while another operation holds its workspace reconciliation lease.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a concrete cancellation defect with a minimal production change. No introduced correctness defect was found, and the earlier merge-conflict concern is resolved. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherAgent attempt setup resolves sandbox context, which prepares a managed workspace through the existing reconciliation lease owner and returns workspace roots and cleanup ownership. flowchart TD
A[Agent run cancellation] --> B[Attempt workspace setup]
B --> C[Sandbox context]
C --> D[Local workspace preparation]
D --> E[Reconciliation lease]
E --> F[Prepared workspace or cancellation]
Technical reviewBest possible solution: Retain the one-line signal forwarding and the two owner-level regression controls without changing workspace reuse or accepted-effect settlement. Do we have a high-confidence way to reproduce the issue? Source confirms that the attempt caller omits the signal consumed by cancellable lease acquisition, and the linked report records a deterministic failing integration case with a successful release control; this review ran no target code. Is this the best way to solve the issue? Forwarding the existing signal repairs the missing caller connection at its source, reuses established cancellation machinery, and leaves checkpoint settlement independent of run cancellation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9902334873c1. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +1, Tests +167, Other +2. Total +170 across 4 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 31, 2026, 12:32 AM ET / 04:32 UTC (Revision 2). |
2301827 to
d08e7d3
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Fixed: cancelled guest workspace preparation settles without waiting for the reconciliation holder to release. |
Forward run cancellation to guest workspace preparation so queued setup settles without waiting for the reconciliation holder. Fixes openclaw#188923.
Fixes #188923.
What Problem This Solves
Guest workspace preparation can remain queued behind another reconciliation operation after its run is cancelled. Execution admission is closed, but setup waits for the current holder to release the workspace.
User Impact
Cancellation now reaches queued initial preparation while the independent holder finishes normally. Ordinary release still permits preparation to succeed. Accepted command and file-write cleanup keeps its existing workspace lifetime.
Why This Change Was Made
The sandbox context and reconciliation owners already accept cancellation. The attempt caller omitted its existing run abort signal. Forwarding that signal completes the path while preserving warm-workspace reuse.
Evidence
9f14244, a registered guest and real reconciliation holder reproduced cancellation remaining pending for 2,001 ms, then rejecting with its original reason after release. The normal-release control passed; both operations joined and checked file contents were preserved. Container provisioning is substituted in this focused fixture.The following capture shows the ordinary guest preparation/read control, not queued cancellation. Identities and model details are redacted.
r8-ordinary-file-first.mp4