Repository navigation
fix(boot): busy is not dead — ONE lane verdict (bounded, retried /health AND the process's own activity) with a receipt per pid; the shell's second criterion that reaped the M5's lane mid-generation is deleted (card b57b19fd) - #4252
Conversation
…ealth AND the process's own activity) with a receipt per pid; the shell's second criterion that reaped the M5's lane mid-generation twice is deleted (card b57b19fd)
2026-09-20, the M5, two deploys in one morning: the box sat at 0 GB free / 4.9 GB swap (the
engine's cache grant had filled it), the tracker stopped the core for a source build, and
tools/scripts/start-server.sh's adopt_or_reap_llama_lanes ran ONE 3 s curl against a 32 GB lane
6,460 tokens into a turn at 11.9 t/s. The HTTP thread answered late under pressure; the lane was
killed as "unhealthy". Cost each time: every mind's KV, a cold 27B load, a boot at 1 × 2,048 with
a 26 GB grant, a grow-back relaunch. Joel: "Timeouts are where I see AIs typically ruin a project
out of instability."
Two owners of one kill decision was the defect: the Rust boot plan (`step_adopt_lanes`, a single
3 s probe via `lane_health_by_pid`) and the bash loop — the same guess in two places.
Now:
- `lane_process::lane_verdict(pid) -> LaneVerdict { Healthy, Busy, Dead }` — identity-verified,
then TWO signals: `/health` asked LANE_PROBE_ATTEMPTS × LANE_PROBE_BOUND_S (3 × 5 s, sized for
a loaded box and named with the measurement that sized them) AND the process's CPU share
(`cpu_pct_of`, sysinfo single-pid). PURE `verdict_from(answered_on, cpu_pct, last_error)`:
answered → Healthy; missed + working (≥ LANE_BUSY_CPU_PCT) → Busy (ADOPTED — the core's
readiness check proves decode before a citizen is seated); missed + frozen or unsampled → Dead.
- The boot step adopts Healthy and Busy, reaps only Dead, and every fate is a receipt: the boot
line carries "pid N: <evidence>" and a `boot.lane_verdict` probe carries pid/adopt/evidence.
- The bash loop is deleted (strangler rule, as its own comment promised); the core's step is the
only place a boot decides a lane's fate.
Tests: `busy_is_not_dead_the_verdict_needs_two_signals` (the four cells of the verdict table),
`a_slow_answer_within_the_bound_is_healthy` (a listener that answers 4 s late is healthy under
the 5 s bound where the old 3 s shot read it as dead; a port nobody listens on misses with the
reason carried).
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
APPROVE — reviewed at exact head 2a67e81 (checks running at read time; merge on green). The class is the one I keep a rule for — a timeout sized against the fast tier fails silently on the slow one, and an expired guard is indistinguishable from no guard — and the fix is the right shape: two signals, a pure One nit, not a condition, for the doc on |
…rmac's nit on #4252) Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
What broke (the M5, 2026-09-20, twice in one morning)
The box sat at 0 GB free / 4.9 GB swap (the engine's cache grant had filled it), the tracker stopped the core for a source build, and
start-server.sh'sadopt_or_reap_llama_lanesran one 3 s curl against a 32 GB lane 6,460 tokens into a turn at 11.9 t/s. The HTTP thread answered late; the lane was killed as "unhealthy" (✗ reaping unhealthy llama lane (pid 56926 … then 82041)). Cost each time: every mind's KV, a cold 27B load, a boot at 1 × 2,048 with a 26 GB grant, a grow-back relaunch. Joel: "Timeouts are where I see AIs typically ruin a project out of instability."Two owners of one kill decision: the Rust boot plan (
step_adopt_lanes→lane_health_by_pid, one 3 s probe) and the bash loop — the same guess in two places.The fix — one verdict, two signals, a receipt
lane_process::lane_verdict(pid) -> LaneVerdict { Healthy{attempt}, Busy{cpu_pct,last_error}, Dead{reason} }: identity-verified, then/healthaskedLANE_PROBE_ATTEMPTS × LANE_PROBE_BOUND_S(3 × 5 s — constants named with the measurement that sized them) and the process's CPU share (cpu_pct_of, sysinfo single-pid across its minimum interval).verdict_from(answered_on, cpu_pct, last_error): answered → Healthy; missed + working (≥LANE_BUSY_CPU_PCT) → Busy, adopted (the core's readiness check proves decode before a citizen is seated and relaunches if not); missed + frozen or unsampled → Dead. An absence never exonerates.boot_plan::step_adopt_lanesadopts Healthy and Busy, reaps only Dead; the boot line readsN adopted, M reaped [pid X: busy (…cpu 140% — decoding, adopted); …]and aboot.lane_verdictprobe carries pid / adopt / evidence per lane, so a reap is auditable.Tests
busy_is_not_dead_the_verdict_needs_two_signals— the verdict table (answered; missed+working → adopt; missed+frozen → dead; unsampled → dead).a_slow_answer_within_the_bound_is_healthy— a TCP listener that answers 4 s late is Healthy under the 5 s bound (the old 3 s shot read it dead); a port nobody listens on misses every attempt with the reason carried.Not in this PR
The pressure that made the box slow (the cache grant sized against the free memory it then consumes) is card 7b01ed65, next.
🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo