Skip to content

fix: finalize exact state before maintained value consumers - #401

Merged
zzylol merged 3 commits into
mainfrom
fix/explicit-maintenance-finalize
Sep 11, 2026
Merged

fix: finalize exact state before maintained value consumers#401
zzylol merged 3 commits into
mainfrom
fix/explicit-maintenance-finalize

Conversation

@zzylol

@zzylol zzylol commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Nested maintained summaries need an explicit boundary between exact accumulator state and its values.

Before this PR, selecting quantile(0.9, sum_over_time(m[1m])) connected KLL directly to Sum state. After this PR, the same selection contains a maintenance-time FinalizeExactAccumulator; its output uses the inner logical schema. Existing query-time finalization remains unchanged. Shared validation admits this explicit exact-state readout without allowing arbitrary maintenance operators to consume state.

Verification: 17 PromQL integration tests, 13 exact-composition integration tests, 404 mapping unit tests, 196 shared-type tests, and associated integration/doc tests pass. The real-query regression also exports the executable DAG. Existing structural pins now assert the explicit boundary.

This defines the typed boundary; backend immutable completion, grouping, window compatibility, and supported accumulator readouts remain separate execution gates. No performance claim.

@zzylol
zzylol merged commit e78572c into main Sep 11, 2026
4 checks 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.

1 participant