Repository navigation
Conversation
zzylol
force-pushed
the
refactor/1207-crates-per-stage
branch
2 times, most recently
from
November 6, 2026 19:10
ae4843e to
8d020b0
Compare
zzylol
force-pushed
the
refactor/1207-interfaces
branch
from
November 6, 2026 21:28
200ec5c to
341c98b
Compare
zzylol
force-pushed
the
refactor/1207-crates-per-stage
branch
from
November 6, 2026 21:29
8d020b0 to
d1feaad
Compare
zzylol
force-pushed
the
refactor/1207-interfaces
branch
from
November 6, 2026 21:37
341c98b to
3a75e1e
Compare
zzylol
force-pushed
the
refactor/1207-crates-per-stage
branch
3 times, most recently
from
November 6, 2026 22:46
cbd0359 to
4445d45
Compare
5 tasks done
milindsrivastava1997
approved these changes
Nov 7, 2026
zzylol
force-pushed
the
refactor/1207-crates-per-stage
branch
2 times, most recently
from
November 7, 2026 20:51
84cf80d to
69fed95
Compare
zzylol
force-pushed
the
refactor/1207-crates-per-stage
branch
3 times, most recently
from
November 9, 2026 03:33
b768e8d to
0e0f75a
Compare
zzylol
force-pushed
the
refactor/1207-interfaces
branch
from
November 9, 2026 04:25
e9d9f5a to
2ed6ec0
Compare
Move-only. Split asap-logical-asap-optimization into asap-stage0-memo, asap-stage1-pass1-per-computation-candidates and asap-stage1-pass2-reuse-candidates; rename asap-physical-asap-optimization to asap-stage2-physical-optimization and asap-plan-selection to asap-stage3-plan-selection. The old test_support splits by caller. The crate-graph test checks the new crates; no stage crate depends on another.
Pass 1's tests that build Stage 0's memo and Stage 0's tests that lower PromQL through Pass 1 are deleted, with the dev-dependencies and helpers only they used. lower_promql moves to Pass 1's test fixtures, so Pass 1 no longer depends on the PromQL frontend outside its own tests. The crate-graph test now also checks dev-dependencies between stage crates.
…1207 PR 0b) Frontend tests that compose Pass 1 candidates and Pass 1 tests that lower PromQL through the frontend are deleted, with the helpers, dev-dependencies and test targets only they used. MetricsQL's test that compares with PromQL's lowering goes too, so no frontend tests depend on another frontend. The crate-graph test checks dev-dependencies between stage crates with no exceptions.
…R 0b) The PromQL test that planned through asap-planner is deleted with its planner_support helpers; the PromQL and SQL frontends drop their asap-planner dev-dependency, and PromQL its unused asap-accuracy one. The crate-graph test now also forbids a stage crate's dev-dependency on the facade.
zzylol
force-pushed
the
refactor/1207-crates-per-stage
branch
from
November 9, 2026 04:31
0e0f75a to
058ea42
Compare
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.
Why
#1054's crate rules say:
asap-types;asap-types,asap-accuracyorasap-cost;Before this PR, Stage 0's hash-consing and both passes of Stage 1 were one crate,
asap-logical-asap-optimization, so nothing stopped Pass 2 from calling into Pass 1 (only a source-scanning test,pass_layering.rs). #1207 (Order, decided 2026-11-06) makes each stage and pass its own crate before any stage logic is filled in, so PRs 1–8 land in their final crates.What
Crates
Folder names are the crate names without the
asap-prefix, like the existing crates (asap-typesincrates/types).asap-stage0-memo(crates/stage0-memo)Memo(memo_of_queries, whose body PR 2 fills in; PR 0 deleted the oldcse.rs), fromasap-logical-asap-optimizationasap-stage1-pass1-per-computation-candidates(crates/stage1-pass1-per-computation-candidates)pass1_memo), fromasap-logical-asap-optimization/src/pass1/asap-stage1-pass2-reuse-candidates(crates/stage1-pass2-reuse-candidates)generate_logical_asap_memo_candidates), fromasap-logical-asap-optimization/src/pass2/asap-stage2-physical-optimization(crates/stage2-physical-optimization)asap-physical-asap-optimization; content unchangedasap-stage3-plan-selection(crates/stage3-plan-selection)asap-plan-selection; content unchangedasap-logical-asap-optimizationis deleted.File → crate map
Every file of the deleted crate, and every file of the renamed crates:
logical-asap-optimization/Cargo.tomlstage0-memo/Cargo.toml,stage1-pass1-per-computation-candidates/Cargo.toml,stage1-pass2-reuse-candidates/Cargo.toml(each lists only its own dependencies;asap_sketchlib,serdeandrmp-serdeof the old crate were unused)logical-asap-optimization/src/lib.rslogical-asap-optimization/src/stage0.rsstage0-memo/src/lib.rslogical-asap-optimization/src/stage0/cse.rsMemo::find_or_add_group, PR 2)logical-asap-optimization/src/pass1.rsstage1-pass1-per-computation-candidates/src/lib.rslogical-asap-optimization/src/pass1/logical_memo_candidates.rsstage1-pass1-per-computation-candidates/src/logical_memo_candidates.rslogical-asap-optimization/src/pass1/per_computation_candidates.rsstage1-pass1-per-computation-candidates/src/per_computation_candidates.rslogical-asap-optimization/src/pass1/per_computation_candidates_tests.rsstage1-pass1-per-computation-candidates/src/per_computation_candidates_tests.rslogical-asap-optimization/src/pass1/realization.rsstage1-pass1-per-computation-candidates/src/realization.rs(only Pass 1 calls it)logical-asap-optimization/src/test_support.rslogical-asap-optimization/src/pass2.rsstage1-pass2-reuse-candidates/src/lib.rslogical-asap-optimization/src/pass2/logical_memo_candidates.rsstage1-pass2-reuse-candidates/src/logical_memo_candidates.rslogical-asap-optimization/src/pass2/memo.rsstage1-pass2-reuse-candidates/src/memo.rslogical-asap-optimization/src/pass2/memo/rules.rsstage1-pass2-reuse-candidates/src/memo/rules.rslogical-asap-optimization/src/pass2/memo/rules/{finer_aggregate,rollup,scan_labels,summary_inputs,topk}.rsstage1-pass2-reuse-candidates/src/memo/rules/{finer_aggregate,rollup,scan_labels,summary_inputs,topk}.rslogical-asap-optimization/src/pass2/memo/window_candidates.rsstage1-pass2-reuse-candidates/src/memo/window_candidates.rslogical-asap-optimization/src/deployment_capabilities.rstypes/src/deployment_capabilities.rson PR 0 (PR 0 moved it on 2026-11-07, same content); this PR takes PR 0's filelogical-asap-optimization/tests/pass_layering.rspass1/andpass2/do not import each other; the crates now cannot, andcrate_graph.rschecks itphysical-asap-optimization/**(Cargo.toml,src/lib.rs,src/catalog/mod.rs)stage2-physical-optimization/**, same paths (src/catalog/realize.rsis deleted in PR 0)plan-selection/**(Cargo.toml,src/{lib,report,select}.rs,src/milp/{mod,model}.rs,tests/cost_inputs_json.rs)stage3-plan-selection/**, same paths (src/models.rsis deleted in PR 0)test_support.rs(the old crate's test helpers) is split by who calls each item:generate_per_computation_candidates(re-export)asap_stage1_pass1_per_computation_candidates::test_support(featuretest-support)lower_promqlshare_common_sub_dags(re-export)cse.rs;asap-stage0-memohas notest-supportfeaturepopulation_over_selectorasap_types::test_support(an IR fixture; no stage involved)metric_scan,metric_scan_with_keys,scan,scan_fromstage1-pass1-per-computation-candidates/src/test_fixtures.rs(#[cfg(test)], not exported)cms_summary,weighted,estimate_overPerComputationCandidates(re-export)hll_classic_failure_statistic,aggregate,agg,without_agg,filter,dedup,time_range,entry,entry_withCrate graph
Before (
[dependencies]edges between workspace crates; frontend helpers, devtools and integration-tests omitted):After:
No stage crate depends on another, in
[dependencies]or in[dev-dependencies], and no stage crate's tests depend on the facade (asap-planner): no test of a stage crate calls another stage crate, directly or through the facade. The stage crates here are Stage 0, Pass 1, Pass 2, Stage 2, Stage 3 and the three query-language frontends (crate_graph.rsgives the frontends theStagerole). The old optional edge Pass 1 →asap-frontend-promqlis gone withlower_promql.crate_graph.rsnow also checks[dev-dependencies], with no exceptions. The rule added: a[dev-dependencies]edge from aStagecrate (the five planning-stage crates and the three frontends) to anotherStagecrate or to theFacade(asap-planner) is forbidden ("a stage crate's tests never call another stage crate, directly or through the facade"). Dev-dependencies on the shared crates (asap-types,asap-accuracy,asap-cost) and the frontend helpers stay allowed; a new forbidden edge fails the test.MetricsQL → PromQL (test-only). Deleted, not kept: keeping it would have needed an exception or a new role for the frontends in
crate_graph.rs. Its only users wereexternal_corpus.rs(via PromQL'stests/support.rs, deleted for calling Pass 1) andlowering_semantics.rs'svector_negation_lowers_as_in_promql(deleted, see "Deleted tests").Other changes
asap-plannerdepends on the five stage crates and calls them in order (run.rs:memo_of_queries→pass1_memo→generate_logical_asap_memo_candidates→ Stage 2 →select_plan), as before; only the paths changed.asap_planner::{DeploymentCapabilities, SupportedSummary}re-export fromasap_types::deployment_capabilities.integration-tests/tests/crate_graph.rs). The three new crates get theStagerole; the two renamed crates keep it under their new names. The optional-edge exception (logical →asap-frontend-promqlundertest-support) is deleted with itsonly_if_optionalfield, since no optional edge is left. Dev-dependencies from a stage crate to another stage crate or to the facade are now checked, with no exceptions. Synthetic tests:optional_only_exception_rejects_the_edge_made_non_optionaldeleted,checker_ignores_dev_dependencies_and_external_crates→checker_ignores_external_crates_and_non_stage_dev_dependencies,checker_rejects_a_dev_dependency_between_stage_cratesandchecker_rejects_a_frontend_dev_dependency_on_the_facadeadded.asap-accuracy: PR 0 gave its entry the deployment's&AccuracyEvidence. Dead dev-dependencies removed:asap-coston the logical and physical crates (no test ofasap-costuses them since PR 0 deletedtests/held_memory.rs),asap-planneron the logical crate withtest-support(unused); after the test deletions: Pass 1 onasap-stage0-memoand onasap-frontend-promql; Stage 0 on Pass 1;asap-frontend-promqlandasap-frontend-sqlonasap-stage0-memoand Pass 1;asap-frontend-metricsqlonasap-stage0-memo, Pass 1 andasap-frontend-promql. Group 3:asap-frontend-promqlandasap-frontend-sqlonasap-planner(SQL's had no user), andasap-frontend-promqlonasap-accuracy(no user, already on PR 0). Themetrics_observabilitytest target is removed fromfrontend-promql/Cargo.toml(its file is deleted), anddocs/develop_docs/metrics-observability-corpora.mdsays so (its fixtures stay).docs/develop_docs/(architecture, contracts, extension guide, library API),docs/design_docs/architecture/, and the design proposals and decisions that name a file. Historical records are left as written (joint-candidate-workload-results.json,joint-candidate-workload-evaluation.md). The stage-document JSON keys (stage1_logical_asap_optimization,stage2_physical_asap_optimization,stage3_plan_selection) are a document format, not crate names, and are unchanged.Not changed
pub(crate) mod→mod).How
git mvfor every file, so history follows (git log --follow). Inside the moved files only paths change:crate::pass1::X→crate::X,crate::pass2::memo→crate::memo,crate::stage0::memo_of_queries→asap_stage0_memo::memo_of_queries(Pass 1 tests only). Theasap_types::deployment_capabilitiespaths come from PR 0.Key code interfaces added / modified
Only crate paths change. Each crate's public surface, at [b768e8d]:
stage0-memo/src/lib.rsstage1-pass1-per-computation-candidates/src/lib.rsstage1-pass2-reuse-candidates/src/lib.rstypes/src/test_support.rsasap-stage2-physical-optimizationandasap-stage3-plan-selection: same items asasap-physical-asap-optimizationandasap-plan-selection.Usage. The facade's flow is unchanged; only the paths it calls changed (
crates/planner/src/run.rs):Planning still reaches PR 0's first
todo!()(Stage 0'smemo_of_queries, filled in by PR 2), as on PR 0.Major algorithm changes
None.
New abstractions (pending approval)
None. One module was added:
stage1-pass1-per-computation-candidates/src/test_fixtures.rs(#[cfg(test)]), holding the oldtest_supportfixtures that only Pass 1's own tests call, so the crate does not export them.Design notes for review
realization.rs(summary families per intent, summary inputs) was documented as shared by Pass 1 and Pass 2, but only Pass 1 calls it now; it stays in Pass 1. If Pass 2's rules (PR 4) need it, that is a crate-boundary question: it would move toasap-types(IR helpers) rather than Pass 2 depending on Pass 1.Before this PR
Stage 0 and both Stage 1 passes were modules of
asap-logical-asap-optimization; a source-scanning test kept the passes from importing each other. Stage 2 and Stage 3 wereasap-physical-asap-optimizationandasap-plan-selection.DeploymentCapabilitiesis already inasap-types(PR 0).After this PR
One crate per stage and pass; the crate-graph test forbids any edge between them, including test-only edges. PRs 1–8 change code in its final crate.
Deleted tests
2026-11-09: PR 0 now deletes Pass 1's whole-workload composition and the 74 tests that compose through it (P11), so 36 of the tests listed below are deleted there, not here:
a_quantile_estimate_shares_its_raw_data_samples_sign_only_inside_the_unit_interval,a_quantile_of_merged_tumbling_windows_shares_its_raw_data_samples_sign,aggregate_over_topk_candidates_compose,aggregate_replacement_preserves_sql_field_identity,avg_states_out_of_order_are_refused,benchmark_corpora_are_total_and_keep_their_coverage,binding_is_total_over_the_entire_corpus,cms_count_updates_total_ten_for_zero_positive_and_negative_samples,composed_avg_divides_sum_and_count_states,composed_candidate_replaces_chosen_target_with_summary_evaluation,composed_filters_and_having,composed_guarantees,composed_mixed_exact_and_sketch_measures_keep_output_names,composed_multi_measure_aggregate_joins_its_measures,corpus_lowers_and_binds,count_ranked_topk_fuses_to_one_global_heap_sketch,frequency_count_candidates_use_unit_weights,grouped_avg_composition_preserves_the_whole_schema,grouped_count_offers_hydra_but_selection_keeps_per_group_state,heap_weights_over_raw_data_samples_record_an_open_requirement,kubernetes_mixin_aggregates_over_topk_compose,multidimensional_ranked_item_is_a_structured_tuple,nested_sum_merges_into_one_exact_accumulator,normalized_additive_errors_compose_as_absolute_errors,own_having_subquery_is_substituted,per_series_avg_with_series_identity_composes_from_sum_and_count,per_series_rate_keeps_labels_and_retypes_its_state,subpopulation_columns_are_not_part_of_the_ranked_item_tuple,temporal_average_divides_with_a_finite_division_guard,temporal_per_entity_topk_uses_series_identity_and_sample_value,topk_keeps_known_labels_beside_series_identity,uncalibrated_frequency_evaluations_do_not_bypass_accuracy_targets,values_estimating_raw_data_samples_name_their_sign_by_the_metric,whole_expression_topk_over_a_grouped_sum_of_range_sums_reads_the_raw_data_samples,whole_expression_topk_partitions_index_the_heap_input,whole_expression_topk_replaces_the_heap_over_the_exact_sum. The tables keep the original lists for the record.Decided 2026-11-06: tests that cross stage crates are deleted, not rewritten; PR 3 re-creates Pass 1 coverage against the new interfaces. 82 tests are deleted (63 passed, 18 failed and 1 ignored on PR 0), plus
pass_layering.rs's 2. Three groups follow: (1) Stage 0 ↔ Pass 1 (54 tests), (2) frontends → Stage 0 / Pass 1, Pass 1 → PromQL frontend, and MetricsQL → PromQL (27 tests), (3) frontends → the facade (1 test).(1) Stage 0 ↔ Pass 1
Pass 1's
generate_per_computation_candidatestakes Stage 0'sMemo, so every Pass 1 test that built its input withmemo_of_queries(directly or through a helper) goes. Their helpers with no caller left are deleted too (listed after the table).stage0-memo/src/lib.rs(wasstage0.rs),mod testsrepeated_results_share_groups_but_quantile_levels_do_not,equal_keyless_deterministic_results_share_one_group,scalar_and_literal_roots_keep_workload_positions(3)memo_of_queriesover PromQL lowered through Pass 1'slower_promql: equal results share a group, different quantile levels do not;G2 / G2is one group read twice; scalar and literal roots keep their query positions.cse.rsand its 24 hash-consing tests were deleted in PR 0.stage1-pass1-per-computation-candidates/src/per_computation_candidates_tests.rsscalar_root_producers_are_discovered_once,example_1_exact_q1_keeps_exact_accumulators_only,asap_input_and_invalid_accuracy_are_rejected,multi_measure_aggregate_has_one_target_per_measure,aggregate_without_realization_is_not_a_target,filtered_measure_keeps_candidates_and_records_its_filter(target discovery and input checks, 6);key_only_having_is_pushed_below_and_keeps_candidates,value_having_stays_above_output_and_keeps_candidates,having_on_one_consumer_of_a_shared_aggregate_stays_above,a_scalar_reference_consumer_keeps_a_key_only_having_above,only_the_adjacent_of_stacked_filters_is_having,global_aggregate_having_stays_above,scalar_reference_filter_is_not_having,promql_scalar_operand_is_not_having,having_shared_with_a_project_consumer_stays_above,without_and_per_entity_having_stays_above,memo_cached_rules_preserve_occurrence_specific_having(HAVING placement, 11);composed_candidate_replaces_chosen_target_with_summary_evaluation,composed_filters_and_having,composed_avg_divides_sum_and_count_states,composed_multi_measure_aggregate_joins_its_measures,composed_mixed_exact_and_sketch_measures_keep_output_names,composed_guarantees,own_having_subquery_is_substituted,per_series_avg_with_series_identity_composes_from_sum_and_count,per_series_rate_keeps_labels_and_retypes_its_state,grouped_avg_composition_preserves_the_whole_schema(composing a chosen candidate, 10) — 27composed_candidate_replaces_chosen_target_with_summary_evaluation,composed_filters_and_having,composed_guarantees,composed_mixed_exact_and_sketch_measures_keep_output_names,composed_multi_measure_aggregate_joins_its_measures,own_having_subquery_is_substituted)computation_candidates_for_intentstay.stage1-pass1-per-computation-candidates/src/per_computation_candidates.rs,mod testswhole_expression_topk_replaces_the_heap_over_the_exact_sum,whole_expression_topk_partitions_index_the_heap_input,whole_expression_topk_over_a_grouped_sum_of_range_sums_reads_the_raw_data_samples,heap_weights_over_raw_data_samples_record_an_open_requirement,grouped_range_sums_a_raw_data_samples_heap_cannot_rank_get_no_fused_heap,a_fused_computation_absorbs_what_its_absorbed_targets_merges_absorb,combinations_skip_choices_a_whole_expression_candidate_absorbs,count_ranked_topk_fuses_to_one_global_heap_sketch(fused heaps and whole-expression top-k, 8);nested_sum_merges_into_one_exact_accumulator,nested_sum_merge_needs_a_sum_of_sums,nested_sum_merge_never_groups_by_the_dropped_metric_name,nested_sum_merges_do_not_stack(nested-sum merges, 4);avg_states_out_of_order_are_refused,temporal_average_divides_with_a_finite_division_guard(2);multidimensional_ranked_item_is_a_structured_tuple,subpopulation_columns_are_not_part_of_the_ranked_item_tuple,temporal_per_entity_topk_uses_series_identity_and_sample_value,topk_keeps_known_labels_beside_series_identity(ranked items, 4);a_quantile_estimate_shares_its_raw_data_samples_sign_only_inside_the_unit_interval,a_quantile_of_merged_tumbling_windows_shares_its_raw_data_samples_sign,values_estimating_raw_data_samples_name_their_sign_by_the_metric(raw-data-samples signs, 3);guarantee_composition::normalized_additive_errors_compose_as_absolute_errors(1);stream_norms::a_norm_follows_the_update_weight,stream_norms::the_absolute_bound_names_the_weighted_norm(2) — 24normalized_additive_errors_compose_as_absolute_errors, bothstream_normstests)realization.rs's 5.Helpers deleted with them (no caller left): in
per_computation_candidates_tests.rscomposed,scan,aggregate_over,aggregate,always,exact_promql,choices_of,assert_sql_count_choices,quantile,grouped_quantile,grouped_count,having_filter,equals,having_of,above_scalar,columns,without_output_aliases,summary_agg; inper_computation_candidates.rs's testsinventory,inventory_root,inventory_at,open_inventory,heap_weight_domains,composed_with,heap_states,topk_target,enumerated_choices,nested_sum_target,fused_heap,heap_update, and the emptiedmod stream_norms; intest_fixtures.rscms_summary,weighted,estimate_over. Dev-dependencies removed: Pass 1 →asap-stage0-memo, Stage 0 →asap-stage1-pass1-per-computation-candidates.(2) Frontends → Stage 0 / Pass 1, Pass 1 → PromQL frontend, MetricsQL → PromQL
frontend-promql/tests/count_planning.rsgrouped_count_offers_hydra_but_selection_keeps_per_group_state,frequency_count_candidates_use_unit_weights,cms_count_updates_total_ten_for_zero_positive_and_negative_samples,logical_candidates_fails_on_a_candidate_that_does_not_compose,aggregate_over_topk_candidates_compose(5)logical_candidates_fails_on_a_candidate_that_does_not_compose,aggregate_over_topk_candidates_compose), 2 failed (frequency_count_candidates_use_unit_weights,cms_count_updates_total_ten_for_zero_positive_and_negative_samples), 1 ignored (grouped_count_offers_hydra_but_selection_keeps_per_group_state)frontend-promql/tests/univmon_candidates.rs(file deleted)uncalibrated_frequency_evaluations_do_not_bypass_accuracy_targets(1)frontend-promql/tests/observability/promql_corpus.rsbinding_is_total_over_the_entire_corpus(1)logical_plan) never errors over the Prometheus docs and testdata corpora.lowering_is_total_over_the_entire_corpusstays.frontend-promql/tests/observability/metrics_observability.rs(file and test target deleted)benchmark_corpora_are_total_and_keep_their_coverage,kubernetes_mixin_aggregates_over_topk_compose(2)frontend-sql/tests/frequency_l2.rsstage1_offers_exact_and_summary_l2_candidates(1)frontend-metricsql/tests/external_corpus.rs(file deleted)corpus_lowers_and_binds,floor_line(2)floor_linetested only that test's parsing helpers.frontend-metricsql/tests/lowering_semantics.rsvector_negation_lowers_as_in_promql(1)stage1-pass1-per-computation-candidates/src/per_computation_candidates.rs,mod testsaggregate_replacement_preserves_sql_field_identity,raw_data_samples_of_metric_ends_at_any_other_operator,classic_hll_confidence_needs_one_instance_over_a_sources_own_rows;guarantee_composition::{absolute_errors_compose_through_arithmetic, products_and_quotients_of_estimates_have_closed_or_symbolic_bounds, relative_and_rank_errors_compose_only_where_sound, clamp_and_abs_keep_the_largest_argument_error, comparisons_over_estimates_have_no_guarantee, a_scalar_subquery_inherits_its_guarantee, failure_probability_counts_once_per_distinct_estimate, join_beside_an_exact_input_on_exact_columns_keeps_the_guarantee, join_on_an_approximate_key_has_no_guarantee, case_on_exact_columns_keeps_the_branch_guarantee, projection_over_a_join_reads_each_columns_guarantee}(14)classic_hll_confidence_needs_one_instance_over_a_sources_own_rows)mod guarantee_composition(its helperswith_bound,abs,rel,lit,arith,call,of,bound,delta,close,join,column,equals,case_over,project) is deleted.Helpers deleted with them:
lower_promql(Pass 1'stest_fixtures.rs);node,node_over,scalar,approximate_and_exact(Pass 1's tests);logical_candidates,local_computation_candidates,LogicalCandidate,require_composed_operator_candidates,logical_plan(PromQL'stests/support.rs);reads_hydra(count_planning.rs);bind_tally,BindTally(promql_corpus.rs). MetricsQL's tests no longer include PromQL'ssupport.rs.(3) Frontends → the facade (
asap-planner)frontend-promql/tests/count_planning.rsexact_counts_select_count_accumulators(1)todo!())count(up),count by(job)(up)andcount_over_time(up[5m])at an exact target select a count accumulator when planned throughasap_planner::run_planning. The file's 2 fixture tests of lowered count aggregates stay.Helpers deleted with it:
frontend-promql/tests/planner_support.rs(run_all_stages,selected_dag; file deleted). Helpers that had no caller left:physical_asap_dag(its callers were deleted in group 2) anddeclared_data(no caller on PR 0 either) in PromQL'stests/support.rs. No SQL or MetricsQL test usedasap-planner; SQL's dev-dependency on it was unused and is removed.Verification
cargo check --workspace --all-targets,cargo clippy --workspace --all-targets -- -D warningsandcargo fmt --all -- --check: clean.crate_graph.rs: passes with the new crates and edges, including the new dev-dependency checks (6 tests).Resultsignatures, privategroups,MemoGroup { expression, group_properties }, coverage only in the memo,size_for_all_readersdeleted; last,InputOrTemporaryBuild,unlifted_operators: Vec<Operator<Option<MemoGroupId>>>and no node-tree wrapper ofmerged_window_build, which touch onlyasap-typesandasap-accuracyand applied without conflicts): the move commit carries them to the new paths. One commit is added: the planner's tests now takeasap-types'test-supportfeature directly; it came throughasap-logical-asap-optimization'stest-support, which the move deleted, socargo test -p asap-plannerdid not build (the workspace build hid it by feature unification).cargo check,cargo clippy --workspace --all-targets -- -D warningsandcargo fmt --checkare clean, andcrate_graphpasses (6).facaa92f8(chains without a window count,TimeBound, Pass 2 pruned list, Stage 2 entry(logical, data, &DeploymentCapabilities), andDeploymentCapabilitiesmoved intoasap-typesby PR 0 itself with the content this PR had). The move commit takes PR 0'sdeployment_capabilities.rsand PR 0's new call sites (run.rs,planning_stages.rs, Stage 2'scatalog/mod.rs) under the new crate paths, and no longer movesDeploymentCapabilities. Still move-only:git range-diffagainst the previous head shows only that and PR 0's own changes. Previous head kept asbackup/1207-crates-per-stage-4445d45df.cargo clippy --workspace --all-targets --all-features -- -D warningsandcargo fmt --checkare clean;crate_graphpasses (6).0e0f75a7d: only the 36 tests PR 0 now deletes withpass1/composition.rsare gone, 35 failed and 1 passed there; no test changed result),cargo test -p <crate> --all-features --no-fail-fast. Compared by test name with the previous headb768e8dd1(r1108c logs): the only differences are PR 0's own (its 8 deleted tests and the addedtarget_limit_admits_only_floating_point_noise); compared with PR 0 atbe6ea1d6a, only the deleted cross-stage tests and the moved test paths differ, as before. No test changed result.crate_graph: 6 passed. Every failure panics at atodo!(), except the stale fixture (PR 9):Result::unwrap()on anErrvalue: Error("invalid type: sequence, expected string or map", line: 0, column: 0): 1cargo test --workspace --no-fail-faston PR 0 (dab3d064f) and on this PR's first commit (80b5b09b8, the move): every test has the same result, compared by name, exceptpass_layering.rs's 2 deleted tests. On the deletion commits (dfc78f40d, group 1;f6e2daa49, group 2;4d5537310, group 3)cargo testwas re-run for the crates they change (asap-stage0-memo,asap-stage1-pass1-per-computation-candidates,asap-stage1-pass2-reuse-candidates, the three frontends, andcrate_graph.rsinasap-integration-tests); each remaining test has its PR 0 result. Every other crate's code is unchanged, andcargo clippy --workspace --all-targetsbuilds all tests. Per crate:dab3d064f) passed / failed / ignoredasap-typesasap-accuracyasap-costasap-frontend-commonasap-sql-function-catalogmetricsql_commonasap-frontend-promqlasap-frontend-metricsqlasap-frontend-sqlasap-logical-asap-optimizationasap-stage0-memoasap-stage1-pass1-per-computation-candidatesasap-stage1-pass2-reuse-candidatesasap-stage2-physical-optimization(wasasap-physical-asap-optimization)asap-stage3-plan-selection(wasasap-plan-selection)asap-executorasap-plannerasap-devtoolsasap-integration-tests(Measured on PR 0 as it was then,
dab3d064f; the head's numbers are in the table above.)The old crate's 95 / 13 / 0: 24 / 0 / 0 stay in Stage 0 and 12 / 1 / 0 in Pass 1; 1 / 0 / 0 moved to
asap-types(deployment_capabilities.rs'sdefault_supports_everything_and_json_fills_the_rest: 200 → 201); 56 / 12 / 0 deleted as cross-stage tests (groups 1 and 2); 2 / 0 / 0 deleted withpass_layering.rs. The frontends lost 7 / 5 / 1 (group 2) and 0 / 1 / 0 (group 3). Inasap-integration-tests,crate_graph.rshas 6 tests (one deleted, two added). Every other test has the same result as on PR 0. The remaining failures are PR 0'stodo!()panics.Rebased 2026-11-07 (second time) onto PR 0
facaa92f8(IntervalConstraintLimitreplacesTimeBound;ScalarValue::Timestamp). Move-only, unchanged:git range-diffshows every commit identical. Previous head kept asbackup/1207-crates-per-stage-84cf80d6f. Test table re-measured at 69fed95: 1089 / 230 / 9, the 3 more passing tests are PR 0's newsummary_coverageunit tests;crate_graph6/6.Rebased 2026-11-08 onto PR 0
7e83db97d(interval examples left-open, right-closed;ParametersOfAnotherFamilydeleted). Move-only, unchanged:git range-diffshows every commit identical. Previous head kept asbackup/1207-crates-per-stage-69fed95ae. fmt and clippy-D warnings(--all-features) clean;crate_graph6/6.Rebased 2026-11-08 (second time) onto PR 0
7708f3668(the 2026-11-08 interfaces: summary types, required accuracy, the plan is onePhysicalASAPDAG). Still move-only: the conflicts were resolved by taking PR 0's content and applying this PR's path changes. What moved with it:pass1/composition.rs(test support only) →stage1-pass1-per-computation-candidates/src/composition.rs;test_supportre-exportscompose_logical_candidatefrom it.catalog/realize.rsand Stage 3'smodels.rs: taken.memo_of_queries(roots, targets, data),pass1_memo(memo, supported), Pass 2'sevidence: &AccuracyEvidence) under the new crate paths; Pass 2 now depends onasap-accuracy.7708f3668they are 79 cross-stage tests (17 passed, 61 failed, 1 ignored there; PR 0 renamedasap_input_and_invalid_accuracy_are_rejectedtoasap_input_is_rejectedand itself deletedcount_min_estimate_over_raw_data_samples_is_gated_on_the_metric), pluspass_layering.rs's 2. The result columns of the "Deleted tests" tables were measured on PR 0 as of 2026-11-06.git range-diff 7e83db97d..dfd6a5bf0 7708f3668..b768e8dd1: four commits, each changed only by PR 0's own changes and the path renames above; the fifth dropped. Two doc rows (asap-aware-mapping-architecture.md: Pass 2 memo rules and plan enumeration) keep this PR's paths, not PR 0's stale ones. Test status by name, against PR 0 at7708f3668: the only differences are the deleted tests and the moved test paths (pass1::…→ crate root); no test changed result. fmt and clippy-D warnings(--all-features) clean;crate_graph6/6. Previous head kept asbackup/1207-crates-per-stage-dfd6a5bf0.Self-review (2026-11-08). Over-abstraction: none added. Duplication: none;
composition.rsstays test support (PR 3 deletes it). Dead code: none (clippy-D warnings); the dropped planner commit would have duplicated PR 0's dev-dependency.Rebased 2026-11-09 onto PR 0
be6ea1d6a(the 2026-11-09 interfaces: guarantees at a failure probability,AccuracyEvidencetrait,MemoQuery,SupportedSummary::summary_type,satisfiesdeleted,delivers_on(&PhysicalASAPMemoCandidates, context),depends_on_evaluation_time,evaluation_grid_of_group). Still move-only. One conflict: theDeploymentCapabilitiesrow oflibrary-api.md, resolved as this PR's crate path with PR 0'ssummary_type.git range-diff 7708f3668..b768e8dd1 be6ea1d6a..0e0f75a7d: commits 2–4 identical; commit 1 differs only in context lines (PR 0's own changes, e.g.pass.rsimportingNoMeasuredGuarantees) and that doc row. fmt and clippy-D warnings(--all-features) clean;crate_graph6/6. Previous head kept asbackup/1207-crates-per-stage-b768e8dd1.Self-review (2026-11-09). Over-abstraction, duplication, dead code: none added; the rebase only carried PR 0's changes to the new paths.
Rebased 2026-11-09 (second time) onto PR 0
2ed6ec0b8, which deletes Pass 1's whole-workload composition (P11). Still move-only: the move commit no longer movespass1/composition.rs(it is gone),test_supportno longer re-exportscompose_logical_candidate, andtest_fixtures.rsno longer getscms_summary,weighted,estimate_over; the deletion commits keep their other deletions.git range-diff be6ea1d6a..0e0f75a7d 2ed6ec0b8..058ea4234: four commits, changed only there. Previous head kept asbackup/1207-crates-per-stage-0e0f75a7d. fmt and clippy-D warnings(--all-features) clean;crate_graph6/6.Self-review (2026-11-09, second). Nothing added; the composition and its fixtures are gone from both the move and the deletion commits.