Skip to content

fix(workboard): moving a claimed card to done or blocked leaves its owner unable to start new work - #184241

Merged
obviyus merged 4 commits into
openclaw:mainfrom
jondihaynes:fix/workboard-move-terminal-clears-claim
Oct 27, 2026
Merged

obviyus merged 4 commits into
openclaw:mainfrom
jondihaynes:fix/workboard-move-terminal-clears-claim

Conversation

@jondihaynes

@jondihaynes jondihaynes commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

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/invoke workboard_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.

…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.
@clawsweeper

clawsweeper Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Oct 26, 2026
@clawsweeper

clawsweeper Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Settle 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.

  • Before: The first card retains its claim and running execution, preventing the next card from dispatching.
  • After: The claim is removed, the attempt is blocked once, and the next card can dispatch.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Focused shared-owner repair with shipped-entry-point proof and distinct regression coverage; serialized formats remain unchanged, requiring no migration.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (logs): The built Gateway capture exercises authenticated workboard_move and public dispatch with real worker sessions and an Anthropic protocol fixture: active done/blocked moves settle once, ended-run moves release only stale claims, subsequent same-owner dispatch succeeds, and late completion preserves terminal card status.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Moving a claimed card to done or blocked can leave its owner unable to start the next card.
Reason: Restores consistency with existing completion and blocking operations without adding configuration, permissions, schemas, or public APIs.

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
Reviewed head: 96125372bae2b40264df7d5d5e2e810d9a05fd4e

Before merge

None.

Findings

None.

Agent review details

How this fits together

Workboard 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]
Loading

Technical review

Best 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

  • Manual movement and claim isolation keeps the original intent (feat(workboard): add move command to CLI and workboard_move tool #96554: Provide manual movement across operator surfaces while checking agent claim scope inside the queued mutation.)
  • Shared teardown and notification construction keeps the original intent (89c01cd: Consolidate run settlement and notifications while retaining existing authority and write-settlement ownership.)
  • Lifecycle status provenance keeps the original intent (Fix Workboard status persistence #89600: Prevent stale lifecycle status writes from overriding manual choices while retaining non-status reconciliation.)
  • Store capability layers keeps the original intent (151a259: Split the store into cohesive modules while preserving one persistence and mutation-ordering boundary.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit a976d41 adds extensions/workboard/src/tools.test.ts:610 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: a976d4134bf1; files: extensions/workboard/src/tools.test.ts)
  • ruizcrp: Raw commit 40cf6c5 adds extensions/workboard/src/tools.test.ts:594 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 40cf6c51b35e; files: extensions/workboard/src/tools.test.ts)

PR surface

Source +80, Tests +120. Total +200 across 6 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 5 160 80 +80
Tests 1 121 1 +120
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 281 81 +200

Review metrics

Metric Value Why it matters
Production versus test changes Production +160/-80; tests +121/-1 Growth adds terminal settlement and relocates existing teardown to one reusable owner; regressions cover active runs, ended runs, direct updates, double settlement, and review exclusion.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #119592
Summary: This PR repairs the focused done/blocked transition defect; restart recovery and nonterminal claim handoff remain separate concerns.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

No label changes.

Label justifications:

  • P1: Manual terminal moves can retain owner capacity and prevent subsequent ready cards from dispatching.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-26T05:32:50.816Z sha dc52768 :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-26T07:00:33.738Z sha dc52768 :: needs maintainer review before merge. :: none

Reviewed October 26, 2026, 8:43 PM ET / October 27, 2026, 00:43 UTC (Revision 3).

@jondihaynes

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 26, 2026
@obviyus

obviyus commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

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.

Scenario                         main                  candidate
Ended run, review -> blocked #1  claim retained; next0  claim removed; next1
Ended run, review -> blocked #2  claim retained; next0  claim removed; next1
Held running worker -> done     running+claim; next0   done/no claim; next1
Held running worker -> blocked  running+claim; next0   blocked/no claim; next1

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.

@obviyus

obviyus commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Oct 27, 2026
@obviyus
obviyus merged commit a88d599 into openclaw:main Oct 27, 2026
117 of 122 checks passed
@obviyus

obviyus commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

Landed in a88d599. Thanks @jondihaynes. Terminal Workboard moves now release claims so the owner's next card dispatches.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 27, 2026
…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]>
RomneyDa added a commit that referenced this pull request Oct 28, 2026
…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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P1 High-priority user-facing bug, regression, or broken workflow. plugin: workboard proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants