Expand description
srv’s own panics, counted and made visible.
On 2026-11-15 narko’s srv panicked about 30,000 times in two hours. The panics went to the log and nowhere else, /health
kept answering, and nobody knew until an agent’s send failed (docs/incident/RCA_BUILD_SLOT_IDLE_NOTE_POISONS_MESSAGE_HANDLER_2026_11_15.md).
install_hookchains a panic hook that counts every panic by where it happened. The log stays as it is: the earlier hook runs first, and the hook itself only counts.start_reporterlooks at the count every few seconds. AboveWARN_ABOVEpanics in the last minute it publishes thesrv-panicsevent (the status bar’s backend dot and notices follow it) and, once an hour, holds an[AgentMux]note for every agent. The event is persisted, so a window that opens mid-storm gets the current state.snapshotis what/healthandapp.healthreport.
The decisions are pure (Counts), so they are tested without a clock or a panic.
Structs§
- Counts
- What the watch knows: a per-second ring for the last minute, a total, and a count per place.
- Panic
Place - One place that panicked, and how often.
- SrvPanics
Event - The
srv-panicsevent’s payload (mps_events::SrvPanics), shaped like the host’shealth-signalpayloads so the status bar’s store takes it unchanged:kindispanics, and anormallevel clears the signal. - Step
- What a look found: the event to publish, and the note to hold for the agents.
Enums§
Constants§
- CRITICAL_
ABOVE - More than this is critical.
- NOTE_
KEY - The key of the held note: a later note replaces an earlier one that its agent has not read yet.
- WARN_
ABOVE - More panics than this in the last minute is a warning.
Functions§
- install_
hook - Counts every panic from now on. The earlier hook (the default one, which writes the message) runs first and unchanged.
- note_
text - What the agents are told.
- short_
location crates\srv\src\backend\reactive\handler.rsand line 1416 asbackend/reactive/handler.rs:1416: below the lastsrc/, with forward slashes, so a build path never leaves the machine.- snapshot
- What this srv’s panics add up to now, with the handler lock’s recoveries.
- start_
reporter - Looks at the count every few seconds, on a thread of its own: publishes the event and holds the note. A failed look costs that look, not the watch.