Replaces #2344 (done on main in 910954a0). test/boards-sampler.test.ts proves a day of 15 s samples stays bounded. Nothing proves the coarse half: 30 days of 5-minute points, with the oldest dropped.
Done looks like:
[ ] A test in test/boards-sampler.test.ts feeds record (src/boards/ring.ts) 31 simulated days of points at 15 s, advancing now. After it, the coarse rows per series are at most 30 × 288 (plus the open window), and none is older than COARSE_KEEP_MS.
[ ] The fine rows are still at most a day's worth.
[ ] The test runs in under 5 s. Batch the inserts if it needs to.
[ ] bun test test/boards-sampler.test.ts passes. Quote it.
Files: test/boards-sampler.test.ts, src/boards/ring.ts only if the bound does not hold.
Replaces #2344 (done on main in 910954a0).
test/boards-sampler.test.tsproves a day of 15 s samples stays bounded. Nothing proves the coarse half: 30 days of 5-minute points, with the oldest dropped.Done looks like:
test/boards-sampler.test.tsfeedsrecord(src/boards/ring.ts) 31 simulated days of points at 15 s, advancingnow. After it, the coarse rows per series are at most 30 × 288 (plus the open window), and none is older thanCOARSE_KEEP_MS.bun test test/boards-sampler.test.tspasses. Quote it.Files:
test/boards-sampler.test.ts,src/boards/ring.tsonly if the bound does not hold.