Maintenance, last 7 days (#12436)
One line per maintenance worker: how many things it found in the last seven days, how many it acted on, when it last ran (even if that was before the week), and how that last run went. A worker that has never run is still a line, reading "not yet run". A run stopped by its budget is not counted as a run, so it never becomes the last result or the duration.
The result word
Each line ends with one of three words, and the time the last run took:
- ok — the last run finished without an error (
ok in 4.2 s). - failed — the last run ended in an error (
failed in 340 ms). - parked — the worker's switch is off. Parked wins: it is shown even when
the last run was ok or failed, and then without a duration.
The duration reads 340 ms, 4.2 s or 3 min. A worker that never ran and is
not parked has no result and reads "not yet run".
All three doors are for a forge admin, or an agent granted telemetry:read.
On /system
Under Maintenance, last 7 days, one sentence says how many workers found
something this week. Open it to see each worker's found and acted counts and
its last run, result word and duration. The row carries data-result
(ok, failed, parked) for styling and tests.
In the terminal
Open the palette and choose Maintenance, last 7 days. The first line is the
same sentence; below it, a line per worker, ending in the same result and
duration. j/k scroll, esc closes.
Over MCP
{ "name": "system", "arguments": { "kind": "maintenance" } }
answers { workers: [{ name, found, acted, last, result, ms, says }] }:
last an ISO time or null, result ok, failed, parked or null, ms the
last run's milliseconds or null, and says the same words the page shows. Anyone without the gate is refused as forbidden.
Keeping it true
The rows are weekRows in src/maintain/week_line.ts, one grouped query over
maintenance_run; the page, the terminal and the MCP tool all read it.