Conversation
Repin ASAPPlanner to c98281a (integration/planner-for-backend). That revision keeps only in-memory physical kernels, so the backend now owns what Planner dropped, unchanged in behaviour and byte format: - crates/asap_summary_state: the stored summary kernels, AggregationType, stored-state decoders, delta reconstruction, native batch frames and conversion to Planner physical states at DAG boundaries. - crates/asap_sketch_codec: the SketchEnvelope codec. - asap_types::physical_plan_codec: the versioned plan/candidate envelope. - asap_types::semantic_fragment: SummarySemanticFragment and LogicalDatasetIdentity. - control_plane rate_placement: the fixed-window and query-time Rate placement variants Planner no longer lists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 #792.
Why
The backend must build against the Planner integration revision
c98281a(integration/planner-for-backend: #473→#474→#475 plus #477, #479,#483, #484, #485). That revision keeps only in-memory physical computation in
Planner. Storage formats, stored-state decoding, the stored-definition identity
and Rate placement variants are no longer Planner's. This PR (step D1) moves
them into the backend without changing backend behaviour. Candidate selection
is unchanged; redesigning it is D2.
What
76fbbf16toc98281a. InCargo.lock, only the Plannersourcelines, Planner's dropped dependenciesand the new path crates change. No unrelated crate moved.
crates/asap_summary_state(new): the stored summary kernels (Sum, Min/Max,keyed states, sketches with
sample_p, envelope, …),AggregationType,their byte encodings,
stored_state(decoders, delta reconstruction, nativebatch frames, readouts), and
physical: conversion between stored andPlanner physical states where stored state enters or leaves a physical DAG.
Code is taken from Planner
76fbbf16, with its tests.crates/asap_sketch_codec: moved into the workspace unchanged.asap_types::physical_plan_codec: the versioned JSON envelope of persistedphysical plans and candidates (Planner now exposes only serde). The bytes
match what Planner wrote.
asap_types::semantic_fragment:SummarySemanticFragmentandLogicalDatasetIdentity, moved from Planner.control_plane::physical::compiler::rate_placement: the fixed-window andquery-time Rate→heap/Sum placement variants that fix(precompute): preserve deadline corrections #485 removed from
SketchAlgorithmStrategy. They are derived from the same direct candidates,and compiled through
compile_post_asap_dagand the newcompile_fixed_window_rate_aggregation(&PostAsapDag).PaneInput,compile_temporal_pane_candidate), so nothing was ported. No backend fixtureembeds docs: define ASAPQuery compatibility profile #479 helper IDs, so none needed regeneration.
Before this PR
After this PR
Example: a fixed-window
sum by (job) (rate(requests_total[1m]))precomputebinds stored counter windows. They convert to Planner exact states, run in the
Planner DAG, and publish outputs converted back to stored kernels. The
revision records and native batch bytes are the same as before.
Behaviour differences
SumAccumulatoris bound as a physical input, or decoded froma native
SumAccumulatorV1cell, it becomes Planner's exact Sum state, theonly exact state the new Planner accepts. Sum readouts are unchanged. If such
a cell is re-encoded, it is written as
ExactAccumulatorV1, and itsobservation count is not carried over.
(
sample_p ≠ 1) is still rejected as a physical input.operator IDs, readout operators serialized as
ReadoutQuery, and the widercompile coverage from feat(precompute): separate idle and deadline closure #484. Physical plans persisted by a backend built on
76fbbf16may not deserialize under the new operator serde, although theirenvelope is unchanged.
Validation
cargo fmt --all -- --check: cleancargo clippy --workspace --all-targets --locked -- -D warnings: cleancargo test --workspace --locked --lib: all pass (asap_summary_state 239,asap_types 132, control_plane 443, data_plane 898)
cargo test -p control_plane --locked --tests: all passcargo test -p data_plane --locked --test asapquery_compatibility_process_e2e -- --test-threads=1:23 passed, 1 failed. The failing test is
issue_workloads_execute_warm_at_successive_evaluations, which exceeds its30 s readiness budget because of startup candidate search. This failure is
already known on this branch. The timeout was not raised.
frequency, sampled rejection), plan/candidate envelope round trips, the
stored Sum native cell, key/measurement codecs, and both Rate placement
variants.
🤖 Generated with Claude Code