Skip to content

feat(work): room-scoped card state change (change_work_card_state_in) — WRITE half of the #345 class - #1363

Merged
joelteply merged 1 commit into
canaryfrom
fix/room-scoped-card-state-change
Aug 16, 2026
Merged

feat(work): room-scoped card state change (change_work_card_state_in) — WRITE half of the #345 class#1363
joelteply merged 1 commit into
canaryfrom
fix/room-scoped-card-state-change

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Reads grew work_board_in while every mutate stayed pinned to current_room(). Live consequence (continuum, 2026-08-15): the bench-grade sweeper's first tick had 21 auto-closes refused in one pass — every target card lived in a room its author wasn't standing in, error: "work card X is not in current room …; switch to the card's room before mutating it".

Change: change_work_card_state_in(room, req) — the mutate sibling of work_board_in. Guard keeps full strength: card must be on the named room's board (ensure_work_card_in_room, with the current-room check as its projection). Event frame addressed to the named room's channel via publish_work_event_in over the existing send_frame_to_room primitive. Current-room verb becomes a thin wrapper — one implementation, one guard.

Tests: work_board_room_scoped gains the write-side case: current-room mutate of an out-of-room card still refuses; scoped mutate lands on the named room's card without moving the pointer; a card not on the NAMED room's board refuses.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…class

Reads grew work_board_in while every mutate stayed pinned to current_room():
a multi-room supervisor (continuum's bench-grade sweeper, first live tick
2026-08-15) had 21 auto-closes refused in one pass because every target card
lived in a room its author wasn't standing in.

change_work_card_state_in(room, req) is the mutate sibling of work_board_in:
the guard keeps its strength (card must be ON the named room's board — now
ensure_work_card_in_room, with the current-room fn as its projection) and the
event frame is addressed to the named room's channel via a new
publish_work_event_in over the existing send_frame_to_room primitive. The
current-room verb is a thin wrapper — one implementation, one guard.

Integration test extends work_board_room_scoped: out-of-room mutate still
refuses on the current-room path, the scoped mutate lands on the named room's
card without moving the pointer, and the guard refuses a card that isn't on
the NAMED room's board.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit 103fd89 into canary Aug 16, 2026
12 checks passed
@joelteply
joelteply deleted the fix/room-scoped-card-state-change branch August 16, 2026 03:10
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