Skip to content

fix(query): honor exact accuracy requests - #507

Merged
zzylol merged 1 commit into
mainfrom
fix/348-query-accuracy
Sep 7, 2026
Merged

zzylol merged 1 commit into
mainfrom
fix/348-query-accuracy

Conversation

@zzylol

@zzylol zzylol commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Closes #348.

Adds a validated X-ASAP-Accuracy: exact|approximate request contract to instant and range PromQL endpoints. Exact requests now enter the central router even when the configured metric axis is SketchStore, so they bypass approximate warm summaries and select the Gorilla archive. Approximate remains backward-compatible and warm-first.

Also adds an instant routed-result API so response provenance reports the engine that actually answered rather than the configured storage axis.

Tests:

  • cargo test -p data_plane accuracy_header_parses_explicit_contract_and_rejects_typos
  • cargo test -p data_plane exact_accuracy_header_bypasses_warm_tier_for_archive
  • cargo test -p data_plane exact_accuracy_header_routes_range_query_to_archive
  • cargo test -p data_plane invalid_accuracy_header_returns_bad_request
  • cargo fmt --check

This PR is intentionally left open and unmerged.

@zzylol zzylol added area: data plane Runtime ingestion, storage, and query-serving data paths area: query engine PromQL lowering, execution, result shaping, and fallback behavior feature: PromQL PromQL compatibility and execution semantics feature: warm summaries ASAP warm-tier materialization, readiness, and serving quality: accuracy Exact and approximate accuracy contracts, error bounds, and routing labels Sep 4, 2026
@zzylol
zzylol merged commit 95131d8 into main Sep 7, 2026
1 check passed
@zzylol
zzylol deleted the fix/348-query-accuracy branch September 7, 2026 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: data plane Runtime ingestion, storage, and query-serving data paths area: query engine PromQL lowering, execution, result shaping, and fallback behavior feature: PromQL PromQL compatibility and execution semantics feature: warm summaries ASAP warm-tier materialization, readiness, and serving quality: accuracy Exact and approximate accuracy contracts, error bounds, and routing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Derive query accuracy (Exact vs Approximate) to activate the Exact→archive routing gate

1 participant