Skip to content

feat(data_plane): default ASAP_SUMMARY_EXECUTOR_LIVE to on - #427

Merged
zzylol merged 1 commit into
mainfrom
feat/summary-executor-live-default-on
Jul 29, 2026
Merged

zzylol merged 1 commit into
mainfrom
feat/summary-executor-live-default-on

Conversation

@zzylol

@zzylol zzylol commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Per control_plane/docs/design-target-architecture.md's Part A: the serving-time cutover's stated blocker (grouping ambiguity for empty, sketch-family by) is already resolved — find_candidates already branches on the real Reduction::{Reduce(GroupKeys), PerEntity} IR signal (summary_executor.rs's resolve_group_key), not an empty-key heuristic. Both unit tests and a real HTTP-level e2e test (live_serve_hll_global_count_merges_across_sids, live_serve_actually_answers_ddsketch_quantile) already prove correctness for the shapes try_serve_from_summary_executor covers.

The env var stays as a kill switch (ASAP_SUMMARY_EXECUTOR_LIVE=0/false/off), not removed — shapes this executor self-excludes before binding (rate()/irate(), topk(K, sum by(...)(rate(...))), keyed-CMS point-estimate) still fall through to the legacy SketchReducer path unconditionally, regardless of this flag. sketch_reducer.rs itself is untouched — it remains the permanent fallback for those shapes, not legacy debt pending deletion.

live_serve.rs's own tests updated: flag_off_never_serves → explicit set_live_env("0") (kill-switch test, was relying on unset=off); added unset_flag_defaults_to_serving pinning the new default explicitly.

Verified two pre-existing e2e failures (controller_plan_to_query_full_roundtrip_{cms,count_sketch}_with_heap_topk) are unrelated to this change — confirmed via git stash against the unmodified base commit, same 2 failures with or without this diff.

Test plan

  • cargo build -p data_plane — clean
  • cargo test --release --lib -p data_plane — 957/957
  • cargo test --release --lib -p data_plane live_serve:: — 5/5
  • cargo test --release -p data_plane --test e2e_controller_plans_and_backend_serves — 12/14 (2 pre-existing, unrelated failures, confirmed via git stash against base)
  • cargo test --release -p data_plane --test e2e_modified_otlp_sketch_path — 0/0 (6 pre-existing, unrelated ignores)

🤖 Generated with Claude Code

Per control_plane/docs/design-target-architecture.md's Part A: the
serving-time cutover's stated blocker (grouping ambiguity for empty,
sketch-family `by`) is already resolved -- find_candidates already
branches on the real Reduction::{Reduce(GroupKeys), PerEntity} IR
signal (summary_executor.rs's resolve_group_key), not an empty-key
heuristic. Both unit tests and a real HTTP-level e2e test
(live_serve_hll_global_count_merges_across_sids,
live_serve_actually_answers_ddsketch_quantile) already prove
correctness for the shapes try_serve_from_summary_executor covers.

The env var stays as a kill switch (ASAP_SUMMARY_EXECUTOR_LIVE=0/false/
off), not removed -- shapes this executor self-excludes before binding
(rate()/irate(), topk(K, sum by(...)(rate(...))), keyed-CMS
point-estimate) still fall through to the legacy SketchReducer path
unconditionally, regardless of this flag. sketch_reducer.rs itself is
untouched -- it remains the permanent fallback for those shapes, not
legacy debt pending deletion.

live_serve.rs's own tests updated: flag_off_never_serves -> explicit
set_live_env("0") (kill-switch test, was relying on unset=off); added
unset_flag_defaults_to_serving pinning the new default explicitly.

Verified two pre-existing e2e failures
(controller_plan_to_query_full_roundtrip_{cms,count_sketch}_with_heap_topk)
are unrelated to this change -- confirmed via git stash against the
unmodified base commit, same 2 failures with or without this diff.

cargo build clean; data_plane 957/957 lib tests pass; live_serve:: 5/5;
e2e_controller_plans_and_backend_serves 12/14 (the 2 pre-existing,
unrelated failures noted above); e2e_modified_otlp_sketch_path 0/0 (6
pre-existing, unrelated ignores).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@zzylol
zzylol merged commit c4ded5d into main Jul 29, 2026
@zzylol
zzylol deleted the feat/summary-executor-live-default-on branch July 29, 2026 16:53
zzylol added a commit that referenced this pull request Jul 29, 2026
)

* retire(data_plane): remove shadow_compare.rs and sketch_reducer.rs

Neither was any more "ground truth" than SummaryExecutor itself:
shadow_compare.rs's job (validate SummaryExecutor against the legacy
reducer before cutover) was done once the cutover landed (#427), and
sketch_reducer.rs (the legacy reducer) is fully retired -- there's no
longer a second, independently-planned answering mechanism that could
silently disagree with SummaryExecutor.

Also fixes the real bug this surfaced: engine.rs's live-serving path
re-derived its own L4 plan from raw query text at a hardcoded
Epsilon(0.01) accuracy, independent of whatever the metric was ACTUALLY
planned/registered with. control_plane's bind_query_expr_with_cost_model
(new) + ObservedFamilyCostModel look up the real registered
(SummaryKind, SummaryParams) for the query's metric and reproduce that
exactly, instead of guessing -- serving time must reuse what planning
already decided, not re-plan independently (see the updated design doc).

Excluded shapes (rate()/irate(), topk-over-rate, keyed-CMS
point-estimate) now fail over to archive directly, with no legacy
fallback -- accepted per design. Two further shapes (outer exact
fold over an inner realized summary, e.g. `max/avg by (zone)
(quantile_over_time(...))`) are accepted gaps pending
ProjectASAP/ASAPPlanner#171, filed
upstream rather than routed around locally, same category as the
already-tracked TopK{accuracy:Exact} gap (ASAPController#151).

Two e2e tests are marked #[ignore] with root-cause comments: removing
the reducer's silent fallback exposed a pre-existing, previously-masked
bug where `effective_is_cumulative` misclassifies bare `count(...)` as
non-cumulative, causing a per-window (not whole-range) readout to pick
a later "watermark" sample over real data. This bug predates today's
changes (it was already latent in the merged serving-time cutover,
#427) and is tracked as a separate follow-up, not fixed here.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* docs: link the two ignored e2e tests to their tracking issues

Reference ASAPQuery-backend#431 (effective_is_cumulative gap) from
both #[ignore] comments -- confirmed root cause for
live_serve_hll_global_count_merges_across_sids, possibly the same
cause (unconfirmed) for controller_plan_to_query_full_roundtrip_count_sketch.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant