Skip to content

Compile actual finite multi-source maintenance plans - #668

Merged
zzylol merged 25 commits into
mainfrom
feat/compile-multi-source-maintenance
Sep 11, 2026
Merged

zzylol merged 25 commits into
mainfrom
feat/compile-multi-source-maintenance

Conversation

@zzylol

@zzylol zzylol commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

The actual selected query quantile(0.9, sum_over_time(m[1m]) + sum_over_time(n[1m])) requires two installed source states and an explicit maintained arithmetic input. The compiler previously recognized only one direct finalized source.

Collect every exact source frontier beneath supported MaintenanceTime arithmetic, install sources before the derived state, and construct DerivedInputIdentity from the actual DAG and all source bindings. Shared installation checks require raw sources, matching full nonoverlapping windows, explicit finalization, and arithmetic with Left/Right roles and no vector matching. Query binding uses the derived identity instead of requiring a single metric name.

Before: the actual two-source plan could not be installed and queried as maintained state. After: the real process compiles, installs, ingests both sources, closes finite input, and reads the selected derived DDSketch. Same-generation restart preserves its result; missing source and multiple source populations fail closed. The process also checks old derived state is unavailable after a generation change while new raw input is accepted.

Validation: 749 CP tests pass; cargo check -p control_plane --all-targets passes; real two-source process test passes in 3.74s using sketchlib c0de315754f9a6c77dd7a25aca0b2b62f0aec276. The actual selected family and parameters are retained; no forced winner or performance claim. Independent CP/shared source review passed. Final DP binary replay passes 1171/1171 with --test-threads=4 (15.42s), after correcting five empty-fixture provenance assertions. The initial unrestricted parallel run on four pinned CPUs timed out in one durable flush test; the unchanged test and final full replay pass with bounded concurrency.

Scope: finite, full aligned nonoverlapping windows, one physical population per source with matching labels, supported scalar arithmetic. Continuous/sliding execution and arbitrary grouping are not enabled by this change. This PR depends on the timed binary and finite cohort runtime stack.

@zzylol
zzylol marked this pull request as ready for review September 11, 2026 19:13
@zzylol
zzylol changed the base branch from feat/maintenance-finite-cohort to main September 11, 2026 19:27
@zzylol
zzylol merged commit 310f13c into main Sep 11, 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.

1 participant