Repository navigation
ci(compat): block on BQL query regressions - #1533
Merged
Merged
Conversation
The Compatibility job recorded results but never failed, so #1506 dropped BQL JOURNAL 90->12 and merged unblocked. Add --baseline to compat-bql-test.py: exit non-zero if any (file, query) pair that matched on the baseline now fails (a true->false flip; robust to corpus/coverage changes). compat.yml fetches mains BQL results as the baseline and passes --baseline. Baseline-commit is already PR-gated and runs after, so a regression is never blessed into the baseline. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes the Compatibility CI job fail (exit non-zero) when there are BQL query regressions compared to a stored baseline, preventing “recorded but non-blocking” BQL drops from merging.
Changes:
- Adds
--baseline <prev-results.jsonl>toscripts/compat-bql-test.pyand implements a per-(file, query)true→false regression gate that exits non-zero and emits CI error annotations. - Updates
.github/workflows/compat.ymlto downloadcompat-bql-results.jsonlfrom thecompatibilitybranch and pass it as--baselineto the BQL compat step.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
scripts/compat-bql-test.py |
Adds baseline-driven regression detection and failing exit code for per-pair BQL regressions. |
.github/workflows/compat.yml |
Fetches the baseline BQL results from the compatibility branch and wires it into the BQL compat step. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
✅ Compatibility Test Results
What's tested
Full results available in workflow artifacts |
Copilot on #1533: a truncated/corrupt baseline JSONL line crashed json.loads with a traceback. Skip unparsable lines; a wholly-unparsable baseline yields an empty passing-set (no gate that run) rather than a spurious block. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
What
Makes the Compatibility check block on BQL query regressions. Today the compat job records results but never exits non-zero — which is how #1506 dropped BQL
JOURNALfrom 90/90 → 12/90 (BQL compat 93%→77%) and still merged.How
scripts/compat-bql-test.pygains--baseline <prev-results.jsonl>. After the run it compares against the baseline and exits non-zero if any(file, query)pair that matched in the baseline now fails — a true→false regression. The CI annotation lists exactly what regressed (REGRESSED: <query> | <file>).compat.ymlfetches main'scompat-bql-results.jsonlfrom thecompatibilitybranch and passes it as--baseline.Why per-pair, not percentage: comparing the overall % is fragile when the corpus or the eligible-file set changes. Per-
(file, query)only flags an actual result flip — a pair that drops out of the run (coverage change) or a brand-new failure (never passed before) is not counted. Verified with a standalone test (catches the flip; ignores coverage-drops and new failures).Safety / ordering
if: github.event_name != 'pull_request', so PRs never write the baseline.Scope note
This gates BQL query regressions (the JOURNAL class). The file-level
regression_countis also computed but is intentionally not gated here — synthetic test files are regenerated each run, so a hard file gate needs determinism handling first. Tracked as a follow-up.🤖 Generated with Claude Code