Repository navigation
test(prom): PromQL parity baseline and ratchet (M3, #922) - #1112
Open
Guess-Who-sec wants to merge 3 commits into
Open
Guess-Who-sec wants to merge 3 commits into
Guess-Who-sec wants to merge 3 commits into
Conversation
Run the PromQL compliance suite with a real Prometheus 3.15.1 as the reference and gigapipe built from this tree as the target. Gigapipe doesn't scrape, so its target scrapes the suite's replayer itself, remote-writes the samples and proxies the queries. `make parity-prom` prints how many queries agree; it is report-only for now. The suite lives in its own module under compatibility/prometheus, so gigapipe's go.mod and binary are unchanged.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
baseline.json records the state of all 660 compliance queries (529 agree, 131 differ) and why each difference exists. `make parity-prom-check` fails when a query changes state: a query that agreed now differs, a query that differed now agrees, a baselined query didn't run, or a new query isn't in the baseline. `make parity-prom-baseline` rewrites the file and keeps its reasons. `make parity-prom` stays report-only. run.sh now saves `go test -json` output and hands it to the checker in compatibility/ratchet, which it builds before the suite runs. The checker is in gigapipe's main module (standard library only) so the LogQL and TraceQL parity harnesses can use it too; -test names the parity test whose results it reads, TestPromQLParity by default. Reasons for the 131 differences, facts only: - 113: the target sends no native histograms - 15: the reference Prometheus drops the 7 oldest replay snapshots - 3: gigapipe disables negative offsets (PQRC001)
Guess-Who-sec
force-pushed
the
test/m3-parity-ratchet
branch
from
November 18, 2026 22:05
12129d4 to
662c6cd
Compare
This was referenced Nov 20, 2026
Contributor
This branch has not been deployed
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.
Part of #922 (M3): the parity baseline, the ratchet and the baseline triage. Next in #922: the release-gate skeleton, which runs this in CI.
Depends on #1069 (the harness): this branch is built on it, so its first 2 commits are #1069's. Merge #1069 first; I'll rebase this one onto
masterthen. Only the last commit is new here.What it does
baseline.jsonrecords every compliance query: its state (agreeordiffer) and, for each query that differs, areason. One query per line, sorted, so a diff shows exactly which queries changed.make parity-prom-checkruns the suite and fails if any query changed state since the baseline, naming each one:make parity-prom-baselinerewrites the baseline from a fresh run. It keeps the reasons already there, and new differences getunclassified.make parity-promstays report-only.The comparison is in
compatibility/ratchet/(Go, standard library only, in gigapipe's main module so the LogQL and TraceQL parity harnesses of M4 can use it too;-testnames the parity test whose results it reads,TestPromQLParityby default).run.shnow savesgo test -jsonoutput and hands it to the checker, which it builds before the suite runs.Triage: the 131 differences
Facts only; whether each one is expected is your call:
not covered: the target sends no native histogramsreference gap: the reference Prometheus drops the 7 oldest replay snapshots; gigapipe keeps themgigapipe: negative offset is disabled (PQRC001)None is
unclassified. #922 suggested reasons likedeliberate-15s-alignment; none of the 131 fits those, so the reasons say what was measured. If you answer Q4/Q6 differently on #1069, the reasons (or the harness) change with it.Verification
-race), including M3 — PromQL parity harness + release-gate skeleton + publish preflight #922's acceptance check: a run where one query flips from agree to differ fails the check, and the same run passes once that query is baselined with a reason. Also: reasons kept on regenerate, a failed or missing_setupand an empty run are refused, bad usage exits 2, and with two parity tests in one output each-testname reads only its own queries.640f1c02:make parity-prom-baseline: 529 agree / 131 differ; regenerating gives a byte-identicalbaseline.jsonmake parity-prom-check: 3 runs, allmatches the baseline (660 queries)make parity-prom: 529 / 131, exit 0PARITY_KEEP_SERVICE_NAME=1 make parity-prom-check(comparesservice_nametoo) fails and names 333 queries "agreed in the baseline, now differs" (529 - 196)go vet,gofmt,staticcheckand golangci-lint (--new-from-rev=upstream/master, all findings shown) clean on the new code; shellcheck: no warningsgo build ./...andgo test ./...pass (34 packages, including the checker); rootgo vethas no new findings compared with test(prom): PromQL parity harness against Prometheus (M3, #922) #1069's tip; gigapipe'sgo.modandgo.sumunchangedPotential risks
makeruns it; the release-gate PR adds it to CI.make parity-prom-baselineis rerun and reviewed (intended)._), asgo testreports them.