Skip to content

fix(work): work/heartbeat and work/release act where the card lives — the _in forms, never a room switch - #4331

Merged
joelteply merged 1 commit into
canaryfrom
e2aea0e6/manual-heartbeat-release-in-the-cards-room
Sep 22, 2026
Merged

joelteply merged 1 commit into
canaryfrom
e2aea0e6/manual-heartbeat-release-in-the-cards-room

Conversation

@joelteply

@joelteply joelteply commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

fix(work): work/heartbeat and work/release act where the card lives — the _in forms, never a room switch

Card e2aea0e6. Manual work/heartbeat called the current-room verb, which re-checks the CURRENT room's board and refuses a card that lives elsewhere (WorkCardNotInCurrentRoom) — after resolve_card_id had already found it across every board she stands in. Benchy's work/heartbeat ✗ on d33e928a from the fleet room, 2026-09-21. work/release papered over the same refusal by JOINING the card's room and retrying — moving her current room as a side effect of releasing a card. The automatic renewal (airc_runtime) already used heartbeat_work_claim_in; the manual verbs now do the same: room_holding_card → heartbeat_work_claim_in / release_work_claim_in (airc #1446, in the pin). Release keeps its join-and-retry only for a card on no board she stands in (a fresh bench round's run room), where the join is the way to the card, not a side effect.

No new fixture: the room-scoped verbs are pinned by airc's a_claim_is_renewed_and_released_where_the_card_lives_not_where_she_stands (#1446); continuum has no two-room board fixture. modules::work::tests → 17 passed / 0 failed. Live proof: a citizen heartbeating from the fleet room a card that lives in another.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

… the _in forms, never a room switch

Card e2aea0e6. Manual work/heartbeat called the current-room verb, which re-checks the CURRENT room's board and refuses a card that lives elsewhere (WorkCardNotInCurrentRoom) — after resolve_card_id had already found it across every board she stands in. Benchy's work/heartbeat ✗ on d33e928a from the fleet room, 2026-09-21. work/release papered over the same refusal by JOINING the card's room and retrying — moving her current room as a side effect of releasing a card. The automatic renewal (airc_runtime) already used heartbeat_work_claim_in; the manual verbs now do the same: room_holding_card → heartbeat_work_claim_in / release_work_claim_in (airc #1446, in the pin). Release keeps its join-and-retry only for a card on no board she stands in (a fresh bench round's run room), where the join is the way to the card, not a side effect.

No new fixture: the room-scoped verbs are pinned by airc's a_claim_is_renewed_and_released_where_the_card_lives_not_where_she_stands (#1446); continuum has no two-room board fixture. modules::work::tests → 17 passed / 0 failed. Live proof: a citizen heartbeating from the fleet room a card that lives in another.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
@joelteply

Copy link
Copy Markdown
Contributor Author

Read both hunks at d1ca2842b. The fix is right, and the shape of the fallback is the part worth naming.

room_holding_card → the _in form when a subscribed board holds the card; the un-scoped form only when no board she stands in has it. That asymmetry is correct and the comment earns it: for a card on a board she can already see, moving her room is a side effect with no purpose; for a fresh bench round's run room, the join is the way to the card, not an accident. Keeping join-and-retry for exactly that case rather than deleting it wholesale is the judgement I'd have wanted and would probably not have made.

And the diagnosis in the comment is the useful artefact: resolve_card_id already found the card across every subscribed board, then the current-room verb re-checked the current room and refused. Two resolvers with different scopes on one path — the first generous, the second narrow — so the refusal contradicted a lookup that had already succeeded. That is why Benchy's work/heartbeat ✗ read as "your card does not exist" when it plainly did.

A correction to my own record, since this PR is the counter-example to it. On airc#1448 I posted that run_link/run_relink "still bind to the current room", found on inspection that they read work_board_complete and are room-agnostic, and corrected myself. That correction was right about those two verbs — and I stated it too broadly, as though the class were empty. It was not: work/heartbeat and work/release were genuinely current-room-scoped, and Benchy hit it. My instinct about the class was sound; I pointed at the wrong instances, then over-corrected into saying there was nothing there.

The generalisable bit, which I'd rather write down than repeat: "these two are fine" is not "the class is empty." Disproving an instance disproves an instance. I already have the discipline for proving a negative by counting the search space — I did it for the branch scan tonight — and did not apply it to my own retraction.

One note, non-blocking: room_holding_card is now called on both paths, so a card on no subscribed board costs a full-projection read before the fallback. Almost certainly irrelevant at these sizes, and correctness-first is the right trade — flagging only so it is a known cost rather than a discovered one.

CI still running. Word at the exact head when it lands.

@joelteply

Copy link
Copy Markdown
Contributor Author

Live receipt for the defect, 2026-09-22 ~01:50Z, Benchy (2f50b223) on the M5, verbatim from her turn: card d33e928a-61b5-45ad-87dc-deec3769d6a2 is not in current room academy (3be59578-…); switch to the card's room before mutating it. — a P0 card she holds, refused on heartbeat because she was standing in academy. That is the exact WorkCardNotInCurrentRoom this PR removes from the manual verbs.

@joelteply

Copy link
Copy Markdown
Contributor Author

Second live receipt, 2026-09-22 ~06:50Z, Kimi (e2f0e022) on the 5090, verbatim from her turn: work card d61513e4 is not in current room coder-gym-round-1 (f96…) — heartbeat on a card that lives in cambriantech, refused because her turn ran in a bench round room. Her heartbeats have failed on every turn taken outside the card's room for the last hour (five ✗ in the feed); the lease lapses at 30 min without one, which is how she was cut twice earlier tonight. This PR routes the manual heartbeat to room_holding_card and would have renewed it.

@joelteply

Copy link
Copy Markdown
Contributor Author

APPROVE at exact head d1ca2842bdcafd5b1f9dcf712bfab0920c7f476c. All 6 green, verified directly.

Joel has cleared the hold on this one. It was held at his call, not on anything about the code — the code has been green and reviewed for hours, and I said so at the time to avoid it reading as a withheld verdict.

One honesty correction while landing it, because the case for clearing partly rested on a diagnosis that has since refined: this is not the whole cause of Kimi losing d61513e4. Cormac measured it — her claims did reach the wire, and the one-card reconciler stripped each within five minutes to keep a bench card her own puller took at 07:40 (card d6e8b4cd, P1). The room-scoped verb in this PR is real and it produced work card d61513e4 is not in current room coder-gym-round-1 from a bench room, five times in an hour — so it's a genuine cost and worth fixing. But merging this alone will not stop her losing that card.

Cormac's guidance to her was the actual unblock: release the bench card first, then claim once, because the reconciler only fires above one held card.

So: this lands on its own merit — a card-scoped verb should act where the card lives, not where the citizen stands — and d6e8b4cd remains open as the thing that was actually taking her work.

Yours to merge.

@joelteply
joelteply merged commit aeba2bf into canary Sep 22, 2026
6 checks passed
@joelteply
joelteply deleted the e2aea0e6/manual-heartbeat-release-in-the-cards-room branch September 22, 2026 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant