Skip to content

ci(compat): show the raw BQL rate in the PR comment too - #1941

Merged
robcohen merged 1 commit into
mainfrom
fix/compat-pr-comment-raw-pct
Aug 3, 2026
Merged

robcohen merged 1 commit into
mainfrom
fix/compat-pr-comment-raw-pct

Conversation

@robcohen

@robcohen robcohen commented Aug 3, 2026

Copy link
Copy Markdown
Member

#1929 added the raw BQL rate to the step summary, compat-results.yaml, GITHUB_OUTPUT and the console recap — but not to the PR comment, which is the most-read surface in the repo and the one that produced the "BQL Compatibility 93%" that prompted the change in the first place. I missed it; this closes it.

The gap is not hypothetical

#1927 pinned 51 proven-upstream pairs in a single PR and moved the effective figure 93% → 95%, with raw unchanged underneath. Anyone reading only the headline saw compatibility improve when nothing about rledger had.

What changes

The existing cell becomes:

Metric Result
BQL Compatibility 95% (raw 89%, 159 masked)

Raw goes inside the existing cell rather than in a new row, deliberately — so the headline cannot be quoted without it.

The "What's tested" legend now says which is which: the headline is the effective rate after pairs where beanquery itself is wrong are masked; raw is the same run with nothing masked; a widening gap means the registry grew, not that rledger changed.

Backward compatibility

Degrades to the old single-figure cell when the raw key is absent — what a re-run against a pre-#1929 artifact produces. An N/A there would be noise, not information.

Verified by running the logic, not reading it

Executed the script's parsing in node against both YAML shapes:

current YAML -> {"bqlRate":"95","bqlCell":"95% (raw 89%, 159 masked)"}
pre-#1929    -> {"bqlRate":"93","bqlCell":"93%"}
effective key not shadowed by raw key: true

That last check matters: bql_match_pct and bql_raw_match_pct sit adjacent in the YAML, and the effective regex must not accidentally match the raw key. It doesn't — bql_raw_match_pct does not contain the substring bql_match_pct — and the test pins it.

No gating behavior changes: the ✅/⚠️ status still keys off the effective rate, exactly as before.

Refs #1902.

#1929 added the raw rate to the step summary, compat-results.yaml,
GITHUB_OUTPUT and the console recap - but not to the PR comment, which is the
most-read surface in the repo and the one that produced the "BQL
Compatibility 93%" that prompted the change.

The gap this closes is not hypothetical. #1927 pinned 51 proven-upstream
pairs in a single PR and moved the effective figure from 93% to 95% with raw
unchanged underneath. Anyone reading only the headline saw compatibility
improve when nothing about rledger had.

The cell now reads: 95% (raw 89%, 159 masked)

Raw goes INSIDE the existing cell rather than in a new row, so the headline
cannot be quoted without it.

Degrades to the old single-figure cell when the raw key is absent, which is
what a re-run against a pre-#1929 artifact produces - an N/A would be noise.

Verified by running the script logic in node against both shapes: current YAML
gives "95% (raw 89%, 159 masked)", a pre-#1929 one gives "93%", and the
effective key is not shadowed by the raw key (bql_raw_match_pct does not
contain the substring bql_match_pct).

Refs #1902.
@robcohen
robcohen requested a review from a team as a code owner August 3, 2026 17:57
Copilot AI review requested due to automatic review settings August 3, 2026 17:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the GitHub Actions compatibility workflow so the PR comment includes both the effective BQL compatibility rate and the raw (unmasked) rate, aligning the most visible reporting surface with the richer metrics already emitted elsewhere.

Changes:

  • Parse bql_raw_match_pct and known_divergences from compat-results.yaml in the PR-comment posting step.
  • Render BQL Compatibility as a single combined cell: effective% (raw raw%, N masked) when raw data is available.
  • Expand the “What’s tested” legend to clarify effective vs raw semantics.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

⚠️ Compatibility Test Results

Metric Result
Check Compatibility 100%
BQL Compatibility 95% (raw 89%, 162 masked)
Full AST Match 100%
Total Files 812
What's tested
  • Check: Exit codes and error counts match bean-check
  • BQL: Query results match bean-query
    The headline is the EFFECTIVE rate, after pairs where beanquery
    itself is wrong are masked. raw is the same run with nothing
    masked. A widening gap means the registry grew, not that rledger
    changed.
  • Files: ~800 test files downloaded from 10+ beancount repositories

Full results available in workflow artifacts

@robcohen
robcohen merged commit 425daca into main Aug 3, 2026
42 checks passed
@robcohen
robcohen deleted the fix/compat-pr-comment-raw-pct branch August 3, 2026 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants