Skip to content

fix(precompute): enforce active window timestamps - #598

Merged
zzylol merged 3 commits into
mainfrom
fix/590-window-timestamp-admission
Sep 4, 2026
Merged

zzylol merged 3 commits into
mainfrom
fix/590-window-timestamp-admission

Conversation

@zzylol

@zzylol zzylol commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Closes #590.

Rejects observations outside the active timestamp-defined window before sketch mutation:

  • zero allowed lateness now means zero grace;
  • subtraction-based lateness checks avoid uint overflow;
  • samples at/after the active end return typed ErrFutureData, allowing the host to rotate/catch up and retry rather than contaminating the old window;
  • keyed and unkeyed paths share the same boundary validator.

Tests cover zero-lateness, the exact upper boundary, both ingestion paths, and verify rejected future data is absent from the closed window.

Stacked on #597.

@zzylol

zzylol commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up review fix: future-window observations now rotate atomically, queue the closed envelopes for the next Tick/Drain, and retry admission in the correct window. This prevents both old-window contamination and the adapter-level drop that the first revision could cause.

@zzylol
zzylol force-pushed the fix/590-window-timestamp-admission branch from b5807a7 to 954f90b Compare September 4, 2026 12:09
@zzylol
zzylol changed the base branch from fix/589-delta-replay-lineage to main September 4, 2026 12:35
@zzylol
zzylol merged commit a6b5bdd into main Sep 4, 2026
1 check passed
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.

asap-precompute-go: enforce observation timestamps against the active window

1 participant