Expand description
The rules that read the record, so nobody has to look (docs/specs/SPEC_LONG_RUNNING_ZERO_DEGRADATION_2026_11_16.md §7, task #47820).
Once an hour, when the hour that ended is rolled up, two rules run over what the record already holds. Each
thing they find is one event of kind flag, written beside the stalls (events-YYYY-MM.jsonl, kept a year):
- stalls: more than three stalls of 5 s or more in the hour, or one over 20 s;
- growth: a size whose trend rose over each of the last two days by more than the margin and by more than its floor, and that more content does not explain.
A flag is a line in the record: it is read with the events (App record, kind events) and stops nothing.
What is said of it, to the person and to the machine’s steward, is record_notice.
What the growth rule reads, and what it leaves out:
- the
corepart and eachcore:row (srv, the host, the GPU process), only over two days in which srv did not start again: a start lowers a size and the climb back is not a leak; - each window’s page: its JS heap and its element count, against its mounted rows. A window that holds more rows holds more, so a rise the rows explain is not flagged;
- not the rows of agents and terminals (an agent CLI’s memory is not AgentMux’s), and not a renderer’s process row, which the record cannot set against a window’s content.
Structs§
Constants§
- KIND
- The kind of a flag’s line among the record’s events.
Functions§
- found
- What the rules find for the hour that ended at or before
now_ms, less what the record already says. - growth_
flags - The growth rule over the two days that end at
end(an hour’s start): a series whose trend gained more than [MARGIN] of its level and more than its floor on each day, where its content (a page’s rows) did not rise by at least [CONTENT_EXPLAINS] of that share on either day. - look
- Run the rules for the hour that just ended and write each new flag as an event at that hour’s end. BLOCKING (file reads and an append). A failure is logged: the rules are never a reason for the record to fail.
- stall_
flags - The stall rule over one hour’s events: per kind, more than [
STALLS_MANY] stalls of [STALL_COUNTED_MS] or more, or one over [STALL_LONG_MS]. One flag per kind at most; many stalls is the one said when both hold. - still_
said - The flags among
eventsthat are still said atnow_ms, oldest first: the newest of each rule and key, while it is younger than its rule’s time.