Skip to content

A tally store is stamped with the buckets, not the clock - #175

Merged
torstei merged 1 commit into
mainfrom
tally/stamp-the-bucket-not-the-clock
Sep 6, 2026
Merged

A tally store is stamped with the buckets, not the clock#175
torstei merged 1 commit into
mainfrom
tally/stamp-the-bucket-not-the-clock

Conversation

@torstei

@torstei torstei commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Drops logline_lag before it ships, and removes the reason it existed.

The stamping

Sink::write stamped now_ms. A chunk's window is now the min/max of the
bucket stamps in it (append_windowed), so both of a tally store's clocks are
the minutes its lines are about, and --from/--to selects its chunks exactly.
A backfill of last month lands in chunks stamped last month, where selection
prunes.

The rule the receive intakes already follow — ROADMAP.md:441, "both intakes
stamp chunks with the sender's EVENT time". Stamping the moment of
computation was the odd one out.

The recorded justification was stale. docs/plans/tally.md said the gap made "a
revision written an hour late findable on the first" — revisions were replaced by
displacement, so nothing arrives late any more and the gap carried no
information. Nothing read it: cursors hold the chunk seq, not a time
(format.rs:139), and duplicate buckets are combined by the field's own rule
(timbergraph.py:264), not by arrival order.

The knob

Gone entirely — the manifest key, its parse-check, the widening that consulted
it, the derivation on every provisioned store, the info line and the prose.
WIDEN_MS is the minute of widening it always was, unchanged for every store
on disk.

Set too low it selects no chunk and answers nothing, which reads exactly like a
quiet minute; set wide enough for a backfill it prunes nothing and every query
is a full scan. Its one reliable value was the one tally derived, and tally no
longer needs it. The case that remains — an arrival-stamped store whose lines
carry earlier stamps — is ROADMAP.md:16's zone-map sidecar, which answers it
exactly and cannot be set wrong.

One consequence, documented

timberfs tally | timberfs append --into X is stamped on arrival, as any pipe
is, so a logline window over that store finds nothing. That is append's
meaning, not tally's. Noted where the pipeline is shown in deployment.md and
in timberfs(1).

Tests

  • what_is_written_reports_the_minutes_it_is_about pins the window the write
    path stamps with, including the !meta line's stamp.
  • The VM logline-window assertion moved from the hand-rolled append pipeline
    to tally_provisioning_end_to_end, where it now runs with nothing
    declared
    : the source lines are dated 2026-09-06 and the run is today, so a
    store stamped at computation time would fail it.

Net −82 lines.

A chunk's window is now the min/max of the bucket stamps in it, so both
of a tally store's clocks are the minutes its lines are about and
`--from`/`--to` selects its chunks exactly. It stamped the moment of
computation before, which put the two axes a bucket and a grace apart.

That gap was what `logline_lag` existed to bridge, and it goes with it:
the manifest key, its parse-check, the widening that consulted it, the
derivation on every provisioned store, and the prose. `WIDEN_MS` is the
minute of widening it always was, unchanged for every store on disk.

The knob was not worth having. Set too low it selects no chunk and
answers nothing, which reads exactly like a quiet minute; set wide enough
for a backfill it prunes nothing and every query is a full scan. Its one
reliable value was the one tally derived, and tally no longer needs it.
The remaining case — an arrival-stamped store whose lines carry earlier
stamps — is the ROADMAP's zone-map sidecar, which answers it exactly.

⚠ `timberfs tally | timberfs append` is stamped on arrival, as any pipe
is, so a logline window over that store finds nothing. Documented where
that pipeline is shown; the VM test asserts the window over a store a
PROVISIONING wrote, which is the path that has to work.
@torstei
torstei merged commit fe905fd into main Sep 6, 2026
7 checks passed
@torstei
torstei deleted the tally/stamp-the-bucket-not-the-clock branch September 6, 2026 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant