Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
234 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
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
af35131
refactor: implement typed summary semantics and physical plan lowering
zzylol Sep 24, 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
ae604d0
Merge branch 'integration/physical-stack-749' into integration/physic…
zzylol Sep 25, 2026
29e1aba
Restack PR #770 with implementation before standalone acceptance
zzylol Sep 26, 2026
12c192e
chore: consume Planner physical precompute candidate interfaces
zzylol Sep 26, 2026
f762aff
chore: consume Planner materialization frontier enumeration
zzylol Sep 26, 2026
b3578f8
chore: consume exact temporal ranking physical candidates
zzylol Sep 26, 2026
1e38966
chore: use shared Planner candidate winner selection
zzylol Sep 26, 2026
887636c
chore: consume sparse counter shared readout contracts
zzylol Sep 26, 2026
8c4b080
test: declare collector ranking fixture capabilities explicitly
zzylol Sep 26, 2026
b8ef5d4
Use Planner counter-window candidate execution
zzylol Sep 26, 2026
4442f70
Use shared keyed-counter omission contract
zzylol Sep 26, 2026
623acc2
Use Planner exact-counter population omission
zzylol Sep 26, 2026
0717ca0
Construct fixture evidence for the standalone operator foundation
zzylol Sep 26, 2026
bf86025
build: pin Planner exact-state scratch merge implementation
zzylol Sep 26, 2026
4455fda
build: pin shared finalized-pane reconstruction fix
zzylol Sep 26, 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
199cc76
Merge branch 'impl/sds-semantic-identity' into impl/sds-stack-771
zzylol Sep 26, 2026
35c83bd
Merge branch 'impl/sds-stack-771' into impl/sds-stack-774
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
41eb1e2
Merge branch 'impl/sds-semantic-identity' into impl/sds-stack-771
zzylol Sep 26, 2026
36d6c8f
build: align shared Planner dependencies with remote PR 462
zzylol Sep 26, 2026
d1420cc
Merge branch 'impl/sds-stack-771' into impl/sds-stack-774
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
861bd11
Merge branch 'impl/sds-semantic-identity' into impl/sds-stack-771
zzylol Sep 26, 2026
50d4e92
feat(sds): separate bound output routing from persisted semantic iden…
zzylol Sep 26, 2026
3bbd198
Merge branch 'impl/sds-stack-771' into impl/sds-stack-774
zzylol Sep 26, 2026
b0d77ce
docs: state SDS migration responsibilities without stale implementati…
zzylol Sep 26, 2026
e2bc561
Merge branch 'impl/sds-stack-771' into impl/sds-stack-774
zzylol Sep 26, 2026
fd3a02a
Merge branch 'docs/pr737-design-boundaries' into impl/sds-semantic-id…
zzylol Sep 26, 2026
cb1e237
Merge branch 'impl/sds-semantic-identity' into impl/sds-stack-771
zzylol Sep 26, 2026
14ef72d
refactor(sds): keep semantic variants compact without changing wire f…
zzylol Sep 26, 2026
4ba0a43
test: align evidence fixtures with selected exact count state
zzylol Sep 26, 2026
599ea4b
docs: align precompute SDS description with semantic catalog
zzylol Sep 26, 2026
3d49ed7
test: bind imported-state fixtures to their actual semantic definition
zzylol Sep 26, 2026
17671d6
test: distinguish imported CMS transport from total-count planning
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
bc417b0
Merge branch 'impl/sds-semantic-identity' into impl/sds-stack-771
zzylol Sep 28, 2026
f4d7869
Merge branch 'impl/sds-stack-771' into impl/sds-stack-774
zzylol Sep 28, 2026
6239249
feat: bind Planner dataset semantics to deployment input identity
zzylol Sep 28, 2026
2767dbb
fix: recognize shared native batch encoding at dependency boundary
zzylol Sep 28, 2026
c27dc95
test: reject pre-dataset planning snapshot versions
zzylol Sep 28, 2026
05e1479
refactor: version dataset-bound catalog and update empty-plan fixtures
zzylol Sep 28, 2026
e637cb8
docs: describe dataset-bound planning and installation inputs
zzylol Sep 28, 2026
a81f1ba
docs: clarify candidate selection and deployment ownership
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
6e3a50b
merge: base typed plan support on rebased foundation
zzylol Sep 28, 2026
d513aa5
merge: carry version-scoped foundation recovery into semantic integra…
zzylol Sep 28, 2026
3c840ff
fix: allocate fresh physical series when a plan version changes
zzylol Sep 28, 2026
5d6cdbc
Merge branch 'restack/pr749-main' into impl/sds-stack-771
zzylol Sep 28, 2026
f2fc57c
merge: allocate fresh output storage during version warm-up
zzylol Sep 28, 2026
70a8d88
test: record foundation rebase and recovery regression evidence
zzylol Sep 28, 2026
1953a40
Merge branch 'impl/sds-stack-771' into impl/sds-stack-774
zzylol Sep 28, 2026
2dbe763
Merge branch 'restack/pr749-main' into impl/sds-stack-771
zzylol Sep 28, 2026
d71032d
fix: complete shared state encoding adoption at the dependency boundary
zzylol Sep 28, 2026
b013c91
style: satisfy workspace formatting after the compiler rename
zzylol Sep 28, 2026
38fb552
Merge branch 'restack/pr749-main' into impl/sds-stack-771
zzylol Sep 28, 2026
e48181c
Merge branch 'impl/sds-stack-771' into impl/sds-stack-774
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
d608213
merge: base shared execution on final SDS identity contract in #749
zzylol Sep 28, 2026
07f8ef6
test: align shared execution fixtures with final #749 SDS foundation
zzylol Sep 28, 2026
3f1db0f
docs: record shared execution directly after the SDS foundation
zzylol Sep 28, 2026
7b28606
Merge branch 'impl/pr749-final-sds' into impl/sds-stack-774
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
ab0a4d7
Merge branch 'impl/pr749-final-sds' into impl/sds-stack-774
zzylol Sep 28, 2026
0cef456
fix(data-plane): initialize dataset_identity in the bootstrap ingest …
zzylol Sep 28, 2026
53d560e
Reject obsolete state-column syntax in compiler roundtrip coverage
zzylol Sep 28, 2026
a8cfcdd
Merge branch 'impl/pr749-final-sds' into impl/sds-stack-774
zzylol Sep 28, 2026
d6f688f
Remove unused materialization wire adapter and propagate recovery errors
zzylol Sep 28, 2026
b234911
Merge branch 'impl/pr749-final-sds' into impl/sds-stack-774
zzylol Sep 28, 2026
b9f6e66
Keep projection fixtures on the canonical typed encoding
zzylol Sep 28, 2026
f125008
Merge branch 'impl/pr749-final-sds' into impl/sds-stack-774
zzylol Sep 28, 2026
621cc6e
Remove superseded deployment API field aliases
zzylol Sep 28, 2026
1dbaaa6
Merge branch 'impl/pr749-final-sds' into impl/sds-stack-774
zzylol Sep 28, 2026
334b186
fix(control-plane): supply dataset_identity in the API test fixtures
zzylol Sep 28, 2026
67b5366
Merge remote-tracking branch 'refs/remotes/sds-cleanup/shared' into i…
zzylol Sep 28, 2026
51a686e
Document obsolete-format removals and cleanup validation
zzylol Sep 28, 2026
507cc8f
Merge branch 'impl/pr749-final-sds' into impl/sds-stack-774
zzylol Sep 28, 2026
f1256f0
Record passing restacked plan, storage and serving checks
zzylol Sep 28, 2026
2c726ce
Merge branch 'impl/pr749-final-sds' into impl/sds-stack-774
zzylol Sep 28, 2026
269c774
Remove generated evaluation archives and keep validation summaries
zzylol Sep 28, 2026
97e1285
Merge branch 'impl/pr749-final-sds' into impl/sds-stack-774
zzylol Sep 28, 2026
be2b593
Normalize validation summary formatting
zzylol Sep 28, 2026
448c28c
Merge branch 'impl/pr749-final-sds' into impl/sds-stack-774
zzylol Sep 28, 2026
09cf67d
Remove PR process reports and defer execution design to shared-runtim…
zzylol Sep 28, 2026
04d5d2d
Own the precompute execution design in the shared-runtime foundation
zzylol Sep 28, 2026
2a0f8ed
Keep discovery and calibration on dataset-bound snapshot version 3
zzylol Sep 28, 2026
f4a7653
Merge branch 'impl/pr749-final-sds' into impl/sds-stack-774
zzylol Sep 28, 2026
84e9468
Use typed deployment configuration in process E2E fixtures
zzylol Sep 28, 2026
ec36ae9
Merge branch 'impl/pr749-final-sds' into impl/sds-stack-774
zzylol Sep 28, 2026
c11a540
Align process assertions with dataset-bound SDS and cold successor ac…
zzylol Sep 28, 2026
302ab25
Merge branch 'impl/pr749-final-sds' into impl/sds-stack-774
zzylol Sep 28, 2026
c32094c
Align stack ancestry with the verified SDS foundation squash on main
zzylol Sep 28, 2026
0d7ac30
fix: execute typed Planner fragments and preserve terminal resource e…
zzylol Sep 28, 2026
f5090c3
Merge remote-tracking branch 'origin/main' into impl/sds-stack-774
zzylol Sep 28, 2026
77679a4
fix: bind exact integer samples without losing input types
zzylol Sep 28, 2026
1f0ad1d
test: verify exact integer protocol input binding
zzylol Sep 28, 2026
626faad
refactor: name per-boundary physical fragments explicitly
zzylol Sep 28, 2026
d48ddce
fix: consume finalized Planner query candidate outputs
zzylol Sep 28, 2026
e42b0c1
test: require Planner filters for bound protocol vectors
zzylol Sep 28, 2026
96e31e3
test: use Planner schema lifting module
zzylol Sep 28, 2026
dbf18b0
fix: bind Planner filters and finalized query results
zzylol Sep 28, 2026
6292765
docs: describe bound Planner filter execution
zzylol Sep 28, 2026
23e08ac
fix: retain state binding and sharing beneath explicit query readouts
zzylol Sep 28, 2026
22c7d4f
fix: pin Planner query finalization for every candidate entry point
zzylol Sep 28, 2026
e26c787
docs: distinguish query values from stored accumulator boundaries
zzylol Sep 28, 2026
a061df2
test: assert exact Count state beneath its query readout
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
41 changes: 33 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ resolver = "2"
members = [
"crates/asap_otel_proto",
"crates/asap_types",
"crates/asap_sketch_codec",
"data_plane",
"control_plane",
]
Expand All @@ -15,10 +14,10 @@ version = "0.1.0"
[workspace.dependencies]
# Keep Planner frontends, selection, and IR on the same immutable revision.
# Alias upstream asap-types because this workspace also defines asap_types.
planner-types = { package = "asap-types", git = "https://github.com/ProjectASAP/ASAPPlanner", rev = "bccc837f5caf21c888b2cce73c64a1be283b679a" }
asap-aware-mapping = { git = "https://github.com/ProjectASAP/ASAPPlanner", rev = "bccc837f5caf21c888b2cce73c64a1be283b679a" }
asap-frontend-promql = { git = "https://github.com/ProjectASAP/ASAPPlanner", rev = "bccc837f5caf21c888b2cce73c64a1be283b679a" }
asap-frontend-sql = { git = "https://github.com/ProjectASAP/ASAPPlanner", rev = "bccc837f5caf21c888b2cce73c64a1be283b679a" }
planner-types = { package = "asap-types", git = "https://github.com/ProjectASAP/ASAPPlanner", rev = "4b0839ce1733aab8231eb90944c876063a4551f9" }
asap-aware-mapping = { git = "https://github.com/ProjectASAP/ASAPPlanner", rev = "4b0839ce1733aab8231eb90944c876063a4551f9" }
asap-frontend-promql = { git = "https://github.com/ProjectASAP/ASAPPlanner", rev = "4b0839ce1733aab8231eb90944c876063a4551f9" }
asap-frontend-sql = { git = "https://github.com/ProjectASAP/ASAPPlanner", rev = "4b0839ce1733aab8231eb90944c876063a4551f9" }

# Shared external deps (used by 2+ crates)
serde = { version = "1.0", features = ["derive"] }
Expand All @@ -38,6 +37,8 @@ arc-swap = "1.7"
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] }

# Internal crates
asap-physical-operators = { git = "https://github.com/ProjectASAP/ASAPPlanner", rev = "4b0839ce1733aab8231eb90944c876063a4551f9" }
asap_sketch_codec = { git = "https://github.com/ProjectASAP/ASAPPlanner", rev = "4b0839ce1733aab8231eb90944c876063a4551f9" }
asap_types = { path = "crates/asap_types" }
asap_otel_proto = { path = "crates/asap_otel_proto" }
indexmap = { version = "2.0", features = ["serde"] }
1 change: 1 addition & 0 deletions control_plane/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ name = "control_plane"
path = "src/main.rs"

[dependencies]
asap-physical-operators.workspace = true
tokio = { version = "1", features = ["full"] }
axum = { version = "0.7", features = ["ws"] }
futures-util = "0.3"
Expand Down
5 changes: 3 additions & 2 deletions control_plane/examples/calibration_candidates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ fn planner_forest(queries: &[control_plane::physical::compiler::QueryCompilation
vec![lhs, rhs],
json!({"operator_debug":format!("{operator:?}"),"timing_debug":format!("{timing:?}")}),
),

SummaryExpr::ValueOperation {
child,
operation,
Expand Down Expand Up @@ -73,11 +74,11 @@ fn planner_forest(queries: &[control_plane::physical::compiler::QueryCompilation
right,
kind,
pred,
pruning,
..
} => (
"RelationalJoin",
vec![left, right],
json!({"kind_debug":format!("{kind:?}"),"predicate_debug":format!("{pred:?}"), "pruning_debug":format!("{pruning:?}")}),
json!({"kind_debug":format!("{kind:?}"),"predicate_debug":format!("{pred:?}")}),
),
SummaryExpr::SummarySubtract { left, right } => {
("SummarySubtract", vec![left, right], json!({}))
Expand Down
1 change: 1 addition & 0 deletions control_plane/src/emit/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ fn extract_from_node(node: &Rc<SummaryNode>) -> Option<SketchAlgorithm> {
SummaryExpr::SummaryEstimate { summary_input, .. } => extract_from_node(summary_input),
SummaryExpr::SummaryMerge { children, .. } => children.iter().find_map(extract_from_node),
SummaryExpr::ValueOperation { child, .. } => extract_from_node(child),

// Not surfaced by any `Bind*` path yet (gated on rules that
// haven't landed — see `deployment_expr.rs`'s module docs).
SummaryExpr::BinaryOp { .. }
Expand Down
37 changes: 18 additions & 19 deletions control_plane/src/physical/compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2094,6 +2094,7 @@ fn summary_agg_metric(node: &SummaryNode) -> Option<String> {
}
}
SummaryExpr::SummaryAgg { child, .. } => walk(child, metrics),

SummaryExpr::ValueOperation { child, .. } => walk(child, metrics),
SummaryExpr::SummaryEstimate { summary_input, .. } => walk(summary_input, metrics),
SummaryExpr::SummaryMerge { children, .. } => {
Expand Down Expand Up @@ -2162,11 +2163,12 @@ fn observed_population_matches_root(
};
if measures.is_empty()
|| !measures.iter().all(|intent| {
matches!(
intent,
AggIntent::FrequencyL2 { col: None, .. }
| AggIntent::FrequencyEntropy { col: None, .. }
) || matches!(intent, AggIntent::Cardinality { cols, .. } if cols.is_empty())
matches!(intent, AggIntent::Cardinality { cols, .. } if cols.is_empty())
|| matches!(
intent,
AggIntent::FrequencyL2 { col: None, .. }
| AggIntent::FrequencyEntropy { col: None, .. }
)
})
{
return false;
Expand Down Expand Up @@ -2369,6 +2371,7 @@ fn requires_exact_erp_fallback(
walk(left, out);
walk(right, out);
}

SummaryExpr::KeepPreAsap(_) => {}
}
}
Expand Down Expand Up @@ -3601,16 +3604,14 @@ fn collect_selected_materializations(
}
match &node.expr {
SummaryExpr::RelationalJoin {
right: candidates,
left: values,
right: candidates,
kind: planner_types::pre_asap::JoinKind::Semi,
pruning: Some(_),
..
} => {
walk(candidates, readout, composable, grouping.clone(), selected)?;
// In a hybrid TopK, the sketch is only a candidate-membership
// sidecar. Prometheus owns the authoritative value subtree;
// provisioning local exact state here duplicates that work.
// Explicit external authoritative values do not need duplicate local state.
if !composable {
walk(values, readout, composable, grouping.clone(), selected)?;
}
Expand Down Expand Up @@ -4479,6 +4480,7 @@ pub(crate) mod tests {
}
}

// The explicit rate-value frontier cannot be rebound as raw counter deltas.
#[test]
fn unsupported_rate_heap_uses_explicit_exact_route() {
let query = "topk(2, sum by (job) (rate(m[1m])))";
Expand Down Expand Up @@ -4506,6 +4508,7 @@ pub(crate) mod tests {
assert!(plan.precompute_plan.materializations.is_empty());
}

// Native exact values remain explicit; unsupported heaps publish no stored state.
#[test]
fn hybrid_rate_topk_preserves_the_original_exact_subquery() {
let query = "topk(2, sum by (job) (rate(m[1m])))";
Expand All @@ -4530,7 +4533,7 @@ pub(crate) mod tests {
assert!(matches!(
&entry.nodes[&entry.root],
QueryPlanNode::Logical {
operator: ResidualQueryOperator::TopKSelection { k: 2, .. },
operator: ResidualQueryOperator::Limit { n: 2, .. },
..
}
));
Expand Down Expand Up @@ -5753,6 +5756,11 @@ pub(crate) mod tests {
let selected = match &selected_root.expr {
SummaryExpr::SummaryEstimate { summary_input, .. } => summary_input.clone(),
SummaryExpr::SummaryAgg { .. } => selected_root.clone(),
SummaryExpr::ValueOperation {
child,
operation: planner_types::post_asap::ValueOperation::FinalizeExactAccumulator,
..
} => child.clone(),
_ => panic!("expected maintained aggregate fixture"),
};
request.queries[0].selected_plan_root = Rc::new(SummaryNode {
Expand Down Expand Up @@ -5956,15 +5964,6 @@ pub(crate) mod tests {
let (right, _) = right.into_physical_compilation_request().unwrap();
let left = request.queries[0].selected_plan_root.clone();
let right = right.queries[0].selected_plan_root.clone();
let right = Rc::new(SummaryNode {
expr: SummaryExpr::ValueOperation {
timing: planner_types::post_asap::ExecutionTiming::QueryTime,
operation: planner_types::post_asap::ValueOperation::FinalizeExactAccumulator,
child: right.clone(),
},
schema: right.schema.clone(),
guarantee: None,
});
request.queries[0].selected_plan_root = Rc::new(SummaryNode {
expr: SummaryExpr::BinaryOp {
timing: planner_types::post_asap::ExecutionTiming::QueryTime,
Expand Down
13 changes: 11 additions & 2 deletions control_plane/src/physical/plan_dot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,16 @@ fn escape(value: &str) -> String {

fn query_node_label(node: &QueryPlanNode) -> String {
match node {
QueryPlanNode::PhysicalFragment { dag, .. } => {
asap_physical_operators::physical_planner::CompiledPhysicalDag::decode(dag)
.map(|plan| {
format!(
"Physical\n{}",
plan.operator_name(plan.roots()[0]).unwrap_or("Input")
)
})
.unwrap_or_else(|_| "Invalid physical DAG".into())
}
QueryPlanNode::RelationalJoin { .. } => "RelationalJoin".into(),
QueryPlanNode::Relational { .. } => "Relational".into(),
QueryPlanNode::Logical { operator, .. } => format!("Logical\n{}", residual_label(operator)),
Expand All @@ -154,7 +164,6 @@ fn query_node_label(node: &QueryPlanNode) -> String {
QueryPlanNode::SummaryEstimate { query, .. } => format!("SummaryEstimate\n{query:?}"),
QueryPlanNode::ExactReadout { readout, .. } => format!("ExactReadout\n{readout:?}"),
QueryPlanNode::SummaryMerge { .. } => "SummaryMerge".into(),
QueryPlanNode::MembershipFilter { .. } => "MembershipFilter".into(),
QueryPlanNode::ExternalExact { .. } => "ExternalExact".into(),
QueryPlanNode::ExactFallback { reason } => format!("ExactFallback\n{reason}"),
}
Expand All @@ -169,7 +178,7 @@ fn residual_label(operator: &ResidualQueryOperator) -> &'static str {
ResidualQueryOperator::UnaryNegate => "UnaryNegate",
ResidualQueryOperator::VectorToScalar => "VectorToScalar",
ResidualQueryOperator::Aggregate { .. } => "Aggregate",
ResidualQueryOperator::TopKSelection { .. } => "TopKSelection",
ResidualQueryOperator::Limit { .. } => "Limit",
ResidualQueryOperator::Binary { .. } => "Binary",
ResidualQueryOperator::Temporal { .. } => "Temporal",
ResidualQueryOperator::Sort { .. } => "Sort",
Expand Down
39 changes: 37 additions & 2 deletions control_plane/src/physical/post_asap/cost_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,20 @@ impl ControlPlaneCostModel {
&self,
candidate: &ReplacementSubDAG,
) -> Option<CandidateCostEstimate> {
if let Replacement::Rewrite(root) = &candidate.replacement {
// Price a semantic rewrite through its executable summary candidates,
// in the same retained-state units as a direct summary candidate.
// Unknown realizations remain uncosted rather than receiving zero.
use asap_aware_mapping::{ReplacementStrategy, SketchAlgorithmStrategy, TargetSubDAG};
return SketchAlgorithmStrategy::new(self)
.replacements(&TargetSubDAG::new(root))
.iter()
.filter(|candidate| matches!(candidate.replacement, Replacement::Summary(_)))
.filter_map(|candidate| self.candidate_cost_estimate(candidate))
.min_by(|a, b| a.value.total_cmp(&b.value));
}
let Replacement::Summary(root) = &candidate.replacement else {
// Exact compositions have a separate measured rate model. Raw
// rewrites have no retained-state estimate in this model.
// Exact compositions have a separate measured rate model.
return None;
};
let dag = planner_types::post_asap::compile_executable_dag(root).ok()?;
Expand Down Expand Up @@ -510,6 +521,23 @@ fn intent_accuracy(intent: &AggIntent) -> AccuracyTarget {
}

impl CostModel for ControlPlaneCostModel {
fn summary_support_evidence(
&self,
summary: &planner_types::post_asap::SummaryNode,
) -> Option<bool> {
use planner_types::post_asap::{NonNegativeWeightProof, WeightDomain};
let dag =
planner_types::post_asap::compile_executable_dag(&std::rc::Rc::new(summary.clone()))
.ok()?;
// Counter-weighted heaps now consume explicit rate values. The raw
// ingestion adapter cannot bind that frontier as counter deltas.
let requires_rate_values = dag.nodes.iter().any(|node| matches!(&node.payload,
ExecutableOperatorPayload::SummaryAgg { input, family: SummaryFamilyType::Sketch(kind, _), .. }
if matches!(kind.algorithm(), SketchAlgorithm::CmsWithHeap | SketchAlgorithm::CountSketchWithHeap)
&& matches!(input.weight_domain, WeightDomain::NonNegative { proof: NonNegativeWeightProof::ResetAwareCounterDerivative })));
requires_rate_values.then_some(false)
}

fn candidate_cost(
&self,
candidate: &ReplacementSubDAG,
Expand Down Expand Up @@ -869,6 +897,13 @@ impl ForcedFamilyCostModel {
}

impl CostModel for ForcedFamilyCostModel {
fn summary_support_evidence(
&self,
summary: &planner_types::post_asap::SummaryNode,
) -> Option<bool> {
self.inner.summary_support_evidence(summary)
}

fn candidate_cost(
&self,
candidate: &ReplacementSubDAG,
Expand Down
Loading
Loading