Skip to content

test: planner-layering Examples 1–4 acceptance specs on the planning stages - #577

Merged
zzylol merged 19 commits into
mainfrom
stack/509-c4-example1-acceptance
Oct 13, 2026
Merged

zzylol merged 19 commits into
mainfrom
stack/509-c4-example1-acceptance

Conversation

@zzylol

@zzylol zzylol commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Why

planner-layering.md walks four examples through query-language frontends, logical ASAP-aware optimization, physical ASAP-aware optimization and plan selection. Nothing checked the stages against those examples, so a stage could change its candidates or its selection without a test failing. Acceptance specs written by a test designer, run against the real stages, measure the stages against the doc and record every place where they still differ.

What

  • Acceptance specs, one per example, under docs/design_docs/proposals/:
    • planner-layering-example1-acceptance.md (MVP: counts 1 → 3 → 3 → 1).
    • planner-layering-example2-acceptance.md, -example3-acceptance.md, -example4-acceptance.md, ported from test: #509 Examples 2–4 acceptance specs and end-to-end tests #590 (which will be closed).
    • Each lists per-stage candidate tables, invariants with their test and status, and where the doc and the planner differ.
  • Tests in crates/integration-tests/tests/: planner_layering_example{1,2,3,4}.rs over adapters in planner_layering_common/. A test whose feature is missing is #[ignore]d with the PR or issue that delivers it. Test names carry the stage number and name (stage0_query_language_frontends_…, stage1_logical_asap_optimization_…, stage2_physical_asap_optimization_…, stage3_plan_selection_…).
  • One shared pipeline in the asap-devtools library: planning_stages::run_planning_stages(workload, roots) returns a PlanningStagesRun (stage0_query_language_frontends, stage1_logical_asap_optimization, stage2_physical_asap_optimization, stage2_pruned, stage3_plan_selection) and runs logical ASAP-aware optimization (Pass 1 and composition, recording per-candidate composition errors), physical ASAP-aware optimization and plan selection over every candidate; planner_layering_examples holds the Example 1, 3 and 4 workloads. stage_pipeline serializes the run and the tests adapt it, so both see the same candidates, ids and selection.
  • stage_pipeline --example planner-layering-3a | planner-layering-3b: Example 3's Pattern A batch and Pattern B panel in the devtool. Every candidate is optimized and priced; --max-displayed <n> (default 64; replaces --max-candidates) limits only how many the document shows, plus the selected one.
  • docs/user_guide_docs/stage-viewer.md: the "What to look for" cells of tabs 1, 2, 3a and 3b describe the planner's current output, and the --max-displayed option.

How

The Example 1 spec and tests were written first against todo!() stubs, then the stubs were replaced by thin adapters over the stages from #575 and #576. Tests identify candidates by structure (which summary each query reads, which nodes queries share), never by id. Rebased on the final #576 (1ad70f9), the tests follow its behavior:

  • Exact top-k: sort each job by the ranked value, limit 10, then a Project restoring [job, topk_10].
  • Plan selection charges a NotMaterialized node once per consuming query and a materialized node once (NodeCost::multiplier). The shared charging helper now checks that rule instead of "each node once".

The viewer fixture tools/dag-viewer/examples/planner-layering-example1.json was regenerated with stage_pipeline --example planner-layering-1 and is byte-identical to #576's. planner-layering-3a prices all 243 candidates and selects P122 (KLL for all five queries), the first of 32 plans tied at the lowest cost, 78209376.4 (KLL or DDSketch per query, 2⁵; exact on an offset interval costs 2 more, e.g. P121 = 78209378.4); 3b selects P2 (KLL). Runs are uncapped: before, enumeration stopped at 64 candidates and 3a selected P41.

The shared data workload has no ingestion_rate when data is at rest: DataWorkload::validate rejects a positive rate there, and planner-layering.md's at-rest variant has no ingestion. The devtool always set it; the tests dropped it, and the shared definition now follows the tests.

Before

No test runs the planning stages on the doc's examples. Example 4's spec left open whether plan selection charges a non-materialized shared node once per consumer or physical ASAP-aware optimization duplicates it.

After

cargo nextest run -p asap-integration-tests -E 'binary(/planner_layering/)': 85 tests, 52 pass, 33 ignored.

Example 1 (1 → 3 → 3 → 1; the doc's full set is 1 → 54 → 156 → 1):

Id Q2 top-k Outcome Reason
P1 exact: sort by value per job → limit 10 → Project [job, topk_10] selected the only valid candidate
P2 Count-Min + heap per job invalid sum_over_time weights are not proven non-negative
P3 CountSketch + heap per job invalid a top-k output has no guarantee and the deployment has no evidence

Q1 is exact in all three. Every node is NotMaterialized.

Example Pass Ignored Ignored tests wait on
1 23 4 Hydra (#605); identical-expression rule (#588) ×2; every candidate compiling: CMS+heap weights (#593), CountSketch+heap estimate shape (#579)
2 14 10 SQL Entropy/L2 recognition (#598) ×2; specialized entropy/L2 summaries (no PR); summary-capability rule (#595, #596) ×4; UnivMon sizing and accuracy model (#621) ×2; shared UnivMon cheaper than three (#595, #596, #621, #604)
3 12 7 identical-expression rule (#588); window composition across queries (#628, #634) ×3; shared scan pricing (#588, #632); tumbling (#601) and sliding (no PR) windows ×2
4 3 12 Pattern A: shared window segments (#628, #634), materialization enumeration (#604), MatAtQuery (#625) ×6; Pattern B: tumbling windows (#601), #604, #625 ×5; sliding windows (no PR) ×1

Example 4's charging question is now decided: a shared NotMaterialized node is charged once per consuming query, so A3 costs five EH builds and A1 one. No Example 4 test became runnable from it, since the shared EH and its materialization options do not exist yet. Example 2's shared-UnivMon dominance test now also names #604: unmaterialized, the shared UnivMon is charged three times.

Evidence

  • New Example 1 test stage2_physical_asap_optimization_exact_topk_returns_job_and_topk_10: Q2's root is Project → Limit 10 → Sort (one descending key on value, partitioned by job), with root columns [job, topk_10].
  • assert_each_node_charged_per_consuming_query mirrors plan selection's computation count: walks from each operator root, scalar root and materialized node's inputs, stopping at materialized nodes; a materialized node counts 1. stage3_plan_selection_charging_helper_* check it on a hand-built candidate with a MatAtQuery node read by two queries.
  • Example 2's SQL workload composes all 80 candidates; its ignored SQL test fails only on Q2's options, which wait on feat(frontend-sql): recognize the SQL frequency L2 and entropy idioms #598.
  • example3a_selects_the_cheapest_of_all_candidates: stage_pipeline --example planner-layering-3a selects what run_planning_stages selects over all candidates (P122).
  • Regenerated planner-layering-example1.json: identical to feat(planner): physical ASAP-aware optimization and plan selection for candidate logical ASAP DAGs #576's.

Verification

At e2afcd0:

  • cargo fmt --all -- --check: clean.
  • cargo clippy --workspace --all-targets -- -D warnings: clean.
  • cargo nextest run --workspace: 1654 passed, 0 failed, 35 skipped (33 are the planner-layering ignores).
  • python3 tools/dag-viewer/test_render.py: 29 tests OK.
  • bash tools/verify_metricsql_external_consumer.sh: passes.

Architectural decisions

  • Tests, specs, devtools and the stage-viewer user guide only. No stage or IR changes. New asap-devtools library modules (planning_stages, planner_layering_examples) so the devtool and the tests run one pipeline over the same workloads.
  • Adapters in planner_layering_common are the only place that reads stage output, so a stage change touches one file.
  • Ignored tests encode the doc's expectation, not today's output; each names what delivers it.
  • Charging follows the decision in feat(planner): physical ASAP-aware optimization and plan selection for candidate logical ASAP DAGs #576: per consuming query for NotMaterialized, once for materialized. Physical ASAP-aware optimization does not duplicate shared nodes.
  • Plan selection always ranks every candidate; a display cap never changes the selection.
  • Example 1's tests count only candidates with no shared input (3 logical, 3 physical), pick a Q2 option's candidate by (option, no shared input) and do not count invalid candidates, so feat(planner): Pass 2 identical-expression rule (shared-input variants) #588's shared-input variants need no test change.

Limitations and follow-up

Where the planner differs from planner-layering.md Example 1 (listed in the spec, not fixed in the doc):

  1. Counts: the doc's 54 logical and 156 physical candidates need Pass 2 (feat(planner): Pass 2 identical-expression rule (shared-input variants) #588, Pass 2 window composition: tumbling panes #601) and materialization enumeration (Stage 2 materialization: ingestion vs query time per summary #604); the MVP has 3 and 3.
  2. Q2 options: the doc lists exact, Count-Min + heap, Hydra; the planner offers exact, Count-Min + heap, CountSketch + heap. Hydra is feat(planner): Pass 1 offers HydraCms for grouped approximate counts #605, and the doc does not name Hydra's inner sketch.
  3. Count-Min + heap is invalid on unproven non-negative weights (feat(planner): declare counter metrics so CMS+heap can prove non-negative weights #593); the doc expects the accuracy model to judge it.
  4. No summary is selectable: a composed top-k estimate has no guarantee, so the exact plan wins. The doc expects a summary to win in most deployments.
  5. The doc's physical ASAP-aware optimization step for Example 1 is materialization only; the MVP's is operator implementation (exact top-k as sort + limit), one physical candidate per logical one.
  6. The doc's Pass 1 diagram draws exact Q2 as sort + limit; the planner rewrites it only in physical ASAP-aware optimization.
  7. "Shared summary charged once" does not apply: no summary is shared, and a NotMaterialized shared input is charged per consuming query, so sharing saves nothing until it is materialized.
  8. Latency bounds (Q2 ≤ 100 ms) are not checked by plan selection.

Examples 2–4 list their own differences in their specs. No planner-layering-2 or -4 devtool example yet; the specs say what each needs.

Stack: tracker #528 · main → #577 → #578 → …

Human review — do not complete with an agent

  • The MVP boundary is correct.
  • New conceptual layers or public interfaces are necessary.
  • The before/after description matches the intended product behavior.
  • Human reviewer:
  • Decision and rationale:

🤖 Generated with Claude Code

https://claude.ai/code/session_01W7qG9aFyPij5uWsyAJCxDW

@zzylol
zzylol force-pushed the stack/509-c4-example1-acceptance branch from 0afc939 to f620555 Compare October 5, 2026 06:21
@zzylol
zzylol force-pushed the stack/509-c3-stage2-3 branch from 6b7d8a8 to d613b0f Compare October 8, 2026 16:47
@zzylol
zzylol force-pushed the stack/509-c4-example1-acceptance branch from f620555 to b8ad78c Compare October 8, 2026 16:47
@zzylol
zzylol force-pushed the stack/509-c3-stage2-3 branch from d613b0f to 243c791 Compare October 10, 2026 14:32
@zzylol
zzylol force-pushed the stack/509-c4-example1-acceptance branch from b8ad78c to 0541f9a Compare October 10, 2026 14:32
@zzylol
zzylol force-pushed the stack/509-c3-stage2-3 branch from 243c791 to bd70f05 Compare October 11, 2026 17:11
@zzylol
zzylol force-pushed the stack/509-c4-example1-acceptance branch from 0541f9a to 4f6e4ba Compare October 11, 2026 17:11
@zzylol
zzylol force-pushed the stack/509-c3-stage2-3 branch 3 times, most recently from 99a1b3c to 60197da Compare October 13, 2026 15:02
@zzylol
zzylol force-pushed the stack/509-c4-example1-acceptance branch from 4f6e4ba to d360107 Compare October 13, 2026 15:32
@zzylol zzylol changed the title test: #509 Example 1 acceptance spec and end-to-end tests test: planner-layering Examples 1–4 acceptance specs on the planning stages Oct 13, 2026
zzylol and others added 7 commits October 13, 2026 15:34
Define MVP acceptance for #509 Example 1 before the Phase C stage APIs
exist: 1 -> 6 -> 6 -> 1 candidates (Pass 1 x identical-expression
sharing; physical operator implementation only, no materialization).

- Spec with per-stage candidate tables, invariants and doc ambiguities.
- Integration tests against todo!() stage stubs, ignored until the
  stages land; workload and Stage 0 frontend-shape tests run now.
- Expected-only asap-stage-pipeline/v1 fixture for the DAG viewer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the todo!() stubs with adapters over Stage 0-3, un-ignore the 11
tests that pass, and give each still-ignored test the precise difference
between the implementation and the spec. Add runtime capability checks:
the selected plan compiles in the physical planner; compiling every
candidate stays ignored with the two runtime gaps it finds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tests run Pass 1 and composition, optimize_physical_asap and
select_plan through a shared tests/planner_layering_common pipeline, and
follow the decided behavior: three Pass 1 candidates (Q2 exact, CMS+heap,
CountSketch+heap), every sub-DAG NotMaterialized, P1 selected, CMS+heap
invalid (weights not proven non-negative) and CountSketch+heap invalid (a
Top-K output has no guarantee and no deployment evidence). Hydra (#605),
Pass 2 sharing (#588) and the two runtime gaps (#593, #579) stay ignored
with the PR that delivers them. Tests are named after the stages; the
compile check no longer uses the PromQL fallback. The spec lists where the
doc and the planner differ. The expected-only viewer fixture is removed:
the generated four-stage fixture replaces it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W7qG9aFyPij5uWsyAJCxDW
The specs and tests from #590 run the current stages through the shared
planner_layering_common pipeline (Pass 1 and composition,
optimize_physical_asap, select_plan); tests are named after the stages.
Materialization is read from the physical DAG (#667); window forms and
retention stay pending adapters. Behavior that works passes (29 tests);
every expectation that needs a feature not in this stack is ignored with
the PR that delivers it (29 tests): Pass 2 sharing (#588, #595, #596),
window composition (#601, #628, #634), materialization enumeration and
MatAtQuery (#604, #625), UnivMon sizing and accuracy (#621), SQL
recognition and COUNT(*) composition (#598, #603) and plan selection row
estimates (#632). Each spec's "Today" column states the current output.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W7qG9aFyPij5uWsyAJCxDW
Ported from #590: --example planner-layering-3a (Pattern A, ad hoc batch of
five p99 reports) and planner-layering-3b (Pattern B, repeating 5-min p99),
the Example 3 acceptance tests' workloads. Example 1's output is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W7qG9aFyPij5uWsyAJCxDW
Plan selection charges a NotMaterialized node once per consuming query,
so the charging helper checks NodeCost.multiplier and the Example 4 A3
ambiguity is recorded as decided. Example 1 checks that exact Q2 sorts by
the ranked value and returns [job, topk_10]. The stage viewer guide's
tab 1 row now describes the actual all-exact result.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W7qG9aFyPij5uWsyAJCxDW
@zzylol
zzylol changed the base branch from stack/509-c3-stage2-3 to main October 13, 2026 15:34
@zzylol
zzylol force-pushed the stack/509-c4-example1-acceptance branch from d360107 to 074c51a Compare October 13, 2026 15:34
zzylol and others added 4 commits October 13, 2026 15:55
…acceptance tests

run_planning_stages and the #509 example workloads move into the
asap-devtools library; stage_pipeline serializes the run and the
planner-layering tests adapt it. The shared data workload drops
ingestion_rate for data at rest, which validate() requires.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W7qG9aFyPij5uWsyAJCxDW
…ly the document

stage_pipeline capped enumeration at 64, so Example 3a (243 candidates)
selected P41 instead of the cheapest P122 (KLL for all five queries).
The pipeline now enumerates, optimizes and prices every candidate; the
document shows the first --max-displayed (default 64) plus the selected
one, with `combinations` and `capped`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W7qG9aFyPij5uWsyAJCxDW
…598

Running the ignored SQL test composes every candidate and fails only on
Q2's options (per-source counts until #598), so #603 is not a blocker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W7qG9aFyPij5uWsyAJCxDW
The frontends' Run field, id and locals become stage0_query_language_frontends,
and test names carry stage0..stage3 with the stage name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W7qG9aFyPij5uWsyAJCxDW
zzylol and others added 7 commits October 13, 2026 16:04
With a materialized node the helper accepted any multiplier >= 1. It now
computes each node's computations as plan selection does (walks from
query roots and materialized nodes' inputs, stopping at materialized
nodes), checked on a hand-built candidate with a materialized node.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W7qG9aFyPij5uWsyAJCxDW
physical_with and the invalid-candidate check no longer assume one
candidate per Q2 option, so #588's shared-input variants need no change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W7qG9aFyPij5uWsyAJCxDW
…output

Read from uncapped runs: Example 2's sketch plans are rejected for having
no (ε, δ) guarantee, 3a selects P122 (first of 108 tied cheapest plans,
nothing shared yet) and 3b selects query-time KLL; panes and the latency
check come with the window-summary PRs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W7qG9aFyPij5uWsyAJCxDW
…per names

The 3-logical and 3-physical counts now hold when #588 adds shared-input
variants.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W7qG9aFyPij5uWsyAJCxDW
@zzylol
zzylol marked this pull request as ready for review October 13, 2026 16:17
cargo test runs the tests as threads of one process, so two runs of the same
example shared a file name and one deleted the other's output.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W7qG9aFyPij5uWsyAJCxDW
@zzylol
zzylol merged commit fa65f46 into main Oct 13, 2026
3 checks passed
zzylol added a commit that referenced this pull request Oct 13, 2026
…e MajorPass (#674)

* feat(planner): run the planning stages as the planner pipeline; retire MajorPass

plan_stages runs logical ASAP-aware optimization (Pass 1 and composition
of every combination, capped), physical ASAP-aware optimization and plan
selection over the frontends' roots, and returns every stage's output.
StagePipeline runs it behind OptimizationPass and is the facade default;
the stage_pipeline devtool uses it (its fixture is unchanged). The
combination count saturates instead of overflowing.

summary_sharing: sharing tests are ignored until Pass 2 (#580); the
UnivMon legacy-search test is deleted; scalar and combined-quantile tests
run on plan_stages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W7qG9aFyPij5uWsyAJCxDW

* test(planner): logical and physical ASAP-aware optimization import no cost model

From #582: only plan selection prices plans, so the Pass 1 / composition
and physical ASAP-aware optimization modules may not import cost_model,
recurrence, analytical_cost, physical_operator_statistics or
plan_selection (paths or re-exported names) outside tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W7qG9aFyPij5uWsyAJCxDW

* fix(planner): compose a per-series avg over rows that carry the series identity

The per-series sum keeps the input's labels, so with
$promql_series_identity after the sample value its last column is the
identity, and composition rejected the only exact option ("non-Float64
per-series avg"). The planner pipeline then had no candidate for
avg_over_time. Read the summed value by its role instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W7qG9aFyPij5uWsyAJCxDW

* test(executor): take plans and candidates from the planner pipeline

From #629/#633: executor tests take the plan plan_stages selects
(selected_dag) or its composed logical candidates (logical_candidates)
instead of the legacy search and global selection.

- deployment_computation, precompute_candidates, the candidates.rs
  fixture: ported.
- planspace_series_identity_heap: keeps the selection check; the four
  tests of the legacy whole-root proposals are deleted.
- weighted_topk_binding: ported to Pass 1 heap candidates (Count Sketch
  only over rates: no sign proof). The tests of legacy-only candidate
  generation are deleted. Ignored, with reasons: the grouped weighted
  binding (whole-expression heap, #589) and the two rate-heap executions
  (top-k output schema, #672).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W7qG9aFyPij5uWsyAJCxDW

* test(frontend-promql): take plans and candidates from the planner pipeline

From #629/#633, on support helpers over plan_stages (plan_stages,
selected_dag, logical_candidates, logical_plan):

- count_planning: exact counts select a Count accumulator; count
  updates are read from the composed Count-Min / Count Sketch
  candidates. The Hydra test is ported and ignored: Pass 1 offers no
  Hydra for a grouped count yet (#605).
- univmon_candidates: the synthetic accuracy model is gone; UnivMon
  candidates come from Pass 1 (the shared count at an approximate
  target), the uncalibrated ones carry no guarantee and plan selection
  does not select them.
- promql_corpus, metrics_observability: totality over Pass 1 and
  composition (logical_plan) instead of the legacy strategies; the
  metrics corpus reports composition errors under
  METRICS_OBSERVABILITY_REPORT.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W7qG9aFyPij5uWsyAJCxDW

* test(frontend-sql): take corr's exact plan from the planner pipeline

From #633: the plan plan_stages selects replaces retain_exact.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W7qG9aFyPij5uWsyAJCxDW

* test(planner): the batch SUM example reads one exact accumulator per query

Under the planner pipeline each query's SUM is replaced by its exact
accumulator state; sharing identical producers is Pass 2 (#580).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W7qG9aFyPij5uWsyAJCxDW

* refactor(planner): stage identifiers carry number and name; enumerate every candidate

User decisions (2026-10-13):
- stage modules stage2_physical_asap_optimization and
  stage3_plan_selection; tests stage1_logical_asap_optimization.rs and
  stage2_physical_asap_optimization_sql.rs; stage_pipeline keys
  stage0_query_language_frontends, stage1_logical_asap_optimization,
  stage2_physical_asap_optimization, stage3_plan_selection (fixture
  regenerated: only the keys change);
- enumeration and selection are never capped: plan_stages enumerates
  every combination; the devtool's --max-displayed (was
  --max-candidates) caps only the listing;
- code docs say "query-language frontends".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W7qG9aFyPij5uWsyAJCxDW

* test(integration): take plans and candidates from the planner pipeline

From #629/#633, on asap_integration_tests::planning (plan_stages,
selected_dag, logical_candidates):

- sql_to_physical, operator_sharing, materialization_e2e,
  precompute_raw_samples, summary_coverage_e2e,
  promql_numeric_regressions: ported.
- cse.rs: deleted; it pinned the legacy search's memo groups (sharing
  identical sub-DAGs is Pass 2, #580).
- Ignored, with reasons: the UNION ALL summary test (plan selection picks
  the exact plan until materialization, #604), arithmetic over one
  selector (#580), the unit-weight heap over raw samples (#589).
- precompute_raw_samples no longer requires a Count Sketch heap over raw
  samples (#589); materialization_e2e takes the quantile's sketch
  candidate, since plan selection picks the exact plan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W7qG9aFyPij5uWsyAJCxDW

* refactor(devtools): sketch_coverage reports Pass 1's summary candidates

From #633: per lowered query, the summary candidates Pass 1 offers,
instead of the legacy explain_replacements. The CSE-shareable metric is
dropped (sharing is Pass 2). Over every corpus at epsilon 0.01 and a 1 s
ingestion interval: 145/2183 lowered queries get a summary candidate, and
Pass 1 rejects none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W7qG9aFyPij5uWsyAJCxDW

* test(frontend-promql): the Kubernetes mixin aggregates over topk compose (ignored, #672)

Both corpus queries that do not compose aggregate over a topk output,
which the frontend declares as [keys.., topk_k] with a Utf8 placeholder
and no value column; the outer sum's accumulator has no value to read.
They compose once the top-k output carries the ranked value (#672).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W7qG9aFyPij5uWsyAJCxDW

* refactor(devtools): run_planning_stages runs the library's plan_stages

One pipeline implementation: the devtool's run_planning_stages (#577)
validates the frontends' roots and every composed candidate, and
otherwise is plan_stages with the built-in models. Its candidate types
are the library's. The Example 1 fixture is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W7qG9aFyPij5uWsyAJCxDW

---------

Co-authored-by: Claude Opus 5.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