Conversation
…nding Split plan_summary_maintenance_lifecycles into enumeration and selection so a deployment can price every lifecycle alternative per unique summary state and bind its own choice. Planner selection is unchanged: it now enumerates and then selects the cheapest complete combination through the same path. SummaryMaintenanceLifecycleCandidates::select validates that each choice is an alternative Planner could select, enforces schedule compatibility, and obtains window frameworks and totals from the same complete-candidate hook. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zzylol
force-pushed
the
feat/lifecycle-candidates
branch
from
September 30, 2026 02:14
59b41bd to
4bb8c86
Compare
zzylol
changed the base branch from
feat/shared-physical-operators
to
split/462-f-physical-planner
September 30, 2026 02:14
This was referenced Sep 30, 2026
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 #475 (the #462 split: #472 merged, then #473 → #474 → #475).
Why
Planner is meant to expose legal summary-maintenance lifecycle candidates and
let the deployment price them over the whole workload (see
physical-planning-and-deployment.md). Todayplan_summary_maintenance_lifecyclesenumerates the alternatives but also picksone with Planner's own cost model, so ASAPQuery-backend cannot price or bind an
alternative Planner did not prefer. The lifecycle choice is what splits summary
state between precompute (
ContinuouslyMaintained/Prepared/Shared) andquery time (
Ephemeral).What
Split lifecycle planning into enumerate then select:
enumerate_summary_maintenance_lifecycles(...) -> SummaryMaintenanceLifecycleCandidates:one entry per unique
SummaryAgg, with all four lifecycles, their cost orrejection, and nothing selected.
SummaryMaintenanceLifecycleCandidates::guarantee(&lifecycle): the guarantee(mode, schedule) a choice would carry, so a caller can price before choosing.
SummaryMaintenanceLifecycleCandidates::select(&[(state, lifecycle)]): turnsan explicit choice into the
SummaryMaintenanceLifecyclePlanthe physicalcompiler consumes. It refuses unknown or duplicate states, missing states,
unlisted or rejected alternatives, incompatible nested schedules, and
combinations the cost model cannot estimate (
SummaryMaintenanceLifecycleChoiceError).plan_summary_maintenance_lifecyclesand the global-selection helpers now runenumerate + cheapest-select through the same checks. No new cost logic; unknown
cost stays unknown.
Before this PR
After this PR
Choosing what Planner would choose yields an identical plan.
Open point for review
An alternative whose only issue is missing cost evidence can be bound only when
the cost model declares its whole-combination hook authoritative for lifecycle
costs (Planner's existing rule). Accepting any legal-but-unpriced alternative is
a one-line change, but the plan's cost and window framework would then be
unknown. Left as is pending review.
The window framework is decided per whole combination by the cost model, so it
appears only in the plan returned by
select, not per alternative.Validation
6 new tests in
summary_maintenance_lifecycle.rs(enumeration withoutselection, reproducing Planner's choice, binding a costlier legal alternative,
illegal/incomplete choices, incompatible nested schedules, one entry per unique
state).
cargo fmt --checkandcargo clippy --workspace --all-targets -- -D warningspass;
cargo test --workspace --no-fail-fastpasses except the pre-existing #462failure
devtools dag_export::workload_node_ids_make_smaller_topk_reuse_explicit.🤖 Generated with Claude Code