Skip to content

feat(workboard): queue a node-ticket start on a full slot and stay on the board - #52

Merged
tomorrowflow merged 8 commits into
mainfrom
feat/workboard-start-queue
Oct 13, 2026
Merged

tomorrowflow merged 8 commits into
mainfrom
feat/workboard-start-queue

Conversation

@tomorrowflow

@tomorrowflow tomorrowflow commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

Problem

Operators start several node tickets in a row from the Workboard. Two things got in the way:

  1. Every successful Start opened the card's session, including autonomous starts. For a node ticket that session is dev's view-only link session; the work runs on the node. Starting three cards meant bouncing board → session → board three times.
  2. A Start that found the node-ticket pool or the card's route full was refused with a busy toast. The operator had to come back later and click again. D56 already queued one case (a reviewed rework/answer reopen), but a fresh start had no queue.

Solution

Queue (D71). The operator's workboard.cards.start on a full slot records metadata.automation.startRequest: { requestedAt } and one notice comment, and returns { queued: true, card } instead of throwing. The card stays in todo (a backlog card moves to todo in the same write).

  • Only the operator's exact start or a reviewed D56 reopen can write the request. ready was not usable as the marker: dependency promotion, schedules, reclaim, promote and agent moves all produce it, and dev must never start a card. Update/create patches, agent tools and normalizers drop the field (allowAutomationLaunch gate).
  • updateCard clears the request whenever the card can no longer hold it (claimed, archived, blocked, moved out of todo/ready). Moving a card to backlog cancels; moving it back does not resurrect the request.
  • One drain in createNodeTicketHandoffs().resume() (already woken by every store change, no timer) starts queued cards oldest-first. A card whose route is still full keeps its place; a later card on a free route still starts, so a busy Mac never holds back the Linux pool. A card that changed mid-start stays queued; any real refusal blocks it with the reason.
  • D56's self-retrying slot wait is folded into the same queue. An unreviewed reopen is never queued, so its backlog bounce still happens.
  • Only a full slot queues. A card the claim would refuse anyway (parents not done, scheduled for later, retry budget used up) gets that reason at Start on a full slot exactly as on a free one; the claim and the exact start share one workboardClaimRefusal.

UI. Autonomous starts (Start, Run Claude, Run OpenAI) stay on the board; interactive Open still opens the session. A queued card shows an hourglass "Queued" chip on its tile and disables every start control.

Evidence

  • Mocked-Gateway Control UI proof (Playwright, two node tickets, second start on a full pool), before = main, after = this branch. Screenshots: feat(workboard): queue a node-ticket start on a full slot and stay on the board #52 (comment)
    • before: first Start navigates to /chat/dev/subagent/workboard-…; second Start shows a red busy toast and Start stays enabled; the tile looks unqueued.
    • after: URL stays /workboard after both starts; second card shows disabled "Queued" in its detail and a Queued chip on its tile.
  • Tests (pnpm test <file> --maxWorkers=1, warm): gateway-node-ticket-stop.test.ts 7 tests 12.1 s; node-ticket-handoff.test.ts 28 tests 24.4 s; view-card-actions.test.ts 12 tests 1.7 s; view-card-content.test.ts 2 tests 1.7 s. Full workboard src 463 tests and browser 247 tests pass. Each required case was checked to fail with its fix removed.
  • run-tsgo on tsconfig.extensions.json and test/tsconfig/tsconfig.extensions.test.json: workboard clean; the only errors are the pre-existing qa-lab @openclaw/crabbox-provider missing-module errors.
  • Two independent reviews: the first round's four findings are fixed in 8143a30/e7332a04644; the second round's precondition gap in 36a3fd1. The second review found nothing else serious.

Impact

No schema change; the request lives in the card JSON the store already owns. Update behavior: none (no config, no migration). Docs: docs/plugins/workboard.md "Queued starts".

🤖 Generated with Claude Code

tomorrowflow and others added 8 commits October 11, 2026 22:59
…is full

workboard.cards.start on a node ticket whose pool or route is full now
records metadata.automation.startRequest, posts one notice, and returns
{ queued: true, card } with the card left in todo. The handoff resume
drains queued tickets oldest request first; a ticket whose own route is
still full keeps its place without holding back a later ticket on a free
route, and any other refusal blocks the card with the reason.

Only the store's queue write can set the request: update, create, and
agent tools drop it, and every card write clears it once the ticket
leaves todo or ready, is claimed, or is archived. A reviewed D56 reopen
that finds no slot joins the same queue instead of retrying on its own.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…tart

Start, Run Claude, and Run OpenAI no longer open the started session, so
starting several cards does not bounce between the board and sessions;
Open Claude and Open OpenAI still do. A queued node ticket's Start reads
Queued and is disabled, and the queued start response replaces the card
without an error.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…drain blocks

A published or questions ticket without a review comment or answer is no
longer queued, so the D56 bounce back with the next step still runs
instead of the drain starting a round with no feedback. Starting a
backlog ticket on a full slot moves it to todo and queues it in the same
write; moving it back to backlog still cancels. A queued start that loses
a race to a card edit (a write conflict, or changed authority before the
claim) keeps its request and retries on the next change instead of
blocking the card.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…art controls

A queued node ticket shows a Queued chip in the tile's meta row, which
stays visible without hover, and in the list row. Run and Open in an
engine are disabled too, since any other start or session would collide
with the queued autonomous start.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…eing it

The claim's card preconditions (parents not done, scheduled for later,
retry budget exhausted) now live in one workboardClaimRefusal that both
the claim and the exact start's selection use. An exact start checks
them before the slot, so on a full slot the operator gets the same reason
as on a free one and the card is not queued; previously the drain later
hit the refusal and blocked a card that dependency promotion then never
revived. Only a refusal for the slot alone carries the full slot that
queues a start.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@tomorrowflow

Copy link
Copy Markdown
Owner Author

Before / after (mocked Gateway, Playwright, two node tickets, pool of 1)

Step Before (main) After (this branch)
First Start before: Start opens dev's view-only subagent session after: stays on the board, card detail shows Running
Second Start, pool full before: red busy toast, Start still enabled after: disabled Queued button, no error
Second card's tile before: tile looks unqueued after: hourglass Queued chip on the tile

@tomorrowflow
tomorrowflow merged commit 8c2d987 into main Oct 13, 2026
1 check passed
tomorrowflow added a commit that referenced this pull request Oct 13, 2026
* style(workboard): bring store-card-helpers back under the 700-line cap

#51 and #52 each stayed under the cap and together reached 701 lines on
main. The attempt rebuild carries contextTokens in one line.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(workboard): run git diff --check at node-ticket import

Both of dev's defect verdicts in the Phase 4 window were a failing
`git diff --check` that the session reported done anyway. The host clone
now runs it over the imported range before it creates the ticket branch.
A failure adds a failed `import check` proof entry and blocks the card
with the command and output first, so the re-run session reads them and
fixes them with a new commit in the same node worktree.

A rework round checks only its own commits: the rework record gains
`startCommit`, the branch tip the round started from, so a reviewer's
commits or an "Update branch" merge of main never block the session.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(workboard): leave a failed import's pending record to the re-run

A re-run claims the card while it still carries the pending handoff of
the failed import, and the handoff sweep fires on that claim. It then
imported the old head again: an import-check failure blocked the re-run
before its session could fix it, and a generic failure jumped to review
mid-start. A pending record older than the card's claim now belongs to
the start that replaces it.

The rework round's starting tip is checked as a commit id before it
reaches host git. The start queue tests move to their own file to keep
the handoff tests under the line cap.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
@tomorrowflow
tomorrowflow deleted the feat/workboard-start-queue branch October 13, 2026 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant