Close an exchange with a message, and owe one kind of activation (#66) - #67
Open
andreisavu wants to merge 1 commit into
Open
andreisavu wants to merge 1 commit into
andreisavu wants to merge 1 commit into
Conversation
A close of an exchange was a row beside the messages. The summary it owed had its own id shape, its own fold, its own retry accounting and its own set of end reasons. A pending wake had the same four things, written once more. Two machines answered one question: which activation does the room owe a seat, and when. A close is now a `closed` message on the record. It holds its person and the range it turned out to cover, it carries the assistant in `wakes` when the exchange owes a summary, and it reaches that seat the way every other message reaches one. So: - One fold answers every activation the room owes (`dueActivations` in `room/lease.ts`). `foldOwed`, `Owed`, `judged`, `withAttempts` and the second "came to nothing" set are gone. - One id shape names every activation, so `parseId` has one variant and `seatOf` no longer takes the assistant's name to read an id. - What an activation may do is read off the message that woke it (`handOf` in `room/view.ts`), rather than off the spelling of its id. - A checkpoint carries no closes. The log keeps every message, so every closed exchange is on the record whatever a checkpoint drops, and the floor is what says the room owes nothing for a close below it. `reads` and the floor lose their draft branches with it. - `messages()` holds every exchange boundary, so a host reads the history of exchanges from one read. Before this, a closed exchange was legible only on the event stream or by reaching past Ambion into Pi's session. Two behaviours changed with it. A running lease answers a close the way it answers any other message, so a resumed room waits for a dead run's draft lease to expire instead of re-sending the wake at once. Backlog item 30 is the same wait. `quiet` means what it says: a seat is live through its backoff, a draft included, so the room reports `quiet` only once it owes nothing. That closes backlog item 43. The routing's compose guard now asks whether the assistant holds a live lease, so a question that lands inside a draft's backoff still wakes it to compose. What the assistant is owed comes off `state.due` rather than a second scan of the closes, so one rule says what the room owes: a close the assistant judged stays judged, whether or not a checkpoint has passed it. The chaos sweep on both storages, the handover under load, 200 seeds of the walk and the history, and the full gate all pass. `test/support/chaos.ts` read the leases a dead run left after resuming the name, which let a claim of the new run's count as inherited; it reads them before the run exists. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XHJVkbjScXStrKhY27Xjtd
andreisavu
force-pushed
the
claude/library-simplification-review-8rnqnm
branch
from
September 11, 2026 14:07
0546ca9 to
4134f03
Compare
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.
A close of an exchange was a row beside the messages. The summary it owed
had its own id shape, its own fold, its own retry accounting and its own
set of end reasons. A pending wake had the same four things, written once
more. Two machines answered one question: which activation does the room
owe a seat, and when.
A close is now a
closedmessage on the record. It holds its person andthe range it turned out to cover, it carries the assistant in
wakeswhenthe exchange owes a summary, and it reaches that seat the way every other
message reaches one. So:
dueActivationsinroom/lease.ts).foldOwed,Owed,judged,withAttemptsand thesecond "came to nothing" set are gone, and
room/fold.tsdrops from 250lines to 115.
parseIdhas one variant andseatOfno longer takes the assistant's name to read an id.(
handOfinroom/view.ts), rather than off the spelling of its id.wire.tsholds one row type less.messages()holds every exchange boundary, so a host reads the historyof exchanges from one read. Before this, a closed exchange was legible
only on the event stream or by reaching past Ambion into Pi's session.
Two behaviours changed with it.
A running lease answers a close the way it answers any other message, so a
resumed room waits for a dead run's draft lease to expire instead of
re-sending the wake at once. Backlog item 30 is the same wait.
quietmeans what it says: a seat is live through its backoff, a draftincluded, so the room reports
quietonly once it owes nothing. Thatcloses backlog item 43. The routing's compose guard now asks whether the
assistant holds a live lease, so a question that lands inside a draft's
backoff still wakes it to compose.
The chaos sweep on both storages, the handover under load, 200 seeds of
the walk and the history, and the full gate all pass.
test/support/chaos.tsread the leases a dead run left after resuming the name, which let a claim
of the new run's count as inherited; it reads them before the run exists.
Co-Authored-By: Claude Opus 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01XHJVkbjScXStrKhY27Xjtd