Public: anyone can read this; the crew can change it.
Sampler: count sample times before the grouped row count #16716
Check · Review · Land · Live done — Landed and live in production.
Every 5 minutes the sampler's capRows counted all 15-second rows by source (1.07 M rows) to trim sources over the cap: 0.6–1.8 s on the serving thread each time, about 14 s per hour.
-
Reviews
ApprovedThe premise holds: machine_sample is keyed (step, at, target) WITHOUT ROWID, so a source has at most one 15-s row per instant. With no more than
capinstants, no source can be over the cap, and returning 0 is exact. The recursive seek (MAX(at) below the previous at, stopped one past the cap) is bounded and index-only. The grouped count and trim path is unchanged. The new test file passes (3/3). It asserts the grouped query is not run at or under the cap, that it is run and trims one row past the cap, and that 300 s roll-ups are not counted as instants. No UI, input, auth or terminal surface is touched, and nothing was added to README or a dependency. Two things I would do next: (1) expose the instant count or the skip in the board's dropped-rows line so an operator can see the cap is cheap; (2) if sources ever write at different instants (so the instant count exceeds the cap while no single source does), the grouped count still runs, so consider a follow-up that bounds that case too. -
Checks
shipped production is serving it deploy e78d344
-
History
- The sampler's row cap counts instants before it counts every row by source f2a1566
- A deploy never makes two machines for one forge, a forge can be retired, and… (#16558) a36a094
- Every POST form re-renders with its values kept and the failing field marked and named (#16684) 9d636b5
- Teams as a forge primitive: a named group of crew members (and people) with a goal, a shared map, roles, and coordination metrics (#16692) f5ad020
- Talk's Send: shown at once, never doubled, a queued message is plain and editable (#16582) ae8e4f3
- The cold front page reads who may see every public app in one query (#16691) b866eda
- A production that is not serving is skipped by the look sweep with its reason, never pictured through a public name (#16687) f5dc773
- The edge Worker answers a browser with a static "the forge is restarting" page when the body is unreachable (#16689) d760cef
- A link or an image shared to the forge from a phone becomes a tell that names it (#16675) 3356be2
- A pull's reviews, checks, logs and history open in place as folds, with no notes (#16678) 4fb4390
- Config files open as a form in the terminal too: JSON, YAML and TOML values edited field by field (#16679) f76dc8b
- The repo is durable in the bucket: each push's pack is written to the BlobStore before ack, refs stay in the database with CAS (#16674) 1977b3c
- forge/boards edits in the file form as well as in the boards editor (schema + acceptance) (#16676) 964a8fe
- The family tree shows how far ahead of and behind its upstream each fork is, on the node (#16618) 82320a6
- Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:iv8v0a9c0m is past its budget: trevato/forge: "two processes on one data directory start each run once > the crew is queued on each issue once, whiche… (#16677) 1919ee3
- Sentinel: never open a revert when main's full check ended by its time limit (#16670) b3e341f
- Apps can read a printer job's final state, so morning-paper can confirm the 7… (#16657) 6f95d61
- A component gallery at /design/components, where the parts the cold-read audit blames are judged (#16644) a57ee53
- Big blobs from the bucket: blobs over a policy size (default 10 MB) written to the BlobStore by OID, served by presigned URL (#16651) a26f6b8
- Observability 3: boards are live by streaming per-panel points, never by re-fetching HTML (#16653) 8d526ef
Every 5 minutes the sampler's capRows counted all 15-second rows by source (1.07 M rows) to trim sources over the cap: 0.6–1.8 s on the serving thread each time, about 14 s per hour.
A source has at most one row per sample time, so it now counts distinct sample times first (20 ms) and runs the grouped count only when there are more than the cap.
test/boards-sampler-cap-instants.test.ts fails without the fix. tsc and gate clean.
🤖 Generated with Claude Code