Skip to content

chore(plan-selection): delete the legacy candidate_selection - #630

Draft
zzylol wants to merge 1 commit into
stack/cleanup-5-port-selection-testsfrom
stack/cleanup-6-delete-candidate-selection
Draft

zzylol wants to merge 1 commit into
stack/cleanup-5-port-selection-testsfrom
stack/cleanup-6-delete-candidate-selection

Conversation

@zzylol

@zzylol zzylol commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Stack: #574 → #620 → #618 → #621 → #627 → #625 → #628 → #632 → #634 → #616 → #617 → #622 → #624 → #629 → #630 → #631 → #633 → #635 → #636 → #637

Problem

After the ports in #629, nothing in the stage pipeline, facade or devtools uses the legacy selection (asap_plan_selection::candidate_selection: global_selection, cost_sorted, recurrence_profiles). Only tests of that selection itself still did (Q52).

Changes

  • Delete crates/plan-selection/src/candidate_selection.rs and its lib.rs module, doc entry and re-exports (CompositionDecision, CostedGlobalSelection, RankedTargetSubDAGCandidates, RecurrenceProfileMap).
  • Delete the legacy-only test files integration-tests/tests/exact_composition.rs, promql_to_post_asap.rs and sql_to_post_asap.rs. All three drive ASAPStrategies / search_workload and global_selection throughout.
  • cost/recurrence.rs: delete the tests built on recurrence_profiles / global_selection_with_recurrence (the "multiple roots sharing a sub-DAG" block).
  • Remove what only those used:
    • cost_model::validated_candidate_ranking and its three tests
    • the unused fixture builders in plan-selection's test_support.rs
    • maintained / timed / maintained_post_asap_dag in asap_integration_tests::post_asap (post_asap_dag stays)
  • Intra-doc links to crate::candidate_selection::* become plain text. The surrounding legacy prose is left for the docs step.

Behaviours that only these tests covered are listed in #623: accuracy propagation and exact composition (max/avg over quantile, DDSketch ratio), CSE share-vs-recompute by recurrence and consumer count, rollup vs CSE, evidence-ranked physical cost, "missing accuracy evidence is never selected", and reconciled tighter-target propagation.

Stacked on #629.

Test plan

  • cargo fmt --all --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace: 1519 passed, 0 failed, 14 ignored (after the rebase on main d4869a7; was 1516 passed, 14 ignored)

🤖 Generated with Claude Code

Nothing in the stage pipeline used global_selection, cost_sorted or
recurrence_profiles once the tests that only needed a selected DAG
moved to plan_stages. The legacy-only test files and the recurrence
tests built on it go with it; the behaviours only they covered are
listed in #623.

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