You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(promql): cover nested temporal anchors and topk ordering #771
Extend PromQL differential coverage for two semantics that the current 90-query nested-aggregation suite intentionally normalizes away or does not exercise.
Scope
Add an opt-in order-sensitive comparison mode for instant-vector responses in promql-compliance/runner.
Keep the default comparison order-insensitive for general vectors and matrices.
Use the mode for an instant topk case so ASAPQuery is compared against Prometheus in returned descending-value order.
Assert full-label-set ordering for equal values.
Do not require one global ordering for /query_range matrices.
Add nested aggregation cases with temporal inner anchors, each exercised through both /query and /query_range:
e.g. topk(3, sum by (job) (rate(data[5m])))
at least one reducer after a temporal anchor, such as avg(sum by (job) (rate(data[5m]))).
Rationale
The existing 90-query suite uses bare data selectors and normalizes result samples by labels before comparison. It verifies result membership and values, but cannot detect TopK presentation-order regressions and does not cover a range selector consumed by a temporal function before the nested aggregation pipeline.
Acceptance criteria
A direct Prometheus-vs-ASAPQuery instant TopK order check passes.
The existing default differential comparisons remain order-insensitive.
Nested temporal-anchor queries pass against Prometheus for both instant and range endpoints.
The suite continues to verify range-at-t / instant-at-t parity.
Activity