Repository navigation
fix(logs): report a multiplexer outage once, with its cause - #351
Conversation
A few seconds of agterm unavailability produced a full traceback every second from the session-protocol poll, plus one skip line per second from the status poll and one every two seconds from the session monitor. A longer outage buries the errors around it under thousands of identical lines and says nothing about which backend call failed. - runtime.poll: log one warning when the outage starts and one info when it recovers, instead of a traceback per retry. - status poll and monitor: route the skip notice through log_throttled. - agterm _tree: name the failing step (window list or tree read) and the window, so an unconfirmed listing has a diagnosable cause.
[Low impact] The change reaches recurring multiplexer polling logs in the bot. The PR appears safe to merge, with a non-blocking issue in when recovery is reported. Findings
|
| if unavailable: | ||
| unavailable = False | ||
| logger.info("Session protocol source recovered") |
There was a problem hiding this comment.
poll reports recovery before queued hooks finish. During a transcript outage, refresh() can succeed because _update() catches the error, while queued permission hooks still fail in _match_hook(). With several such hooks queued, successive passes emit “recovered” followed by another warning and traceback for the same outage.
Move the recovery message and flag reset after the hook loop, and add a test with failing queued hooks.
Archfit: Architecture needs attention · advisory · no baselineNext: Advisories never block. Review the listed dimensions and diagnostics on the archfit/state check. 98 advisories · never block
On every row: Imbalanced coupling · critical · across modules · high volatility.
Why: functional coupling across a module boundary to a volatile target: a change on one side forces a change on the other (Balanced Coupling: critical severity) Why: intrusive (implementation-level) coupling across a module boundary to a volatile target: a change on one side forces a change on the other (Balanced Coupling: critical severity) Evidence and inputsDecision
Dimensions
Evidence gaps
Inputs and identity
Measurement is customer-attested: the producer is authenticated, the report content is not independently checked. For coding agentsAgent tasks[] |
A few seconds of agterm unavailability logged a full traceback every second from the session-protocol poll, one skip line per second from the status poll, and one every two seconds from the session monitor. A longer outage buries the errors around it and never says which backend call failed.
ProtocolRuntime.poll: one warning when the outage starts, one info when it recovers, instead of a traceback per retry.log_throttled.AgtermManager._tree: name the failing step (window listortree --window <id>) and the window, so an unconfirmed listing has a diagnosable cause.Tests: new
test_runtime_outage_logging.py; assertions added to the agterm, polling coordinator, and session monitor suites. Full non-integration suite passes (8142 passed, 25 skipped); ruff, pyright, and the multiplexer boundary audits are clean.