Repository navigation
fix(crabbox): join heartbeat cleanup before replacement - #200466
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 makes Crabbox heartbeat retirement await physical command cleanup before replacement or another heartbeat begins. Example: Strict plugin replacement interrupts the heartbeat for lease cbx_replacement.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it repairs an evidenced heartbeat-cleanup ownership gap using the existing command scope, with no actionable correctness or security findings. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Crabbox plugin schedules lease heartbeats through the shared process runner; provider disposal joins heartbeat retirement before plugin replacement completes. flowchart TD
A[Plugin replacement] --> B[Provider disposal]
B --> C[Heartbeat retirement]
D[Heartbeat timer] --> E[Command process scope]
E --> F[Crabbox command]
C --> E
F --> G[Physical cleanup]
G --> C
Technical reviewBest possible solution: Retain the existing heartbeat owner and join its command scope before retirement or retry scheduling proceeds. Do we have a high-confidence way to reproduce the issue? Current source exposes the bounded-result versus physical-cleanup gap, and scheduled-main annotations show the matching real-child assertion failing; no target code was executed during this review. Is this the best way to solve the issue? The patch is the smallest complete repair: preserve the runner contract, join its existing cleanup scope, and move retry scheduling outside that scope. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8e8203f07607. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +12. Total +12 across 1 file. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
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 Reviewed November 17, 2026, 2:17 AM ET / 07:17 UTC. |
|
Merged via squash.
|
(cherry picked from commit 6247dc4)
* improve(ci): avoid duplicate release source guard scans * fix(ci): classify recovery browser test server ownership (#200402) (cherry picked from commit a62e4e1) * fix(ci): restore package harness startup Copy the runtime process dependency manifest into the dependency-free packaging fixture so the CLI reaches argument validation. The existing startup assertion continues to reject missing modules. (cherry picked from commit 84262af) * test(facetime): preserve child process exports in audio fixture (#200419) Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 36549cb) * test(browser): align fixtures with navigation and CLI contracts (#200428) Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit d0daf88) * fix: restore Codex qualification fixture contracts (#200450) * fix: restore Codex run-attempt qualification coverage Use the complete typed transcript recorder fixtures and assert post-acceptance submission after prompt persistence, matching #199695. No production behavior or timeout changes. Co-authored-by: RomneyDa <[email protected]> * test: align Codex refresh callback fixtures Co-authored-by: RomneyDa <[email protected]> --------- Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 8f0d03f) * fix(crabbox): join heartbeat command cleanup before retirement (#200466) (cherry picked from commit 6247dc4) * fix(agents): retain ambiguous completed-answer receipts * fix(qa): ignore workspace context when detecting continuation --------- Co-authored-by: Vincent Koc <[email protected]> Co-authored-by: RomneyDa <[email protected]>
) * improve(ci): avoid duplicate release source guard scans * fix(ci): classify recovery browser test server ownership (openclaw#200402) (cherry picked from commit 4a2270d) * fix(ci): restore package harness startup Copy the runtime process dependency manifest into the dependency-free packaging fixture so the CLI reaches argument validation. The existing startup assertion continues to reject missing modules. (cherry picked from commit 7dfdaec) * test(facetime): preserve child process exports in audio fixture (openclaw#200419) Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit b12070e) * test(browser): align fixtures with navigation and CLI contracts (openclaw#200428) Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit d623a9b) * fix: restore Codex qualification fixture contracts (openclaw#200450) * fix: restore Codex run-attempt qualification coverage Use the complete typed transcript recorder fixtures and assert post-acceptance submission after prompt persistence, matching openclaw#199695. No production behavior or timeout changes. Co-authored-by: RomneyDa <[email protected]> * test: align Codex refresh callback fixtures Co-authored-by: RomneyDa <[email protected]> --------- Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit d0d35ab) * fix(crabbox): join heartbeat command cleanup before retirement (openclaw#200466) (cherry picked from commit a823861) * fix(agents): retain ambiguous completed-answer receipts * fix(qa): ignore workspace context when detecting continuation --------- Co-authored-by: Vincent Koc <[email protected]> Co-authored-by: RomneyDa <[email protected]>
* improve(ci): avoid duplicate release source guard scans * fix(ci): classify recovery browser test server ownership (#200402) (cherry picked from commit a62e4e1) * fix(ci): restore package harness startup Copy the runtime process dependency manifest into the dependency-free packaging fixture so the CLI reaches argument validation. The existing startup assertion continues to reject missing modules. (cherry picked from commit 84262af) * test(facetime): preserve child process exports in audio fixture (#200419) Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 36549cb) * test(browser): align fixtures with navigation and CLI contracts (#200428) Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit d0daf88) * fix: restore Codex qualification fixture contracts (#200450) * fix: restore Codex run-attempt qualification coverage Use the complete typed transcript recorder fixtures and assert post-acceptance submission after prompt persistence, matching #199695. No production behavior or timeout changes. Co-authored-by: RomneyDa <[email protected]> * test: align Codex refresh callback fixtures Co-authored-by: RomneyDa <[email protected]> --------- Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 8f0d03f) * fix(crabbox): join heartbeat command cleanup before retirement (#200466) (cherry picked from commit 6247dc4) * fix(agents): retain ambiguous completed-answer receipts * fix(qa): ignore workspace context when detecting continuation --------- Co-authored-by: Vincent Koc <[email protected]> Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 60e0e21) Release adaptation: Preserve baseline authored-request continuation classifier and extractToolOutput import; newer #201244 behavior already exists. Apply runtime-context split and regression without downgrading it.: Backport review: #201130 selected by sibling; #201331 and #198760 are independent package script changes. #201244 classifier already present-equivalent on baseline.: (cherry picked from commit ad2ae0e0e2bf242ab0df9f9ca29f4f848caf478c)
) * improve(ci): avoid duplicate release source guard scans * fix(ci): classify recovery browser test server ownership (openclaw#200402) (cherry picked from commit a62e4e1) * fix(ci): restore package harness startup Copy the runtime process dependency manifest into the dependency-free packaging fixture so the CLI reaches argument validation. The existing startup assertion continues to reject missing modules. (cherry picked from commit 84262af) * test(facetime): preserve child process exports in audio fixture (openclaw#200419) Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 36549cb) * test(browser): align fixtures with navigation and CLI contracts (openclaw#200428) Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit d0daf88) * fix: restore Codex qualification fixture contracts (openclaw#200450) * fix: restore Codex run-attempt qualification coverage Use the complete typed transcript recorder fixtures and assert post-acceptance submission after prompt persistence, matching openclaw#199695. No production behavior or timeout changes. Co-authored-by: RomneyDa <[email protected]> * test: align Codex refresh callback fixtures Co-authored-by: RomneyDa <[email protected]> --------- Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 8f0d03f) * fix(crabbox): join heartbeat command cleanup before retirement (openclaw#200466) (cherry picked from commit 6247dc4) * fix(agents): retain ambiguous completed-answer receipts * fix(qa): ignore workspace context when detecting continuation --------- Co-authored-by: Vincent Koc <[email protected]> Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 60e0e21) Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 90fc6d5fa4c9d0f348e83ae63fd63c3072e03433)
What Problem This Solves
Strict plugin replacement can finish while a Crabbox heartbeat process is still alive. Scheduled main CI reproduces this in the existing real-process replacement test; the same assertion failed in an earlier full run.
User Impact
Crabbox heartbeat retirement waits for its command cleanup before replacement completes. An uncertain cleanup is reported through the retained stop/dispose promise rather than silently releasing the heartbeat owner.
Why This Change Was Made
The command runner intentionally permits a bounded return during startup cancellation while retaining physical cleanup separately. Heartbeats previously joined only the bounded result. Run each heartbeat in the existing command scope and retain its completion promise. Schedule retries after that scope settles, outside its async context, so the next heartbeat does not inherit a closed scope.
This changes only the heartbeat lifecycle; the command runner contract and provider protocol stay unchanged.
Evidence
pnpm tsgo:extensions, targeted oxlint and formatting passed.