cx-v9k2f: acpmux decides each session's lane (working, input, idle since, failed with why, lost)
Merged
TE
23d ago+2871+2871+0123456789012345678901234567890123456789-664-664-012345678901234567890123456789
Bead: cx-v9k2f (part 1 of 2; the app's lanes view follows in a second PR)
Problem
Leo, 2026-10-13: about 25 lanes sat idle for hours unnoticed, some dead on out-of-credit errors. acpmux decides each session's status dot (indicator), but nothing says how long a session has been in that state or why a turn failed. A daemon restart mid-turn also wrote a failed turn_result without recording it as the last turn, so that session read as idle.
Change
- Every session summary (
_acpmux/watch,session_changed,_acpmux/sessions) carrieslane = {state, since, error}. acpmux decides it once next toindicator, from the summary's own fields:workingsince its turn started;inputwhile a permission or question waits;idlesince its last turn ended, or since it was created;failedwith the last turn'serrorText;lostwhen the agent process is gone without an answer.- A closed session has no lane.
- Peer sessions get it too, and it's re-decided when a peer goes unreachable (
views::decidereplaces the three separateindicatorwrites). - Both
outcome_unknownpaths (a daemon restart, or a host that never got the prompt) now callrecord_last_turn. Those sessions readfailedwith the reason. restart_marks_unknown_outcomemoves totests/hub_integration/restart.rs, becausehub_integration.rswas at its 1500-line cap.- The
lastTurnkey list isviews::LAST_TURN_KEYS, sohub/turns.rs(over the god-file limit on base) does not grow.
Verification
- Red at b8305e5 (tests only), hosted
--filter lanes:::test result: FAILED. 0 passed; 5 failedon Linux and on macOS. Every lane test panicked because summaries had nolane. - Green on 7076fa6 (base 541435d), hosted
--filter lanes::and--filter restart_marks_unknown_outcome:lint (linux),test (linux)andmacOS lint and testspass.- One run's
release-path dogfood artifacts / build aarch64-apple-darwinfailed; the other run built the same SHA. That job is not part of this change.
- One run's
- Green again on fresh-merge head e8d8c24 (both filters):
lint (linux)andtest (linux)pass. crash_ratchet.py: ok.
Changelog
none
🤖 Generated with Claude Code