Repository navigation
fix(admission): the directed reserve is a WAIT guarantee, not a lane count — a card-holder skips the anti-stampede permit, the reserved lane is lent to bounded work, the directed wait rides the health line (card 9a9019b4) - #4250
joelteply merged 3 commits into
Conversation
…count — a card-holder is not a stampede response, the reserved lane is lent to bounded work while nothing directed is pending, and the directed wait rides the health line The M5's first two bounded hours (03:39–05:39Z 9/20): resident 4 · lanes 2 @ 67k · lane grants 11 and 11 · acts 6 and 4 · writes 1 and 0. Two lanes, one lane's throughput. Why: the non-directed budget is lanes−1 = 1, the last lane reserved so a directed call (a human speaking unnamed, a mention) always finds one; a card-holder's work turn woken by room traffic is Ambient attention, so it held the #171 anti-stampede permit (budget 1) and the Work lane inside that same budget of 1 — four minds serialized through one lane at 3–6 min a turn while the second lane idled for a mention that came once all night. Cormac's design word, applied as stated: the reserve is a guarantee on the WAIT a directed call may suffer, in seconds — lanes−1 was the cheapest way to buy it when a turn was 30 s, and on a 2-lane node at 3–6 min a turn it bought it by idling half the box. - A card-holder is not a stampede response. `service_loop` reads her held cards off the board she keeps (`act_question::card_is_held`, the ONE predicate the work gate also uses) and skips the #171 ambient permit for her; the lane gate's `LanePriority::Work` still bounds her and ambient turns still yield to her. Probe `persona.turn.work_holder_bypasses_ambient_permit`. - The reserved lane is LENT to bounded work: `reserve_lendable(expected, directed_pending, budget)` (pure) — only while no directed line is pending for any citizen here (`directed_pending::any_pending`, the re-arm) and only when the call's expected occupancy fits inside `INTERACTIVE_TTFT` (60 s). The occupancy is the mind's own bound: prefill of the prompt she did not have cached last turn at the box's measured prefill rate (`prefill_rate::rate_for`) plus her last output at its measured decode rate (`decode_knee::tps_for`, the lightest trusted point). Unknown = not lent. Probe `admission.lane.reserve_lent_to_work {expected_ms, budget_ms}`. `acquire_serving_lane` takes the bound; Directed and Ambient callers pass None. - The guarantee is measured in its own unit: `note_directed_lane_wait_ms` at the faculty's gate for priority turns, `directed_lane_wait_ms()` as (p50, p90, n), and the health line says "directed wait p50 4s / p90 61s (3 calls)" when any directed call waited — never a fabricated zero when none did. Honest receipt on the M5 today: a warm work turn there costs ~150 s (8k uncached at 105 tok/s + 1,100 tokens at 14 tok/s), past the 60 s budget, so the reserve is NOT yet lent on that box — the permit bypass is the gain tonight, and the loan pays as card 9a9019b4's cache and prompt levers bring a turn under the budget. Later (Cormac): size the reserve by measured directed demand, Erlang-style. Tests: `the_reserved_lane_is_lent_only_to_bounded_work_while_nothing_directed_is_pending`, `directed_wait_percentiles_are_nearest_rank`, `the_lightest_trusted_point_is_one_turns_ decode_rate`, and the health line pins the directed-wait text and its absence. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…s the occupancy bound (None for directed and ambient callers) Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
APPROVE with one condition — reviewed at exact head ba181f2 (checks running at read time). The shape is what I asked for and cleaner than I said it: The condition — the loan must never PARK. One nit, not a condition: |
… by a try-acquire on a physical lane that is free now; no free lane = the ordinary Work wait (Cormac's condition on #4250) A lent Work call that fell into the FIFO physical acquire would put a later directed arrival behind its whole occupancy (2× the budget with one parked, 3× with two). Now the loan is a try_acquire_resized on the physical semaphore; None = no loan, she takes acquire_nondirected_as_work as before. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
APPROVE — reviewed at exact head 355a7a1. The condition is taken in the right shape: the loan is a try_acquire_resized on the PHYSICAL semaphore and the lent permit IS the lane; no free lane = no loan = acquire_nondirected_as_work as before, so nothing non-directed can park ahead of a directed arrival. Merge on green. Follow-up, not a condition: the scenario pin (2 lanes, A Work + B lent, C Work, then D Directed; D takes the next free lane before C) is cheap now that the structure makes it pass, and it is the test that catches the next refactor that reintroduces the park. |
The ceiling (M5, first two bounded hours)
resident 4 · lanes 2 @ 67k · lane grants 11 and 11 · acts 6 and 4 · writes 1 and 0. Two lanes, one lane's throughput: the non-directed budget is lanes−1 = 1 (the last lane reserved for a directed call), and a card-holder's work turn woken by room traffic is Ambient attention, so it held the #171 anti-stampede permit (budget 1) and the Work lane inside that same budget — four minds serialized through one lane at 3–6 min a turn while lane two idled for a mention that came once all night.
Cormac's design word, applied as stated
The reserve is a guarantee on the wait a directed call may suffer, in seconds, not a lane count.
service_loopreads her held cards off the board (act_question::card_is_held, the one predicate the work gate also uses) and skips the Revise README to reflect cluttered environment #171 permit for her;LanePriority::Workstill bounds her at the lane gate and ambient turns still yield to her. Probepersona.turn.work_holder_bypasses_ambient_permit.reserve_lendable(expected, directed_pending, budget)(pure): only while no directed line is pending for any citizen (directed_pending::any_pending, the re-arm) and only when the call's expected occupancy fitsINTERACTIVE_TTFT(60 s). Occupancy = prefill of the prompt she did not have cached last turn at the measured prefill rate + her last output at the measured decode rate (decode_knee::tps_for, lightest trusted point). Unknown = not lent. Probeadmission.lane.reserve_lent_to_work.directed wait p50 4s / p90 61s (3 calls), and nothing when no directed call waited.Honest receipt
A warm work turn on the M5 today costs ~150 s (8k uncached at 105 tok/s + 1,100 tokens at 14 tok/s), past the 60 s budget, so the loan does not fire there yet; the permit bypass is tonight's gain, and the loan pays as card 9a9019b4's cache and prompt levers bring a turn under budget. Later: size the reserve by measured directed demand (Erlang-style).
Tests
the_reserved_lane_is_lent_only_to_bounded_work_while_nothing_directed_is_pending,directed_wait_percentiles_are_nearest_rank,the_lightest_trusted_point_is_one_turns_decode_rate, and the health line pins the directed-wait text and its absence.🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo