Repository navigation
Conversation
Each plan root is compiled once with two kinds of inputs: stored outputs, bound at evaluation time T to their definition's pane ending at T - offset, and query-time raw ranges (TimeRange <- TimeShift* <- Scan), bound to the metric's samples in (T - offset - range, T - offset] fetched from Prometheus and filtered by the plan's Scan. An instant query whose text is a planned query is answered with a Prometheus vector and x-asap-execution: plan. Unplanned queries are forwarded; planned ones that cannot be answered (pane missing or off the pane grid, fetch or execution failure) are forwarded with x-asap-forward-reason. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 7, 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.
Stack 4/5. Base: #820. Next: #822.
Before this PR
Every query was forwarded to Prometheus.
After this PR
A planned instant query is answered by running its root of the DAG at time
T:T − offset.TimeRange ← TimeShift* ← Scan): the data plane fetches(T − offset − range, T − offset]from Prometheus and filters it with the plan'sScan.x-asap-execution: plan. Any other query, including range queries, is forwarded withx-asap-execution: forwarded. A planned query that can't be answered gives its reason inx-asap-forward-reason: a missing pane,Toff the pane grid, or an unsupported shape.Limitations
Ton the pane grid.Testing
data_plane/tests/query.rs(3 tests).data_plane/tests/answers.rs(2 tests) over HTTP against a stand-in Prometheus: Example 1 from raw samples, including the left-open range start, and Example 4b from panes built through Remote Write.🤖 Generated with Claude Code