Commit 44ef41b
* feat(promql-compliance): add remote-write data seeder (#594)
Adds promql-compliance/seeder, a standalone Go module that builds a
prompb.WriteRequest for a fixed, hand-authored dataset (counters, a
gauge, and a label-churn series designed to exercise instant-vs-range
divergence), snappy-compresses it, and pushes the same bytes via
remote write to both a reference Prometheus and ASAPQuery's own
remote-write ingest endpoint. This is the data-seeding half of the
differential PromQL compliance harness proposed in #594; the
comparison-harness half is a separate workstream.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* test(query-engine): add generic multi-step range/instant equivalence oracle (#590)
Adds the test #590 calls out as missing: for a stable key set, one
range(start,end,step) query's per-timestamp series must exactly equal N
separate instant(t) queries (one per step), not just checked at a single
timestamp. Covers {Tumbling, Sliding} x {single-population Sum,
dual-population Count} x >=4 steps. All four pass against current code.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* feat(promql-compliance): add instant-query diffing to promql-compliance-tester
Vendor prometheus/compliance/promql (commit 67b8327, Apache 2.0) into
promql-compliance/harness/ and patch Comparer.Compare to also run and diff an
instant query (PromAPI.Query) alongside the existing range query, since
upstream only ever exercised QueryRange. Range and instant outcomes are
tracked and reported independently (Result.RangeSuccess/InstantSuccess), so
"PASS: range, FAIL: instant" is a representable outcome instead of one
aggregate pass/fail -- this is the exact bug class cataloged in #589.
Adds config.yaml with placeholder reference/test target URLs and four seed
regression test cases ported from the query patterns described in #589,
#583, and #584 (top-k over range, per-step key snapshot churn, and two
sliding-window rate queries). Adds comparer_test.go with fake in-process
PromAPI doubles covering both diverging directions plus error/should-fail
handling, since no unit tests existed upstream.
Part of #594.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* test(query-engine): add boundary/validation tests for range queries (#590)
validate_range_query_params had no dedicated tests. Adds direct unit tests
for its three error branches (start>=end, step==0, step not a multiple of
the tumbling window) plus the happy path, in an inline test module next to
the function (it's private and validate_range_query_params's error string
is discarded before reaching any public caller, so the exact-string
assertions can't be made from crate::tests).
Also adds end-to-end coverage via handle_range_query_promql confirming each
bad-param case is actually rejected in practice, including the start == end
boundary specifically, and a new test that runs the same keys-but-no-value
orphan-group scenario through both the instant and range entry points and
diffs their skip/error behavior explicitly, so a future regression that
splits their behavior fails here instead of only in one of the two existing
per-path tests.
* test(query-engine): keyed sliding-window property oracle (#590)
Adds simulate_sliding_window_keyed, a pure-function sliding-window
oracle extended to keyed/grouped data (a sibling to the existing
simulate_sliding_window/simulate_sliding_window_with_alignment, kept
separate since those two are exercised by several existing
index-slicing call sites that don't have a notion of a key). Drives it
against a small deterministic sweep of window/slide configs and
per-key presence patterns (appearing, disappearing, oscillating, gap
mid-range) through a real SimpleEngine via
create_engine_multi_timestamp_with_window +
handle_range_query_promql.
The sweep surfaced a real bug: execute_range_query_pipeline computes
each Sliding-window step's window_start as
current_time.saturating_sub(lookback_ms), so every output step before
window_size_ms worth of history exists aliases onto the store's
start=0 window instead of correctly having no sample. Captured as a
minimal, #[ignore]'d regression
(sliding_window_range_query_start_before_window_size_ms_returns_wrong_value)
rather than patched, per #590's ground rules; the main property sweep
starts each scenario at its own window_size_ms to avoid that
known-buggy region while still exercising the key-expansion/merge
behavior it's meant to check.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* docs(promql-compliance): add end-to-end quick start
* test(query-engine): add fixture-driven differential runner
* test(query-engine): stabilize differential smoke run
* test(query-engine): derive compatible differential planner timing
* docs(query-engine): document differential experiment workflow
* test(query-engine): align planner timing with query ranges
* refactor(asap-tools): remove legacy promql harness
* refactor(query-engine): move range tests to follow-up issue
* fix(asap-tools): validate differential range resolution
* fix(asap-tools): reject off-grid instant comparisons
* ci(query-engine): cache differential Docker builds
---------
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 9fb051a commit 44ef41b
32 files changed
Lines changed: 3457 additions & 0 deletions
File tree
- .github/workflows
- promql-compliance
- config
- datasets
- runner
- cmd/differential-runner
- seeder
- cmd/seed
- suites
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
0 commit comments