Skip to content

feat(planner): retain evidence-dependent candidates without certifying them - #455

Merged
zzylol merged 10 commits into
mainfrom
feat/issue-454-evidence-candidates
Sep 22, 2026
Merged

zzylol merged 10 commits into
mainfrom
feat/issue-454-evidence-candidates

Conversation

@zzylol

@zzylol zzylol commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Why

Planner #454 needs to show constructible alternatives even when external facts are absent, while keeping unknown accuracy, cost, and runtime support distinct from a proven deployment choice.

Before this PR: a grouped Count with no Hydra shared-grid evidence, or a Count-ranked TopK without interval evidence, lost candidates during construction or root-target filtering. A mixed exact/summary operation could also be selected from a permissive default capability flag. A legacy NaN estimate could appear as an available candidate cost.

After this PR: those logical candidates remain in PlanSpace with symbolic unknown guarantees; direct DDSketch ratios remain visible under the existing #449 behavior. Known-invalid evidence is rejected (including a typed Hydra rejection). Unknown mixed-execution support remains visible but is not automatically selected. Non-finite/negative default costs are unavailable, with a separate explicit legacy qualitative-ranking policy. Backend still owns physical binding and final deployment acceptance.

Changes

  • Carry unknown Hydra, TopK, HLL, and relative-composition guarantees through target-aware search; reject already-impossible targets using only an optimistic floor, never as certification.
  • Expose candidate-level accuracy and runtime-support status; gate automatic composition selection and preserve exact materialization fallback.
  • Audit cost availability, document all Planner-side evidence gates and the backend boundary, and cover no/partial/invalid evidence plus export and end-to-end selection.
  • Track backend integration in Integrate Planner evidence-dependent candidates into backend selection ASAPQuery-backend#752.

Verification

  • cargo test --workspace --quiet
  • Focused asap-aware-mapping and exact_composition tests after the final edits
  • cargo fmt --all and git diff --check

Addresses #454.

@zzylol zzylol changed the title Retain evidence-dependent Planner candidates without certifying them feat(planner): retain evidence-dependent candidates without certifying them Sep 21, 2026

@milindsrivastava1997 milindsrivastava1997 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to have some before vs after e2e examples to show the difference?

Comment thread docs/design_docs/architecture/evidence-dependent-candidates.md Outdated
Comment thread docs/design_docs/architecture/evidence-dependent-candidates.md Outdated
Comment thread docs/design_docs/architecture/evidence-dependent-candidates.md Outdated
Comment thread docs/design_docs/architecture/evidence-dependent-candidates.md Outdated
@zzylol

zzylol commented Sep 21, 2026

Copy link
Copy Markdown
Contributor Author

Added a before/after table and reproducible PromQL-to-Planner checks in docs/design_docs/architecture/evidence-dependent-candidates.md (commit 025c88b). The two new differences are: count by(job)(up) now retains two uncertified Hydra alternatives with no shared-grid evidence, and entropy_over_time(m[5m]) now retains its uncalibrated readout (guarantee: None). Neither becomes an automatic selected plan. I also included the quantile ratio as a control: its evidence-free candidate already existed after #449, so this PR does not claim that change. The tests start from PromQL text and verify the candidate/selection states; they do not execute a deployed backend query.

@zzylol
zzylol merged commit 2ec3fc8 into main Sep 22, 2026
3 checks passed
Selvomega added a commit that referenced this pull request Sep 26, 2026
Brings per-measure FILTER predicates (#466) plus the five main commits it
is based on (#445, #455, #426, #460, #461). Conflicts resolved toward
main: `ValueOperationAtIngestionTime`, `query_time_nested_sum`, and the
unconditional `finalize_exact_accumulator` from #461 replace dev/dqc's
older #379 shape; the #455 wording in the architecture docs stands; the
moved `accuracy.rs` is dropped in favor of `accuracy/mod.rs`.

Co-Authored-By: Claude Fable 5.1 <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.

2 participants