Repository navigation
ci(compat): error-count metric on both-fail files + gate on check regressions - #1678
Merged
Merged
Conversation
…ressions Two deltas to the check-comparison step (validated against #1668's bug classes): 1. error_count_match — exact error-count agreement on files BOTH tools reject. check_match/error_presence_match are blind to a duplicated diagnostic on one side or a missing dedicated diagnostic on the other (both fail -> verdicts agree); exact counts catch both (#1668.1 duplicate oversell, #1668.2 missing balance-currency diagnostic). Report-only: summary section + error_count_* outputs; promote to a gate once the metric is clean. 2. Gate on check regressions — the job now fails when a file that matched on the previous run mismatches now, mirroring the BQL step's --baseline exit. Previously regressions were only printed + written to compat-regressions.txt. Runs as the LAST step so BQL, charts, the PR comment, and the compatibility-branch commit still happen (one-shot red alert). YAML parses; all inline-python heredocs py_compile clean. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Contributor
✅ Compatibility Test Results
What's tested
Full results available in workflow artifacts |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances the compatibility CI workflow by adding a diagnostic-level metric to detect “both tools fail, but error quality differs” cases, and by turning “check regressions vs previous run” into a hard CI gate (while still allowing charts/comments/baseline commit steps to run before failing).
Changes:
- Add an
error_count_matchmetric (evaluated only on files where both tools emit errors) and exposeerror_count_files/matches/pctas workflow outputs. - Add a final workflow step that fails the job when
regression_count != 0(check regressions), mirroring the existing BQL regression gate behavior.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Implements improvement idea #3 — narrowed to the two genuine deltas after validating that check-verdict comparison already exists in compat.yml.
1.
error_count_matchmetric (report-only)On files both tools reject, compare exact error counts.
check_match/error_presence_matchare structurally blind to the #1668 classes — a duplicated diagnostic on one side (#1668.1 oversell ×2) or a missing dedicated diagnostic on the other (#1668.2 balance currency) leaves both verdicts agreeing. Exact counts catch both. Surfaced as a summary section (top mismatching files) +error_count_files/matches/pctoutputs; promote to a gate once the live metric is clean.2. Gate on check regressions
The BQL step already fails on baseline regressions (
--baseline); check regressions were only printed and written tocompat-regressions.txt. New final step fails the job whenregression_count != 0— positioned last so BQL, charts, the PR comment, and the compatibility-branch commit still run (one-shot red alert; details persist incompat-regressions.txton the compatibility branch).Verification
py_compile).asdictJSONL serialization; the regression detector'sprev.get(...)reads are unaffected.🤖 Generated with Claude Code