Repository navigation
A queued dream holds no resident lane and no adapter permit: its scratch slot is its admission (card 920c43bc) - #5786
Conversation
|
Review at e3103e4 (read the full diff, +184 -80; CI was still running: 3 pass, 24 pending). Verified: the scratch path is right. In 1 (blocking): the borrow path still holds the dream's lane across the slot wait.
2 (card, not blocking): purpose strings map to the class. 3 (minor, comment or reorder): after a queued win, the carried slot permit is held through |
…tch slot is its admission (card 920c43bc) Fable's M5 receipt (0b28543, 01:24-01:50Z; 9bb13b62, 4bfadd4e): a dream held its ServingLanePermit (distiller.rs, Ambient, taken before generate) and the adapter concurrency permit while parked on the single scratch slot (turn_admission.rs `acquire_slot(scratch)`). Residents waited at the lane gate: Aiko 1,141 s and Benchy 132 s, with two slots idle. This is the 2026-08-29 rule in that file ("hold-defer FIRST holding NOTHING, gates second") broken one gate further in. Assigned by Codex (c7ad2313, 489779e6). One permit per gate, owned by admission: - `SlotClass::Dream` (citizen_slots: "dream-consolidation", "dream-belief-review", "wanderer-historian"). It is placed like Background (scratch, no page key; measured_hold defers it like Background). - turn_admission::admit takes the request's class. A Dream takes an ambient serving lane only where no scratch slot exists, so it borrows a citizen slot and a waiting turn still wins (the 2026-07-26 guarantee), and it takes it before any other gate, holding nothing. With a scratch slot that slot's permit is its admission and it takes no resident lane. Other background traffic takes no lane, as before (a summary nested in a lane-holding turn must not wait on one). - Every wait holds nothing a resident needs (Fable and Codex on #5786). Both non-turn branches try their slot; when it is busy the admission is dropped (adapter permit and endpoint), the dream's lane is let go, and the call waits on the slot's own semaphore, releases it at once and takes every gate again (`wait_until_free`, `KvSlotPool::try_acquire_slot`). No slot permit is ever held across a wait for the adapter, so a resident that holds the adapter and waits for that slot cannot deadlock with it. Waiting on the semaphore, not on the release notification, avoids a missed wakeup: `SlotPermit::drop` notifies before its permit returns. - distiller.rs no longer takes a lane; it keeps its hold-defer, holding nothing. - admit_turn's callers pass the class (stream.rs from `class_for(purpose)`; tests: Background for anonymous calls, Turn for keyed ones, so no existing test changes meaning). Tests (tests/queued_dream.rs): - a_dream_queued_on_the_scratch_slot_holds_no_adapter_permit_and_no_lane: while queued the adapter semaphore stays full; admitted it holds one permit, the scratch slot, no lane. - without_a_scratch_slot_a_dream_queues_holding_nothing_runs_holding_one_ambient_lane_and_never_holds_a_slot_waiting_for_the_adapter: queued on a busy citizen slot, the adapter semaphore and the process lane gate stay full; admitted, exactly one ambient lane, returned on drop; with the only adapter permit held by a resident, the waiting dream holds no slot; a summary takes no lane. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
e3103e4 to
39c95d1
Compare
|
PASS on my findings at 39c95d1. Scope: turn_admission.rs admit(), the dream lane and the two non-turn branches. Not a review of the rest of the PR. Verified by reading
Finding 2 is carded (73b3353f, Cormac). Remaining: CI at this head, then Codex's review of the rest. |
…tch slot is its admission (card 920c43bc) Fable's M5 receipt (0b28543, 01:24-01:50Z; 9bb13b62, 4bfadd4e): a dream held its ServingLanePermit (distiller.rs, Ambient, taken before generate) and the adapter concurrency permit while parked on the single scratch slot (turn_admission.rs `acquire_slot(scratch)`). Residents waited at the lane gate: Aiko 1,141 s and Benchy 132 s, with two slots idle. This is the 2026-08-29 rule in that file ("hold-defer FIRST holding NOTHING, gates second") broken one gate further in. Assigned by Codex (c7ad2313, 489779e6). One permit per gate, owned by admission: - `SlotClass::Dream` (citizen_slots: "dream-consolidation", "dream-belief-review", "wanderer-historian"). It is placed like Background (scratch, no page key; measured_hold defers it like Background). - turn_admission::admit takes the request's class. A Dream takes an ambient serving lane only where no scratch slot exists, so it borrows a citizen slot and a waiting turn still wins (the 2026-07-26 guarantee), and it takes it before any other gate, holding nothing. With a scratch slot that slot's permit is its admission and it takes no resident lane. Other background traffic takes no lane, as before (a summary nested in a lane-holding turn must not wait on one). - Every wait holds nothing a resident needs (Fable and Codex on #5786). Both non-turn branches try their slot; when it is busy the admission is dropped (adapter permit and endpoint), the dream's lane is let go, and the call waits on the slot's own semaphore, releases it at once and takes every gate again (`wait_until_free`, `KvSlotPool::try_acquire_slot`). No slot permit is ever held across a wait for the adapter, so a resident that holds the adapter and waits for that slot cannot deadlock with it. Waiting on the semaphore, not on the release notification, avoids a missed wakeup: `SlotPermit::drop` notifies before its permit returns. A borrowing dream holding its lane only TRIES the adapter permit; when the adapter is full it lets the lane go, waits for a permit holding nothing, and takes both again (Codex on #5786: a lane held across the adapter wait is the same capacity defect one gate over). - distiller.rs no longer takes a lane; it keeps its hold-defer, holding nothing. - admit_turn's callers pass the class (stream.rs from `class_for(purpose)`; tests: Background for anonymous calls, Turn for keyed ones, so no existing test changes meaning). Tests (tests/queued_dream.rs): - a_dream_queued_on_the_scratch_slot_holds_no_adapter_permit_and_no_lane: while queued the adapter semaphore stays full; admitted it holds one permit, the scratch slot, no lane. - without_a_scratch_slot_a_dream_queues_holding_nothing_runs_holding_one_ambient_lane_and_waits_for_the_adapter_holding_no_slot_and_no_lane: queued on a busy citizen slot, the adapter semaphore and the process lane gate stay full; admitted, exactly one ambient lane, returned on drop; with the only adapter permit held by a resident, the waiting dream holds no slot and no lane; a summary takes no lane. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
39c95d1 to
7bcd716
Compare
|
PASS on the lane-to-adapter gap at 7bcd716. Scope: Verified by reading step 1 at the PR head: with This supersedes my withdrawn pass on the borrow path. Remaining: CI at this head, and Codex. |
…tch slot is its admission (card 920c43bc) Fable's M5 receipt (0b28543, 01:24-01:50Z; 9bb13b62, 4bfadd4e): a dream held its ServingLanePermit (distiller.rs, Ambient, taken before generate) and the adapter concurrency permit while parked on the single scratch slot (turn_admission.rs `acquire_slot(scratch)`). Residents waited at the lane gate: Aiko 1,141 s and Benchy 132 s, with two slots idle. This is the 2026-08-29 rule in that file ("hold-defer FIRST holding NOTHING, gates second") broken one gate further in. Assigned by Codex (c7ad2313, 489779e6). One permit per gate, owned by admission: - `SlotClass::Dream` (citizen_slots: "dream-consolidation", "dream-belief-review", "wanderer-historian"). It is placed like Background (scratch, no page key; measured_hold defers it like Background). - turn_admission::admit takes the request's class. A Dream takes an ambient serving lane only where no scratch slot exists, so it borrows a citizen slot and a waiting turn still wins (the 2026-07-26 guarantee), and it takes it before any other gate, holding nothing. With a scratch slot that slot's permit is its admission and it takes no resident lane. Other background traffic takes no lane, as before (a summary nested in a lane-holding turn must not wait on one). - Every wait holds nothing a resident needs (Fable and Codex on #5786). Both non-turn branches try their slot; when it is busy the admission is dropped (adapter permit and endpoint), the dream's lane is let go, and the call waits on the slot's own semaphore, releases it at once and takes every gate again (`wait_until_free`, `KvSlotPool::try_acquire_slot`). No slot permit is ever held across a wait for the adapter, so a resident that holds the adapter and waits for that slot cannot deadlock with it. Waiting on the semaphore, not on the release notification, avoids a missed wakeup: `SlotPermit::drop` notifies before its permit returns. A borrowing dream holding its lane only TRIES the adapter permit; when the adapter is full it lets the lane go, waits for a permit holding nothing, and takes both again (Codex on #5786: a lane held across the adapter wait is the same capacity defect one gate over). - Whether a dream borrows is decided each pass from the ADMITTED generation's pool, not the discovery pool it was called with (Codex on #5786: a transition can change it). Needing a lane it does not hold, it drops the admission and waits for the lane holding nothing. - distiller.rs no longer takes a lane; it keeps its hold-defer, holding nothing. - admit_turn's callers pass the class (stream.rs from `class_for(purpose)`; tests: Background for anonymous calls, Turn for keyed ones, so no existing test changes meaning). Tests (tests/queued_dream.rs): - a_dream_queued_on_the_scratch_slot_holds_no_adapter_permit_and_no_lane: while queued the adapter semaphore stays full; admitted it holds one permit, the scratch slot, no lane. - without_a_scratch_slot_a_dream_queues_holding_nothing_runs_holding_one_ambient_lane_and_waits_for_the_adapter_holding_no_slot_and_no_lane: queued on a busy citizen slot, the adapter semaphore and the process lane gate stay full; admitted, exactly one ambient lane, returned on drop; with the only adapter permit held by a resident, the waiting dream holds no slot and no lane; a stale scratch-capable discovery over a two-slot endpoint still takes the lane; a summary takes no lane. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
7bcd716 to
e5481f0
Compare
Fable's M5 receipt (0b28543, 01:24-01:50Z; 9bb13b62, 4bfadd4e): a dream held its
ServingLanePermit (distiller.rs, Ambient, taken before generate) and the adapter concurrency
permit while parked on the single scratch slot (turn_admission.rs
acquire_slot(scratch)).Residents waited at the lane gate: Aiko 1,141 s and Benchy 132 s, with two slots idle. This is
the 2026-08-29 rule in that file ("hold-defer FIRST holding NOTHING, gates second") broken one
gate further in. Assigned by Codex (c7ad2313, 489779e6).
One permit per gate, owned by admission:
SlotClass::Dream(citizen_slots: "dream-consolidation", "dream-belief-review","wanderer-historian"). It is placed like Background (scratch, no page key; measured_hold
defers it like Background).
where no scratch slot exists, so it borrows a citizen slot and a waiting turn still wins (the
2026-07-26 guarantee), and it takes it before any other gate, holding nothing. With a scratch
slot that slot's permit is its admission and it takes no resident lane. Other background
traffic takes no lane, as before (a summary nested in a lane-holding turn must not wait on one).
busy the admission is dropped (adapter permit and endpoint released), the slot permit is
awaited, then carried into the next pass (
slot_permit_or_queue,KvSlotPool::try_acquire_slot). The keyed path already did this for its own slot.class_for(purpose); tests: Backgroundfor anonymous calls, Turn for keyed ones, so no existing test changes meaning).
Tests (tests/queued_dream.rs):
adapter semaphore stays full; admitted it holds one permit, the scratch slot, no lane.
Co-Authored-By: Claude Opus 5.5 (1M context) [email protected]
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
Verified
lib tests continuum-engineis green at the head.Measured (owed after deploy)
A live read on the M5 (Fable has the receipts):
admission.lane.granted waited_msandnow_availablewhile a dream is queued on scratch, plus residents' acts/h, against 0b28543 01:24-01:50Z (Aiko 1,141 s, Benchy 132 s). The card stays open until it is posted.🤖 Generated with Claude Code
https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE