Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
175 commits
Select commit Hold shift + click to select a range
ac30f32
docs: clarify Planner physical plan and SDS architecture
zzylol Sep 17, 2026
af61296
docs: specify executable subplan materialization boundaries
zzylol Sep 18, 2026
e868424
docs: scope migration to backend precompute and query plans
zzylol Sep 18, 2026
daa5281
docs: clarify window terminology migration
zzylol Sep 18, 2026
e27bbb0
Revert "docs: clarify window terminology migration"
zzylol Sep 18, 2026
2230795
docs: focus physical plan and SDS designs
zzylol Sep 18, 2026
3f1830d
docs: add physical compiler input example
zzylol Sep 18, 2026
dd0a8b4
docs: add physical compiler output example
zzylol Sep 18, 2026
c1fbfb6
docs: include query expression in compiler example
zzylol Sep 18, 2026
887c526
docs: reorganize physical plan integration design
zzylol Sep 18, 2026
b8193bb
docs: reorganize SDS and migration designs
zzylol Sep 18, 2026
b24867b
docs: define maintenance inputs before plan split example
zzylol Sep 18, 2026
b358074
docs: use plan version consistently in backend design
zzylol Sep 18, 2026
7e4655a
docs: remove standalone catalog materialization abstraction
zzylol Sep 18, 2026
07580f8
docs: add concise planner backend glossary
zzylol Sep 18, 2026
f6d9cb3
refactor: split installed maintenance DAGs from query execution
zzylol Sep 19, 2026
9713cbc
refactor: remove backend Collector dependency and normalize legacy DAGs
zzylol Sep 19, 2026
7ee09b6
test: restore whole-backend process coverage without Collector
zzylol Sep 19, 2026
cf1b344
fix: migrate Planner main and reject legacy runtime artifacts
zzylol Sep 21, 2026
5d1519d
Merge remote-tracking branch 'origin/main' into refactor/backend-plan…
zzylol Sep 21, 2026
f611bf5
test: send full sketch envelope in whole-backend E2E
zzylol Sep 21, 2026
36b4f10
refactor: bind backend summary state through versioned SDS slots
zzylol Sep 21, 2026
6d04b15
test: send complete sketch envelopes in process fixtures
zzylol Sep 21, 2026
ac855b2
docs: clarify selected deployment guarantee terminology
zzylol Sep 21, 2026
ea3226c
docs: explain missing planner maintenance guarantee
zzylol Sep 21, 2026
118e363
docs: motivate selected producer maintenance decision
zzylol Sep 21, 2026
1effeb5
docs: label catalog reads and SDS metadata ownership
zzylol Sep 21, 2026
ddc50e2
docs: align SDS ownership and lifecycle terminology
zzylol Sep 21, 2026
8e6d244
Merge main into docs design proposal
zzylol Sep 21, 2026
3c273ed
docs: use current planner and plan-version names consistently
zzylol Sep 21, 2026
1f0b4df
docs: align integration diagram with SDS ownership
zzylol Sep 21, 2026
5ceefb7
docs: clarify instance identity and shared producer wording
zzylol Sep 21, 2026
cc0e41b
Merge design docs and current main into backend plan split
zzylol Sep 21, 2026
7d9faff
refactor: align plan bindings with current Planner and SDS contract
zzylol Sep 22, 2026
135a00d
fix: remove arbitrary physical candidate limits
zzylol Sep 14, 2026
32de737
docs: distinguish summary definitions from runtime stores
zzylol Sep 22, 2026
be97173
docs: model one runtime summary store for DAG bindings
zzylol Sep 22, 2026
71157f4
docs: scope SDS lifecycle to read eligibility
zzylol Sep 22, 2026
d9fff69
docs: tie stored summary examples directly to DAG outputs
zzylol Sep 22, 2026
00e68cd
docs: name summary tables, stored records, and output references by role
zzylol Sep 22, 2026
073daa2
docs: illustrate summary definitions, stored records, and output refe…
zzylol Sep 22, 2026
edaf750
docs: limit v1 summary storage to definitions and stored summaries
zzylol Sep 22, 2026
306859c
Merge remote-tracking branch 'origin/docs/physical-plan-design' into …
zzylol Sep 22, 2026
01258d9
refactor: align plan bindings with summary store v1
zzylol Sep 22, 2026
f1a9a51
fix: validate selected DAG provenance
zzylol Sep 22, 2026
55e4780
Merge remote-tracking branch 'origin/main' into stack/requested-737
zzylol Sep 22, 2026
571dc70
merge: stack PR 749 on current PR 737 and main
zzylol Sep 22, 2026
c2ac090
fix: retain neutral sketch codec dependencies when syncing main
zzylol Sep 22, 2026
a0bf688
fix: align derived DAG validation with current schema versions
zzylol Sep 22, 2026
5c8b489
fix: keep maintenance document version distinct from complete DAG ver…
zzylol Sep 22, 2026
7d19dff
refactor: adopt costed Planner selection without legacy API adapters
zzylol Sep 23, 2026
ee71eca
Merge Planner selection baseline and require migration without legacy…
zzylol Sep 23, 2026
697a69e
Merge current Planner API baseline into split backend plans
zzylol Sep 23, 2026
69f6210
test: verify exact process routing for uncertified Planner candidates
zzylol Sep 23, 2026
61a4a3c
Merge branch 'refactor/planner-selection-api' into stack/planner-api-737
zzylol Sep 23, 2026
2e41f80
Merge branch 'stack/planner-api-737' into stack/planner-api-749
zzylol Sep 23, 2026
0eefb49
docs: remove redundant Planner selection contract
zzylol Sep 23, 2026
48e9950
Merge branch 'stack/planner-api-737' into stack/planner-api-749
zzylol Sep 23, 2026
5ed60fc
Merge branch 'refactor/planner-selection-api' into stack/planner-api-737
zzylol Sep 23, 2026
d389e3b
deps: pin Planner bounded HLL confidence model
zzylol Sep 23, 2026
7c3d80a
test: size transmitted KLL state from a certified accuracy contract
zzylol Sep 23, 2026
5dc0113
Merge branch 'stack/planner-api-737' into stack/planner-api-749
zzylol Sep 23, 2026
61e0c14
Merge branch 'refactor/planner-selection-api' into stack/planner-api-737
zzylol Sep 23, 2026
67e8f13
test: retain KLL collector capability when using theoretical confidence
zzylol Sep 23, 2026
67e9cb9
docs: separate Planner physical computation from backend deployment
zzylol Sep 25, 2026
09e1bad
Merge branch 'integration/physical-stack-737' into integration/physic…
zzylol Sep 25, 2026
985b3cc
refactor: name the backend orchestration entry DeploymentPlanCompiler
zzylol Sep 25, 2026
858c9ba
docs: bind Planner physical DAGs without backend re-lowering
zzylol Sep 26, 2026
5bb4d70
docs: describe summary inputs with groups and pane duration
zzylol Sep 26, 2026
20b2d39
docs: define summary semantic completeness beyond input scope
zzylol Sep 26, 2026
b49e47a
docs: define SDS identity through canonical Planner computation
zzylol Sep 26, 2026
fb07b89
docs: decouple SDS semantic identity from executable Planner IR
zzylol Sep 26, 2026
134db0c
docs: define Planner-owned SDS discovery for future ad hoc queries
zzylol Sep 26, 2026
7367cc4
docs: streamline SDS design around definitions and stored results
zzylol Sep 26, 2026
b3163ef
docs: track bound-query SDS migration across implementation PRs
zzylol Sep 26, 2026
b38ae64
Merge remote-tracking branch 'sds-review/737' into impl/sds-semantic-…
zzylol Sep 26, 2026
53bfb2f
docs: identify active shared-library PR in bound-query migration
zzylol Sep 26, 2026
57705f6
Merge branch 'docs/pr737-design-boundaries' into impl/sds-semantic-id…
zzylol Sep 26, 2026
39cf8d8
docs: separate bound SDS range lookup from state validation
zzylol Sep 26, 2026
534546c
Merge branch 'docs/pr737-design-boundaries' into impl/sds-semantic-id…
zzylol Sep 26, 2026
b0d77ce
docs: state SDS migration responsibilities without stale implementati…
zzylol Sep 26, 2026
fd3a02a
Merge branch 'docs/pr737-design-boundaries' into impl/sds-semantic-id…
zzylol Sep 26, 2026
749252d
docs: clarify Planner physical plan and SDS architecture
zzylol Sep 17, 2026
74255ec
docs: specify executable subplan materialization boundaries
zzylol Sep 18, 2026
d048262
docs: scope migration to backend precompute and query plans
zzylol Sep 18, 2026
ae92339
docs: clarify window terminology migration
zzylol Sep 18, 2026
d25d6c9
Revert "docs: clarify window terminology migration"
zzylol Sep 18, 2026
011a6cd
docs: focus physical plan and SDS designs
zzylol Sep 18, 2026
1ca64ed
docs: add physical compiler input example
zzylol Sep 18, 2026
06b26eb
docs: add physical compiler output example
zzylol Sep 18, 2026
9a1c41b
docs: include query expression in compiler example
zzylol Sep 18, 2026
19bc7da
docs: reorganize physical plan integration design
zzylol Sep 18, 2026
8fbe0f3
docs: reorganize SDS and migration designs
zzylol Sep 18, 2026
eb3c3c4
docs: define maintenance inputs before plan split example
zzylol Sep 18, 2026
c9b6ea7
docs: use plan version consistently in backend design
zzylol Sep 18, 2026
4de2df4
docs: remove standalone catalog materialization abstraction
zzylol Sep 18, 2026
9892bed
docs: add concise planner backend glossary
zzylol Sep 18, 2026
1232ce9
docs: clarify selected deployment guarantee terminology
zzylol Sep 21, 2026
158c22a
docs: explain missing planner maintenance guarantee
zzylol Sep 21, 2026
6322175
docs: motivate selected producer maintenance decision
zzylol Sep 21, 2026
8bdb7a7
docs: label catalog reads and SDS metadata ownership
zzylol Sep 21, 2026
813e3e3
docs: align SDS ownership and lifecycle terminology
zzylol Sep 21, 2026
f3bd9d8
docs: use current planner and plan-version names consistently
zzylol Sep 21, 2026
11e21d2
docs: align integration diagram with SDS ownership
zzylol Sep 21, 2026
b4dec9b
docs: clarify instance identity and shared producer wording
zzylol Sep 21, 2026
f300704
docs: distinguish summary definitions from runtime stores
zzylol Sep 22, 2026
520ace6
docs: model one runtime summary store for DAG bindings
zzylol Sep 22, 2026
864c2a2
docs: scope SDS lifecycle to read eligibility
zzylol Sep 22, 2026
e0ab398
docs: tie stored summary examples directly to DAG outputs
zzylol Sep 22, 2026
5f383d1
docs: name summary tables, stored records, and output references by role
zzylol Sep 22, 2026
a2ab168
docs: illustrate summary definitions, stored records, and output refe…
zzylol Sep 22, 2026
d5f5203
docs: limit v1 summary storage to definitions and stored summaries
zzylol Sep 22, 2026
ebf4569
docs: separate Planner physical computation from backend deployment
zzylol Sep 25, 2026
eb60220
docs: bind Planner physical DAGs without backend re-lowering
zzylol Sep 26, 2026
1b36bb7
docs: describe summary inputs with groups and pane duration
zzylol Sep 26, 2026
b12512f
docs: define summary semantic completeness beyond input scope
zzylol Sep 26, 2026
51185de
docs: define SDS identity through canonical Planner computation
zzylol Sep 26, 2026
69b28c2
docs: decouple SDS semantic identity from executable Planner IR
zzylol Sep 26, 2026
5ffc426
docs: define Planner-owned SDS discovery for future ad hoc queries
zzylol Sep 26, 2026
5bcd54c
docs: streamline SDS design around definitions and stored results
zzylol Sep 26, 2026
5b402b8
docs: track bound-query SDS migration across implementation PRs
zzylol Sep 26, 2026
0d9ab8e
docs: identify active shared-library PR in bound-query migration
zzylol Sep 26, 2026
ef6c127
docs: separate bound SDS range lookup from state validation
zzylol Sep 26, 2026
eb94d73
docs: state SDS migration responsibilities without stale implementati…
zzylol Sep 26, 2026
5f1eebf
docs: preserve design index after rebasing onto main
zzylol Sep 28, 2026
8857f25
docs: clarify SDS source identity and version-scoped recovery
zzylol Sep 28, 2026
bccb189
docs: illustrate SDS identity and recovery decisions
zzylol Sep 28, 2026
12896bd
Merge branch 'restack/pr737-main' into impl/sds-semantic-identity
zzylol Sep 28, 2026
bd259b1
merge: align candidate-limit follow-up with updated schema foundation
zzylol Sep 28, 2026
ab70b8b
test: use query operator namespace from schema foundation
zzylol Sep 28, 2026
79eb631
refactor: split backend deployment plans and bind stored outputs
zzylol Sep 28, 2026
070fad6
fix: restrict foundation SDS recovery to the installed generation
zzylol Sep 28, 2026
3c840ff
fix: allocate fresh physical series when a plan version changes
zzylol Sep 28, 2026
189bae9
merge: rebase candidate-limit follow-up onto current foundation
zzylol Sep 28, 2026
70a8d88
test: record foundation rebase and recovery regression evidence
zzylol Sep 28, 2026
057c952
Merge branch 'restack/pr749-main' into stack/pr730-on-749
zzylol Sep 28, 2026
b013c91
style: satisfy workspace formatting after the compiler rename
zzylol Sep 28, 2026
c15730b
Merge branch 'restack/pr749-main' into stack/pr730-on-749
zzylol Sep 28, 2026
d8bf03e
feat(sds): separate bound output routing from persisted semantic iden…
zzylol Sep 26, 2026
42602b9
feat(sds): require dataset-bound Planner definitions and versioned ca…
zzylol Sep 28, 2026
9e0a892
refactor: implement typed summary semantics and physical plan lowering
zzylol Sep 24, 2026
0f05899
fix: validate final SDS semantics across Planner adapters and recovery
zzylol Sep 28, 2026
c556130
test: verify final SDS identity installation, serving and restart
zzylol Sep 28, 2026
e45028c
Merge branch 'impl/pr749-final-sds' into stack/pr730-on-749
zzylol Sep 28, 2026
3f1db0f
docs: record shared execution directly after the SDS foundation
zzylol Sep 28, 2026
c3efc19
Merge branch 'impl/pr749-final-sds' into stack/pr730-on-749
zzylol Sep 28, 2026
e627dbb
fix(control-plane): supply dataset_identity in the API test fixtures
zzylol Sep 28, 2026
890b69c
Remove obsolete SDS wire aliases and persisted metadata migration
zzylol Sep 28, 2026
b1e2c00
Merge commit 'e627dbb329dabcff5a8d18e8796da2b0111efc01' into impl/pr7…
zzylol Sep 28, 2026
20827c6
Merge branch 'impl/pr749-final-sds' into stack/pr730-on-749
zzylol Sep 28, 2026
53d560e
Reject obsolete state-column syntax in compiler roundtrip coverage
zzylol Sep 28, 2026
2d94a87
Merge branch 'impl/pr749-final-sds' into stack/pr730-on-749
zzylol Sep 28, 2026
d6f688f
Remove unused materialization wire adapter and propagate recovery errors
zzylol Sep 28, 2026
6e68093
Merge branch 'impl/pr749-final-sds' into stack/pr730-on-749
zzylol Sep 28, 2026
b9f6e66
Keep projection fixtures on the canonical typed encoding
zzylol Sep 28, 2026
d16c752
Merge branch 'impl/pr749-final-sds' into stack/pr730-on-749
zzylol Sep 28, 2026
621cc6e
Remove superseded deployment API field aliases
zzylol Sep 28, 2026
69f7804
Merge branch 'impl/pr749-final-sds' into stack/pr730-on-749
zzylol Sep 28, 2026
51a686e
Document obsolete-format removals and cleanup validation
zzylol Sep 28, 2026
945973f
Merge branch 'impl/pr749-final-sds' into stack/pr730-on-749
zzylol Sep 28, 2026
f1256f0
Record passing restacked plan, storage and serving checks
zzylol Sep 28, 2026
6c0bce0
Merge branch 'impl/pr749-final-sds' into stack/pr730-on-749
zzylol Sep 28, 2026
269c774
Remove generated evaluation archives and keep validation summaries
zzylol Sep 28, 2026
f5d0cb0
Merge branch 'impl/pr749-final-sds' into stack/pr730-on-749
zzylol Sep 28, 2026
be2b593
Normalize validation summary formatting
zzylol Sep 28, 2026
ac17953
Merge branch 'impl/pr749-final-sds' into stack/pr730-on-749
zzylol Sep 28, 2026
09cf67d
Remove PR process reports and defer execution design to shared-runtim…
zzylol Sep 28, 2026
d97f486
Merge branch 'impl/pr749-final-sds' into stack/pr730-on-749
zzylol Sep 28, 2026
2a0f8ed
Keep discovery and calibration on dataset-bound snapshot version 3
zzylol Sep 28, 2026
680dca2
Merge branch 'impl/pr749-final-sds' into stack/pr730-on-749
zzylol Sep 28, 2026
84e9468
Use typed deployment configuration in process E2E fixtures
zzylol Sep 28, 2026
a023dd0
Merge branch 'impl/pr749-final-sds' into stack/pr730-on-749
zzylol Sep 28, 2026
c11a540
Align process assertions with dataset-bound SDS and cold successor ac…
zzylol Sep 28, 2026
218e4bb
Merge branch 'impl/pr749-final-sds' into stack/pr730-on-749
zzylol Sep 28, 2026
c83ac8d
Align stack ancestry with the verified SDS foundation squash on main
zzylol Sep 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 36 additions & 4 deletions control_plane/src/physical/workload_cost.rs
Original file line number Diff line number Diff line change
Expand Up @@ -637,10 +637,8 @@ fn select_candidates(
frontend: super::compiler::QueryFrontend,
) -> Result<CompiledPhysicalPlan, CompileError> {
evidence.validate(&env)?;
if candidates.is_empty() || candidates.len() > 64 {
return Err(invalid(
"candidate inventory must contain 1..=64 candidates",
));
if candidates.is_empty() {
return Err(invalid("candidate inventory must not be empty"));
}
let candidate_key_sets: BTreeSet<_> = candidates
.iter()
Expand Down Expand Up @@ -1095,6 +1093,21 @@ mod tests {
.compile_promql(candidate.clone(), environment.clone())
.unwrap();
assert!(identities.insert(plan.envelope.plan_id));
// Each enabled leaf has a bound readout; disabled leaves must leave
// no local raw scan after exact-subtree externalization.
for entry in plan.query_plan.entries.values() {
assert_eq!(entry.materialization_bindings().len(), enabled);
assert!(
!entry.nodes.values().any(|node| matches!(
node,
crate::query_plan::QueryPlanNode::Logical {
operator:
crate::query_plan::residual::ResidualQueryOperator::Scan { .. },
..
}
))
);
}
let cost = manifest(&plan, &candidate.queries).unwrap();
assert_eq!(
cost.components
Expand Down Expand Up @@ -1311,6 +1324,25 @@ mod tests {
}
}

// A cheaper quoted alternative after index 64 must still participate.
#[test]
fn selection_considers_candidates_beyond_64() {
let (candidates, env, mut evidence) = quoted();
for cost in evidence.quotes[0].unit_costs.values_mut() {
*cost = 1e9;
}
let mut inventory = vec![candidates[0].clone(); 64];
inventory.push(candidates[1].clone());
let plan = select_lowest_cost_candidate(inventory, env, &evidence).unwrap();
assert_eq!(plan.envelope.plan_id, evidence.quotes[1].manifest.plan_id);
let report = plan.cost_comparison.unwrap();
assert_eq!(report.candidate_evaluations.len(), 65);
assert_eq!(
report.candidate_evaluations[64].status,
CandidateEvaluationStatus::Selected
);
}

#[test]
fn complete_cost_changes_selection_and_reports_shared_work_once() {
let (candidates, env, mut evidence) = quoted();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ pub(super) struct MaterializationCandidateSets {
pub eligible_materialization_count: usize,
}

/// Enumerate every enabled_keys for up to four leaves. Larger forests retain all-materialized,
/// all-exact, then singleton/complement pairs in stable key order. The caller must
/// disclose bounded coverage; no unenumerated optimum is claimed. Reserve one
/// of the selector's 64 candidate slots for native execution.
/// Enumerate every subset for up to four optional materialization keys. Larger
/// forests retain all-materialized, all-exact, then every singleton/complement
/// pair in stable key order: 2 + 2N candidates instead of exponential search.
/// The caller must disclose non-exhaustive coverage; native execution is separate.
pub(super) fn enumerate(keys: BTreeSet<String>) -> MaterializationCandidateSets {
let eligible_materialization_count = keys.len();
let ordered: Vec<_> = keys.iter().cloned().collect();
Expand All @@ -37,12 +37,8 @@ pub(super) fn enumerate(keys: BTreeSet<String>) -> MaterializationCandidateSets
BTreeSet::from([key.clone()]),
keys.difference(&BTreeSet::from([key])).cloned().collect(),
] {
if candidate_key_sets.len() >= 63 {
break;
}
if !candidate_key_sets.contains(&enabled_keys) {
candidate_key_sets.push(enabled_keys);
}
// With more than four keys, these sets are all distinct.
candidate_key_sets.push(enabled_keys);
}
}
}
Expand Down Expand Up @@ -78,11 +74,23 @@ mod tests {
.contains(&BTreeSet::from(["b".into()])));
}
#[test]
fn large_inventory_reserves_native_slot_and_discloses_truncation() {
fn large_inventory_covers_every_singleton_and_complement() {
let keys = (0..100).map(|i| format!("{i:03}")).collect();
let result = enumerate(keys);
assert!(!result.exhaustive);
assert_eq!(result.candidate_key_sets.len(), 63);
assert_eq!(result.candidate_key_sets.len(), 202);
// Every leaf, including those beyond the old cutoff, gets both choices.
for key in &result.candidate_key_sets[0] {
assert!(result
.candidate_key_sets
.contains(&BTreeSet::from([key.clone()])));
let complement = result.candidate_key_sets[0]
.iter()
.filter(|other| *other != key)
.cloned()
.collect();
assert!(result.candidate_key_sets.contains(&complement));
}
assert_eq!(result.candidate_key_sets[0].len(), 100);
assert!(result.candidate_key_sets[1].is_empty());
assert_eq!(
Expand All @@ -91,7 +99,7 @@ mod tests {
.iter()
.collect::<BTreeSet<_>>()
.len(),
63
202
);
}
#[test]
Expand Down
Loading