Repository navigation
chore(compat): pin order-by-expression's render_commas gap as a Python divergence - #2359
Merged
Merged
Conversation
…n divergence `order-by-expression` hits the same bean-query grouping gap already registered for these three fava-investor fixtures on a dozen other queries: they set `option "render_commas" "True"`, beancount consumes the option and we honor it, and beanquery never reads it. `SELECT number + 1` returns `-1399999` from bean-query against our `-1,399,999`, identical once the separators come out. The pairs went unpinned only because the query postdates the block, having been added in #2215 for #2177. These were three of the seven unmasked mismatches the suite has been reporting at every coverage level (#2358); the remaining four are two files of upstream's 1e-7 plugin drift and two uncharacterized scale differences, which stay unmasked. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
✅ Compatibility Test Results
What's tested
Full results available in workflow artifacts |
robcohen
added a commit
that referenced
this pull request
Sep 20, 2026
… causes (#2361) All four remaining `order-by-expression` mismatches extend blocks that already adjudicate the same mechanism on the same fixtures. Like #2359, they went unpinned only because the query postdates those blocks. Each cause was reproduced locally against beancount 3.2.3 and beanquery 0.2.0 with the corpus plugins at the commits CI pins, rather than read off the diff: - `missing_prices`: `{{25.61 GBP}}` makes beancount re-derive the total through a division, so it reports `-25.61000000000000000000000000` where we report `-25.61`. Python list, with the existing `@@` re-multiplication note. - `long_short`: upstream RECOMPUTES the gain as `(cost - price) * abs(units)`, and the authored `1.50` carries scale 2. Removing the plugin line shows beancount itself interpolating `-50` at scale 0, so the scale is the plugin's, not our interpolation's. Rust list, with the existing note. - `cool_fund_example` and `some_fund_example`: the 1e-7 valuation drift of #2018, plus a second cause on the same pairs. Our valuation plugin computes the PnL amount that upstream leaves to interpolation, so it carries dust (`-25.00` against `-25.00000000000000000000000001`). Filed as #2360 and called out in the pin comment, because one pin now covers two causes. Refs #2358. Claude-Session: https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
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.
Three of the seven unmasked BQL mismatches (#2358) are the
render_commasgap that is already registered for these same three fava-investor fixtures on a dozen other queries. This extends that block toorder-by-expression.The attribution was checked before pinning, because putting this in the wrong list would mask an rledger bug:
render_commasis a real beancount option (parser/options.py), default False.parser/grammar.pycallsself.dcontext.set_commas(self.options["render_commas"]).render_commasappears nowhere in beanquery's source; its renderer never consults the ledger's dcontext for grouping.option "render_commas" "True"on line 3.So we honor a documented option the user set and bean-query is not wired to it, which is the existing block's conclusion and why it sits in
KNOWN_PYTHON_DIVERGENCES. Our side stays pinned byrender_commas_applies_to_every_column_kindandbeancount_output_honors_render_commas_like_format.The values agree once grouping is removed:
SELECT number + 1gives-1399999/-19999/-139999from bean-query against-1,399,999/-19,999/-139,999from us.These pairs were unpinned only because
order-by-expressionpostdates the block (added in #2215 for #2177), not because anyone judged them differently.Verification
scripts/compat-bql-test.py --self-testpasses (stale/dangling detection).KNOWN_PYTHON_DIVERGENCESand in neitherKNOWN_RUST_DIVERGENCES, with a deliberately bogus pair checked absent so the membership test is shown able to report "missing".Expected effect on the next compat run:
Real mismatchesgoes 7 to 4. The remaining four stay unmasked on purpose, and #2358 tracks them: two files of upstream's 1e-7 plugin drift, and two trailing-zero scale differences pointing in opposite directions that are not characterized yet.Refs #2358.
🤖 Generated with Claude Code
https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr