Key a session's record streams by member (martha#240) #242
Loading…
Reference in a new issue
No description provided.
Delete branch "pluto/240-session-record-per-member"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes nothing; the fix for martha-ai/martha#240, found by the proof run martha-ai/martha#239.
An engine launch makes its own
GOOSE_PATH_ROOT, so the engine names its first session<date>_1in every launch. The crew keeps a session's records as streams named by session id alone, in one rows directory. Two members started on the same day therefore wrote one stream, the secondflushappended with anexpected_lengththe first writer had already passed, andkeepbroke that session for the rest of its launch (ROW_STREAM_MOVED). On the #239 crew the supervisor and the builder were both refused on session20261126_1before their first turn answered.session_records_in_rows:sessionRecordsIntakes the member and keys every stream it names. The engine launch passes it. A Claude Code launch keeps the names it had: its session ids are UUIDs, and a crew declared before this must keep reading the streams it wrote.apply_the_owners_release: the release streams follow the same key, written and read.release_a_held_member: reads the member's stream first and the session-id-only name after it, somartha releasestill reaches a member whose record was written before this, and puts the mark on the stream it read.Test:
src/session_records_in_rows/session_records_in_rows.node-test.ts, "two members whose session ids collide keep their own record streams"; the two affected files run 17 of 17 green in a namespace of their own, andtsc --noEmitand eslint are clean on the changed files.Refs martha-ai/martha#239, martha-ai/martha#240