The machine sampler's row cap
The machine sampler (src/boards/sampler.ts) writes a 15-second row per source (machine_sample,
one target each: the forge's pod, each cell, the node, each CPU). The cap bounds how many of those
rows one source keeps (#15160).
- The limit.
sampler.rows_per_source, 6,000 rows by default (240 to 100,000), on the owner's limits page. - A backstop. The age rule (
system/retention_samples.ts) already keeps a day, 5,760 rows a source, so under the defaults the cap never drops anything. It bites when points come faster than every 15 s, when the age rule stops, or when an owner lowers the cap under a day. - What goes. The oldest 15-second rows of a source past the cap. Coarser steps are not touched. The count is taken once per 5-minute window, not on every tick.
- Where it shows. Only once something was dropped:
- Web: the machine board's "What this machine measures" fold says "N oldest rows dropped since this forge started."
- Terminal: the System dialog says the same line under the machine.
- The count restarts with the forge. It is held in the process, not in the database.
- Tests.
test/boards-sampler-cap.test.ts: the oldest rows go, the newest stay, the board and the terminal read the count.