feat: plan maintained populations through summary lifecycles - #491
Merged
Merged
Conversation
zzylol
added a commit
that referenced
this pull request
Sep 30, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zzylol
force-pushed
the
refactor/lifecycle-only-placement
branch
from
September 30, 2026 18:27
69e0b0d to
eb5885c
Compare
zzylol
force-pushed
the
feat/population-lifecycle
branch
from
September 30, 2026 18:27
3961d16 to
d3372f5
Compare
zzylol
force-pushed
the
feat/population-lifecycle
branch
from
October 1, 2026 22:29
d3372f5 to
89a2f4b
Compare
zzylol
changed the base branch from
refactor/lifecycle-only-placement
to
feat/physical-alternatives-in-planspace
October 1, 2026 22:29
zzylol
force-pushed
the
feat/physical-alternatives-in-planspace
branch
from
October 1, 2026 22:48
5ccaa44 to
45c7fc6
Compare
zzylol
force-pushed
the
feat/population-lifecycle
branch
from
October 1, 2026 22:48
89a2f4b to
5dd3d2b
Compare
zzylol
changed the base branch from
feat/physical-alternatives-in-planspace
to
main
October 1, 2026 22:54
This was referenced Oct 1, 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 #485.
Rebuilt into the linear stack on main. New
integrate:commit(s) fold in integration-branch resolutions this PR needs on top of the earlier stack: "read the population test frontier from lifecycle timing". Conflict resolutions are recorded in the messages of: "test: carry a chosen population lifecycle to physical compilation"; "docs: describe maintained populations as lifecycle-planned state".Why
The lifecycle layer is meant to be the only source of node timing, but maintained populations were outside it:
execution_timed_dagrefused any plan containingMaintainPopulation(UnplannedMaintainedState), andMaintainedPopulationStrategyhard-coded the population at ingestion time.What
enumerate_summary_maintenance_lifecyclesnow emits one deployment for each unique maintained population that does not feed aSummaryAgg. It offers the usual alternatives (Ephemeral, Prepared, Shared, ContinuouslyMaintained), each costed through the caller's existing lifecycle hooks. Unknown cost stays unknown.SummaryAggis treated as that state's input and follows its timing, including when a readout also reads the population directly.selectandexecution_timed_dagtime populations the same way as summary state. A retained population runs at ingestion together with its raw input. An Ephemeral population is rebuilt from the raw source at query time.MaintainPopulation. The structural contracts still hold: the population must read its matching raw input, and its readout must run at query time over a population that supports it. The strategy writes query time only as the initial layout.deploymentsand the cost hooks may now carryMaintainPopulationnodes, and the docs say so. Cost models that price every node uniformly will now also price populations.Before this PR
For
topk by(job)(1, m)built byMaintainedPopulationStrategy, enumeration returned 0 deployments, andexecution_timed_dag()returnedErr(UnplannedMaintainedState). The population was always at ingestion.After this PR
The same plan enumerates 1 population deployment.
raw@ingest → population@ingest → readout@query. The compiled candidate stores the population in precompute.chosen_population_lifecycle_decides_precompute_contents).DefaultCostModel(andSummaryMaintenanceCostModel, which has no population evidence), nothing about populations is selected.Validation
cargo fmt --all --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspace --no-fail-fast: 1380 passed. The new lifecycle tests were first run against the base code and failed there.🤖 Generated with Claude Code