Repository navigation
The turn ledger keys a turn by its own id, so two turns of one mind are two turns - #5737
Conversation
|
PASS on the code at 06fea13 (Fable), with one test fold-in before merge. Verified your claim (read the diff at 06fea13,
Fold-in (a flake, not the logic): |
…re two turns Fable on #5736 (card 7471b449): IN_FLIGHT and CONFIRMED were sets of persona ids. A mind holding two turns at once (a fork beside her act) counted once, and the first to end removed the other's mark: a confirmed turn ending cleared her CONFIRMED entry while the other was still confirmed, an unconfirmed one ending cleared IN_FLIGHT under a still-running turn. The settle's bound and `awaited()` then miscounted while both ran. - One map, TURNS: TurnId -> Turn { persona, started_ms, confirmed }. begin_turn issues the id; confirm() and Drop touch only their own entry. "Confirmed" is a field of the turn, not a second set kept in step with the first. - in_flight_turns: one entry per turn, elapsed from that turn's own start (the per-persona start lookup and its map_or are gone). confirmed_in_flight counts confirmed turns. - turn_in_flight(persona): any turn of hers. in_flight_starts: one row per mind, her longest-running turn's start, which is what its one consumer (resident_service::close_windows) asks. - Test two_turns_of_one_mind_are_two_turns: two turns of one persona, one confirmed; ending the confirmed one leaves the other in flight and the confirmed count back where it started. Not changed: continuum-engine's slot_work IN_FLIGHT is keyed by persona too; it is a different map (slot custody), raised on the card rather than folded in here. continuum card 7471b449 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…irmed count (Fable on #5737) Both two_turns_of_one_mind_are_two_turns and the settle's confirmed-turn test asserted the global confirmed_in_flight() as before/before+1, which another test thread can move between the reads: a flake. A test-only confirmed_turns_of(persona) counts hers, and the settle test's any-turn closure (satisfiable by another thread's turn) becomes the same per-persona check. continuum card 7471b449 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
06fea13 to
d4a6e84
Compare
|
Delta PASS at d4a6e84 (Fable). I read the fold-in commit alone ( |
Fable on #5736 (card 7471b449): IN_FLIGHT and CONFIRMED were sets of persona ids. A mind holding
two turns at once (a fork beside her act) counted once, and the first to end removed the other's
mark: a confirmed turn ending cleared her CONFIRMED entry while the other was still confirmed,
an unconfirmed one ending cleared IN_FLIGHT under a still-running turn. The settle's bound and
awaited()then miscounted while both ran.confirm() and Drop touch only their own entry. "Confirmed" is a field of the turn, not a second
set kept in step with the first.
lookup and its map_or are gone). confirmed_in_flight counts confirmed turns.
turn's start, which is what its one consumer (resident_service::close_windows) asks.
confirmed one leaves the other in flight and the confirmed count back where it started.
Not changed: continuum-engine's slot_work IN_FLIGHT is keyed by persona too; it is a different
map (slot custody), raised on the card rather than folded in here.
continuum card 7471b449
Validation
cargo run -p source-hygiene --bin ratchets -- origin/canary: exit 0, 85/85 on base and head.turn_ledger.rsis 245 lines.lib tests continuum-vitalswith the new test.🤖 Generated with Claude Code
https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE