Repository navigation
Description
Goal
Implement the public boundary documented in docs/developer_docs/control-plane/physical-compiler.md: consume the latest ASAPPlanner selected post-ASAP workload plan and compile one cross-validated bundle containing CollectorPlan projections and BackendPlan.
Why this is separate
The backend currently pins ASAPPlanner at cb70086. A compatibility audit against latest main at c58eadf found a whole-interface migration, not a safe dependency-only bump. cargo check -p control_plane reports broad API breakage when bumped directly.
Required mapping
SummaryExpr::KeepPreAsapand current pre-ASAP node vocabularySummaryAgg.familywith the newSketchKind { category, algorithm, params }model- preserve
Reduction::PerEntityvsReduction::Reduce { by: [] } - preserve
GroupingStrategyincluding shared multi-subpopulation layouts - attach
SummaryMaintenanceMode::{DirectBuild, Incremental}in deployment policy - insert stage-boundary
SummaryMergewithout changing logical semantics - compile matching materialization identity, window, guarantee, transmission, and readout into CollectorPlan and BackendPlan
- reject unsupported family/capability/topology combinations; never rewrite the selected statistic
Public API acceptance
Implement the documented PlannerAdapter, PhysicalCompiler, and CompiledPlanBundle boundary (or update the documentation in the same change if upstream public names differ). Cross-plan validation must prove every collector-produced materialization has a compatible backend declaration and every query route references a declared materialization.
Tests
- deterministic compilation and fingerprints
- complete-workload/shared materialization preservation
- per-entity vs empty reduction
- per-subpopulation vs shared grouping
- direct-build vs incremental maintenance
- unsupported topology/capability/guarantee errors
- collector/backend window, family, params, and identity parity
- stale/partial publication is not activated
This issue follows the docs ownership rule: ASAPPlanner owns logical mapping; ASAPQuery-backend owns deployment-specific physical compilation.
Activity
zzylol commentedon Sep 4, 2026
Resolved by the merged physical-planning series, beginning with #450 (latest ASAPPlanner IR migration) and #451 (public physical compiler), and completed by #452–#477 plus #493–#500. Current
mainnow consumes the pinned canonical Planner IR, exposesPhysicalCompiler, compiles cross-validated precompute/backend/query projections with content-derived identities, validates route/materialization compatibility, and has deterministic/fail-closed compiler and publication tests. I re-audited the current implementation against this issue’s required mapping and acceptance list; the originalcb70086compatibility gap and missing compiler boundary no longer exist.