Remove test-only query planning and unused backend APIs and dependencies - #717
Merged
Merged
Conversation
This was referenced Sep 13, 2026
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
Tests should exercise the installed QueryPlan path used in production. Unused APIs, compatibility wrappers, and dependencies obscure that boundary and add build work.
Addresses the test-only planning, unused public items, types_v2, and dependency cleanup portions of #703.
What
How
Fixtures choose materializations and readouts explicitly, install a validated physical plan, and execute through the production engine. Tests supply complete panes for successful reads and verify that missing plans, unknown queries, missing samples, and partial coverage fail closed. The observed-family planning bridge and its cost-model adapter are removed.
Before this PR
A test with an HLL sketch but no installed plan could answer
count(unique_users_per_min), while production rejected the same request. Range tests could accept incomplete warm coverage. Both reqwest versions and bundled SQLite appeared in the dependency graph.After this PR
The unplanned query is rejected in both builds. An explicitly installed binding serves the stored HLL estimate through the production path; incomplete range coverage returns a capability miss for archive routing. The lockfile contains one reqwest version and no SQLite package.
Evidence
The new no-plan regression failed against the original implementation and passes after the change. Installed-plan tests retain HLL union, KLL full/delta, CMS, exact aggregation, and bound-policy isolation coverage. The lockfile loses 53 packages without adding or upgrading packages. Screenshots and runtime performance measurements are not applicable.
Verification
Using Rust 1.98.0:
e2e_controller_plans_and_backend_serves— 12 passed.cargo check --workspace --all-targets --locked --offline, formatting, andgit diff --checkpassed.New tests verify that stored sketches alone cannot authorize a query, installed plans reject unknown identities and missing samples, and partial warm coverage is rejected with or without an attached archive client.
Architectural decisions
Planning stays in the control plane; serving consumes installed bindings. Test setup does not infer families or parameters from query text. Production-used
compile_bound_*_mapped,discard_staged,retire_drained, andmaterialization_statusesremain available to their callers.Limitations and follow-up
This addresses part of #703, not the entire issue. uuid and zstd remain as transitive dependencies. No production deployment behavior or accuracy formulas are changed; existing test expectations that depended on test-only replanning are replaced by installed-plan coverage.
Human review — do not complete with an agent