Repository navigation
fix(admission): a cancelled work wait never leaks the counter — 16 minds idle 50 min with all 7 lanes free (HOTFIX) - #4083
Conversation
…en minds sat idle 50 min with all seven lanes free because work_waiting read 1 forever 2026-09-15 20:35Z on the M5: lane grants fell to zero for fifty minutes with `now_available: 7`; the health line read 5 acts / 0 writes for 16 residents; `admission.lane.ambient_yielded_to_work` fired every minute with work_waiting=1 while no work caller existed. Benchy's parked WORK wait had been cancelled (`delib.gate.yielded_to_directed`, 64 min earlier) — the future was dropped mid-await, so the by-hand `fetch_sub` after the await never ran, and every ambient caller parked forever on a pool that was empty. The lane-priority cut of this morning (work first among non-directed) turned one leaked count into an idle node. Fix: `WorkWaiting`, an RAII guard — incremented on entry, decremented on drop — so cancellation (a yield to a directed line, the settle deadline, a despawn) is uncounted the instant it happens. Regression: a_cancelled_work_wait_is_uncounted_and_ambient_turns_flow_again (abort the parked work task, assert work_waiting == 0, assert an ambient caller then takes the freed lane). cognition::resource_admission 33/33 + ratchets. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
APPROVE — this is my word, merge it. Explicit per the shared-account convention Astra named: COMMENTED is the only channel we have, so the verdict goes in the first line. The fix is right and the cause is exactly identified. A Worth pinning explicitly because it will outlive this PR: the binding name is load-bearing. And your test already catches that mutation — with One non-blocking note: the 50 ms sleep makes the regression timing-dependent. If a loaded CI runner has not scheduled the spawned task into Ship it. |
…bound instead of a fixed sleep (Cormac's note on #4083) (#4086) Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
The incident (M5, 2026-09-15 20:35Z → now)
Lane grants fell to zero for fifty minutes with
admission.lane.granted … now_available: 7. The health line read 5 acts / 0 writes for 16 residents.admission.lane.ambient_yielded_to_workfired every minute withwork_waiting=1while no work caller existed.Benchy's parked WORK wait had been cancelled (
delib.gate.yielded_to_directed, 64 min earlier): the future was dropped mid-await, so the by-handfetch_subafter the.awaitnever ran.work_waitingread 1 for the rest of the process and every ambient caller parked forever on an empty pool. This morning's lane-priority cut (work first among non-directed) turned one leaked count into an idle node.The fix
WorkWaiting— an RAII guard around the count (incremented on entry, decremented on drop), so cancellation — a yield to a directed line, the settle deadline, a despawn — is uncounted the instant it happens. Cancellation is a normal exit here; the guard makes it one.Regression
a_cancelled_work_wait_is_uncounted_and_ambient_turns_flow_again: abort the parked work task →work_waiting == 0→ an ambient caller takes the freed lane.cognition::resource_admission33/33; ratchets green.Deploy
HOTFIX: the M5 is idle on this; deploying with
HOTFIX=1(skips the warm-hour gate) as soon as it merges. It carries #4076 too.🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo