Repository navigation
fix(workboard): moving a claimed card to done or blocked leaves its owner unable to start new work - #184241
Conversation
…cked Moving a claimed, dispatched card to done or blocked through workboard_move, update, bulk update, reassign, or release with a status kept its claim, its running execution, and its open attempts. complete() and block() clear all of them; the other status writers did not, so the stale claim or running execution kept holding the owner's dispatch slot and the owner's next card never started. All status writers reach updateCard, so the teardown now runs there for a manual (not lifecycle-sourced) transition into done or blocked that would leave the run active. It reuses the finishRun teardown that complete() and block() use, counts a move to blocked as a failed attempt, and records the matching completed/failed notification. complete(), block(), and reclaim() already clear the run before writing, so they are not processed twice. Review is unchanged. Owner-slot accounting and lifecycle sync are untouched. finishRun and the status-write helpers move into store-status-write.ts so store-core.ts does not grow past its line cap.
When a claimed card's run had already ended (the execution is done and the attempt succeeded), a manual move to done or blocked still ran the full run teardown and emitted a completed or failed notification. updateCard then re-derives the attempt and failure count from the execution, so a move to blocked reported a failed run while recording it as succeeded. The teardown now runs only when the write ends an active run (a running execution or running attempt). A claim left after its run ended is just released: no notification, failure count untouched. Trim the tests to one case per distinct failure: moves to done and blocked, a non-move writer (update), a block() double-count guard that also covers later blocked writes, and the ended-run claim case. Review staying claimed is now an assertion in the existing move-scope test.
|
🦞👀 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 changesSettle claims, execution records, attempts, and notifications when a card is manually moved to done or blocked. Example: Agent agent-a moves its running card to blocked while another card is ready.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR repairs a current Workboard dispatch-starvation bug; no actionable patch defects were found, and exact-head CI remains pending. Priority: P1 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherWorkboard tools, CLI commands, and Gateway mutations converge on the shared card writer, whose persisted claim and execution state determines dispatch capacity. flowchart TD
A[Tools CLI and Gateway] --> B[Shared card writer]
B --> C[Lifecycle provenance check]
C --> D[Manual terminal settlement]
D --> E[Revision checked persistence]
E --> F[Dispatch capacity]
E --> G[Notifications]
Technical reviewBest possible solution: Land shared terminal settlement while preserving claim authorization, nonterminal ownership, and lifecycle provenance. Do we have a high-confidence way to reproduce the issue? Current-main source establishes retained claim and execution state after manual terminal moves, corroborated by the supplied before-and-after built Gateway capture; this review executed no target code. Is this the best way to solve the issue? The smallest complete repair belongs in updateCard and reuses existing teardown, separating stale-claim release from active-run settlement to avoid false failures and duplicate notifications. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 871ae80ed1a3. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +80, Tests +120. Total +200 across 6 files. Added test files: 0. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label 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 HistoryReviewed October 26, 2026, 8:43 PM ET / October 27, 2026, 00:43 UTC (Revision 3). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Built Node 24.22.1 Gateway; main e1a4a10 versus candidate 9612537 (comment-only simplification atop the tested candidate build). Workboard/Anthropic enabled with shipped plugin commands. Public workboard.cards.create/dispatchWithOptions, authenticated HTTP /tools/invoke workboard_move, public card listing and agent.wait; ordinary worker requests received by a local Anthropic protocol fixture. The provider response remained pending until AFTER the move and next-dispatch oracle, so the running cases do not depend on a lucky completion race. Each scenario's claims were retired through the public release action only after recording its result, avoiding cross-scenario owner interference. Ended successful runs retain their succeeded attempt, zero failure count, and no extra notification on the candidate. Active -> done emits one completed notification and ends the attempt succeeded; active -> blocked emits one failed notification, ends the attempt blocked, and increments failure count exactly once. After releasing provider responses and waiting for the original runs, final terminal status remains done/blocked, claims remain absent, and blocked failure count remains one. The done execution can subsequently become review on the ordinary successful-worker lifecycle update, but never running again. 19 focused Workboard tool tests passed, including wrong-owner claim refusal, direct update, done/blocked transitions, blocked idempotency, and already-ended-run slot release. All six changed files pass formatting/lint. Both repository-supported runtime builds passed. Simplification: reuse one finishRun owner, trim seven comment lines; production +160/-80, tests +121/-1. No schema, status, config or permission changes. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Landed in a88d599. Thanks @jondihaynes. Terminal Workboard moves now release claims so the owner's next card dispatches. |
…wner unable to start new work (openclaw#184241) fix(workboard): release claims and settle running work when a card moves to a terminal column Moving a claimed or running Workboard card to a terminal column (done or blocked) kept its claim and running state, so the owner looked busy and their next card never dispatched. A terminal move now settles the execution, releases the claim and lets the owner's next card dispatch. Evidence: shipped Workboard create and dispatch plus authenticated workboard_move on a built Gateway. Moving an ended, claimed run to blocked: on main the claim stayed and 0 cards dispatched; with this change the claim was released and 1 dispatched (twice each). Moving cards whose workers were still running to done or blocked: on main the running state and claim stayed and 0 dispatched; with this change the execution settled, the claim was released and 1 dispatched. After the original workers finished, the terminal status persisted, and already-ended successful runs got no false failure or notification. Details: openclaw#184241 (comment). Production +160/-80. Thanks @jondihaynes. Co-authored-by: Ayaan Zaidi <[email protected]>
…wner unable to start new work (#184241) fix(workboard): release claims and settle running work when a card moves to a terminal column Moving a claimed or running Workboard card to a terminal column (done or blocked) kept its claim and running state, so the owner looked busy and their next card never dispatched. A terminal move now settles the execution, releases the claim and lets the owner's next card dispatch. Evidence: shipped Workboard create and dispatch plus authenticated workboard_move on a built Gateway. Moving an ended, claimed run to blocked: on main the claim stayed and 0 cards dispatched; with this change the claim was released and 1 dispatched (twice each). Moving cards whose workers were still running to done or blocked: on main the running state and claim stayed and 0 dispatched; with this change the execution settled, the claim was released and 1 dispatched. After the original workers finished, the terminal status persisted, and already-ended successful runs got no false failure or notification. Details: #184241 (comment). Production +160/-80. Thanks @jondihaynes. Co-authored-by: Ayaan Zaidi <[email protected]> (cherry picked from commit a88d599) Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit e64bf44730a3b1164ad74e786a9fe0e43f353a53)
What Problem This Solves
Fixes Workboard owners becoming unable to start their next card after a claimed card is manually moved to done or blocked.
User Impact
Terminal moves release the owner claim and settle active execution/attempt state. Moving an already-ended run only releases its stale claim, without recording an extra failure or notification. Review and lifecycle-sourced moves keep their existing semantics.
Why This Change Was Made
Manual status writers already converge on updateCard. Reuse the existing complete/block teardown there instead of leaving run state behind. The extracted status-write owner shares the existing lifecycle preflight and finishRun; it adds no schema, status, option or permission rule.
Thanks to @jondihaynes for the fix and regression coverage.
Evidence
Built Gateway capture.
Built Gateway with Workboard enabled through shipped commands; real worker sessions use a local Anthropic protocol fixture. Public card create/dispatch and authenticated
/tools/invokeworkboard_move reproduce owner starvation after a finished claimed run is moved from review to blocked: main dispatches no next card twice, while this head releases the claim and dispatches the next card twice. The successful attempt and zero failure/notification counts remain unchanged.Running-worker terminal moves also retain claim/execution/attempt state on main and clear/finish it here. Focused Workboard tool tests and changed-file formatting/lint passed. Both repository runtime builds passed.
Simplification removed seven walkthrough-comment lines. Production +160/-80; tests +121/-1. The necessary growth centralizes terminal teardown across existing status writers; no parallel implementation remains.
Merge danger
Two-way door for code, but a revert cannot recreate claims or reopen attempts already settled by this version. Blast radius is manual Workboard terminal status changes with stale claims or active run state; ordinary review/lifecycle updates remain guarded by the existing provenance rules.