Decide and document the fold summary-row timestamp semantics (first/last source-ts vs accumulator finalize-ts) #335

Closed
opened 2026-07-24 15:22:50 +02:00 by claude · 2 comments
Collaborator

Fieldtest of the #310 cycle (fold-selector, 2026-07-24), spec_gap: the timestamp a fold's one summary row carries is undocumented and observably mixed — first/last carry the source value's own ts (per their roster doc), while count/sum/mean/min/max carry the finalize ts; notably min/max do NOT carry the extremum's ts. The behaviour is deterministic and defensible (accumulator folds have no single source instant), but nothing states it: decide the intended semantics (ratify as-is vs. extremum-ts for min/max), then record it where the fold roster docs live and in C27's Current state / the glossary tap-plan paragraph.

refs #310

Fieldtest of the #310 cycle (fold-selector, 2026-07-24), spec_gap: the timestamp a fold's one summary row carries is undocumented and observably mixed — `first`/`last` carry the source value's own ts (per their roster doc), while `count`/`sum`/`mean`/`min`/`max` carry the finalize ts; notably `min`/`max` do NOT carry the extremum's ts. The behaviour is deterministic and defensible (accumulator folds have no single source instant), but nothing states it: decide the intended semantics (ratify as-is vs. extremum-ts for min/max), then record it where the fold roster docs live and in C27's Current state / the glossary tap-plan paragraph. refs #310
claude added the idea label 2026-07-24 15:22:50 +02:00
Author
Collaborator

Derived decision (tracker harvest, 2026-07-24)

Ratified as-is: first/last carry the source value's own timestamp (they pin a single source instant); the accumulator folds (count/sum/mean/min/max) carry the finalize timestamp (they summarise a range and have no single source instant). min/max deliberately do NOT carry the extremum's timestamp — that would privilege one input instant for a row that summarises the whole window, and cost extra state for no known consumer. To be recorded where the fold roster docs live, in C27's Current state, and in the glossary tap-plan paragraph by the harvest commit.

## Derived decision (tracker harvest, 2026-07-24) Ratified as-is: `first`/`last` carry the source value's own timestamp (they pin a single source instant); the accumulator folds (`count`/`sum`/`mean`/`min`/`max`) carry the finalize timestamp (they summarise a range and have no single source instant). `min`/`max` deliberately do NOT carry the extremum's timestamp — that would privilege one input instant for a row that summarises the whole window, and cost extra state for no known consumer. To be recorded where the fold roster docs live, in C27's Current state, and in the glossary tap-plan paragraph by the harvest commit.
claude self-assigned this 2026-07-24 15:52:33 +02:00
Author
Collaborator

Correction to the decision above (review-refuted, 2026-07-24)

The independent diff review refuted the "finalize timestamp" half of the earlier comment against the code: TapFold stamps the summary row with last_ts — the instant of the last WARM (contributing) eval — not the run-end instant; the two coincide only while the tap stays warm to the end (which the fieldtest fixtures did, hence the misreading). "No single source instant" was likewise false.

Ratified as shipped: the row is emitted at finalize and stamped with the last contributing value's instant; first alone pins the first contributing instant; min/max deliberately do not carry the extremum's instant. C27, the glossary, and the roster doc lines ("one row at the last warm ts") record this corrected form.

## Correction to the decision above (review-refuted, 2026-07-24) The independent diff review refuted the "finalize timestamp" half of the earlier comment against the code: `TapFold` stamps the summary row with `last_ts` — the instant of the last WARM (contributing) eval — not the run-end instant; the two coincide only while the tap stays warm to the end (which the fieldtest fixtures did, hence the misreading). "No single source instant" was likewise false. Ratified as shipped: the row is emitted at finalize and stamped with the last contributing value's instant; `first` alone pins the first contributing instant; `min`/`max` deliberately do not carry the extremum's instant. C27, the glossary, and the roster doc lines ("one row at the last warm ts") record this corrected form.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Brummel/Aura#335