test(planner): cover summary-maintenance lifecycle end to end - #319
Merged
Merged
Conversation
zzylol
force-pushed
the
feat/lifecycle-aware-selection
branch
from
August 30, 2026 18:21
51e1904 to
e716fed
Compare
zzylol
force-pushed
the
test/workload-lifecycle-e2e
branch
from
August 30, 2026 18:21
2f4eb69 to
ec4ce8f
Compare
zzylol
force-pushed
the
feat/lifecycle-aware-selection
branch
from
August 30, 2026 18:30
e716fed to
a18c539
Compare
zzylol
force-pushed
the
test/workload-lifecycle-e2e
branch
from
August 30, 2026 18:30
ec4ce8f to
1056383
Compare
zzylol
force-pushed
the
feat/lifecycle-aware-selection
branch
from
August 30, 2026 18:35
a18c539 to
06a2099
Compare
zzylol
force-pushed
the
test/workload-lifecycle-e2e
branch
from
August 30, 2026 18:35
1056383 to
ed53588
Compare
This was referenced Aug 30, 2026
zzylol
force-pushed
the
feat/lifecycle-aware-selection
branch
from
August 30, 2026 18:46
06a2099 to
3293d37
Compare
zzylol
force-pushed
the
test/workload-lifecycle-e2e
branch
from
August 30, 2026 18:46
ed53588 to
3a660e9
Compare
zzylol
force-pushed
the
feat/lifecycle-aware-selection
branch
from
August 30, 2026 19:03
3293d37 to
c8f7c0c
Compare
zzylol
force-pushed
the
test/workload-lifecycle-e2e
branch
from
August 30, 2026 19:03
3a660e9 to
a8fedf2
Compare
zzylol
force-pushed
the
feat/lifecycle-aware-selection
branch
from
August 30, 2026 21:22
c8f7c0c to
0613a90
Compare
zzylol
force-pushed
the
test/workload-lifecycle-e2e
branch
from
August 30, 2026 21:22
a8fedf2 to
bf0f818
Compare
zzylol
force-pushed
the
feat/lifecycle-aware-selection
branch
from
August 30, 2026 21:27
0613a90 to
c517a1a
Compare
zzylol
force-pushed
the
test/workload-lifecycle-e2e
branch
from
August 30, 2026 21:27
bf0f818 to
4e93a30
Compare
This was referenced Aug 30, 2026
zzylol
force-pushed
the
feat/lifecycle-aware-selection
branch
from
August 31, 2026 12:04
c517a1a to
bc90946
Compare
zzylol
force-pushed
the
test/workload-lifecycle-e2e
branch
from
August 31, 2026 12:04
4e93a30 to
fbfc01e
Compare
zzylol
force-pushed
the
feat/lifecycle-aware-selection
branch
from
August 31, 2026 12:17
bc90946 to
2cce2eb
Compare
zzylol
force-pushed
the
test/workload-lifecycle-e2e
branch
from
August 31, 2026 12:17
fbfc01e to
995af48
Compare
zzylol
force-pushed
the
feat/lifecycle-aware-selection
branch
from
August 31, 2026 12:35
2cce2eb to
b162a36
Compare
zzylol
force-pushed
the
test/workload-lifecycle-e2e
branch
from
August 31, 2026 12:35
e67e10d to
d3d051a
Compare
zzylol
force-pushed
the
feat/lifecycle-aware-selection
branch
from
August 31, 2026 12:45
b162a36 to
b031b7f
Compare
zzylol
force-pushed
the
test/workload-lifecycle-e2e
branch
from
August 31, 2026 12:45
d3d051a to
c593292
Compare
zzylol
force-pushed
the
feat/lifecycle-aware-selection
branch
from
August 31, 2026 21:57
b031b7f to
d77479b
Compare
zzylol
force-pushed
the
test/workload-lifecycle-e2e
branch
from
August 31, 2026 21:58
c593292 to
5dd29e0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #318.
Why
The lifecycle implementation crosses several public boundaries: normalized workload input, PromQL lowering, semantic candidate discovery, lifecycle-aware global selection, post-ASAP materialization, and the emitted deployment guarantee. Unit tests cover those pieces independently, but they do not prove that the real public APIs compose correctly.
This PR adds one focused integration test that exercises that complete path without reaching into private planner internals.
What this PR adds
A new integration test:
The test covers this pipeline:
Workload fixture
The fixture models a dashboard query:
with an explicit
epsilon = 0.01accuracy requirement.The normalized workload deliberately contains two entries for the same query text:
The lifecycle call explicitly binds the searched target to normalized workload entry index
1, the repeating dashboard consumer. This verifies that the public root-to-workload binding added in the preceding PRs is honored instead of accidentally using the unrelated batch entry.The data workload declares:
DataArrival::ContinuouslyIngesting;NOW_MS; andPlanning uses a 100-second horizon. A one-second query interval therefore derives exactly 100 expected reads.
Runtime and cost-model fixture
FullyCostedRuntimesupplies complete lifecycle cost evidence:It also advertises support for incremental update, merge, and deletion. Deletion support is relevant because the dashboard is classified as real-time; the fixture remains valid if a moving-window summary requires expired input to be removed.
The target runtime lifecycle flags intentionally allow only:
Ephemeral; andContinuouslyMaintained.PreparedandSharedare disabled so the test can verify that legal candidate selection and rejected-alternative reporting coexist in the same deployment.Under the fixture’s numbers:
The fully costed continuously maintained alternative is therefore cheaper than rebuilding an ephemeral state for every dashboard evaluation.
raw_query_recompute_costis intentionally not supplied by this fixture, so this test focuses on lifecycle-aware summary selection rather than the separately covered raw-fallback comparison.Exact APIs exercised
The test uses the same public entry points available to an integration:
QueryWorkload::validatelower_promql_batchdefault_strategies_withsearch_workload_withglobal_selection_with_summary_maintenance_lifecyclesmaterialize_with_summary_maintenance_lifecyclesNo internal helper constructs the selected summary or lifecycle directly.
Assertions
The resulting plan must prove all of the following:
ContinuouslyMaintained;PerUpdate;Incremental;RequiresPredictableOneTimeQuery; andUnsupportedByRuntime.Together, these assertions verify both the winning physical contract and the audit trail for alternatives that did not win.
Scope
This is a test-only PR. It does not add planner behavior or change production APIs. The lifecycle DAG export and viewer assertions are added by the next PR, #313.
Verification
cargo test -p asap-integration-tests --test summary_maintenance_lifecycle_e2eExpected result: one end-to-end lifecycle test passes.
Stack
Base: #318. Next: #313.