feat(work): room-scoped card state change (change_work_card_state_in) — WRITE half of the #345 class - #1363
Merged
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reads grew
work_board_inwhile every mutate stayed pinned tocurrent_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 ofwork_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 viapublish_work_event_inover the existingsend_frame_to_roomprimitive. Current-room verb becomes a thin wrapper — one implementation, one guard.Tests:
work_board_room_scopedgains 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