Repository navigation
chore(compat): pin the last four unmasked BQL pairs to their verified causes - #2361
Merged
Merged
Conversation
… causes 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. 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 |
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.
The BQL suite has reported
Real mismatches: 7at every coverage level for a while (#2358). #2359 handled three of them. This handles the last four, and takes the count to zero.All four extend blocks that already adjudicate the same mechanism on the same fixtures. Like #2359 they went unpinned only because
order-by-expressionpostdates those blocks (#2215, for #2177).Causes, reproduced rather than read off the diff
Run locally against beancount 3.2.3 and beanquery 0.2.0, with the corpus plugins at the commits
compat.ymlpins.missing_prices(Python list).11.7230 NESTHIGHER {{25.61 GBP, 2017-12-14}}makes beancount re-derive the total through a division, so the interpolated leg reports-25.61000000000000000000000000where we report-25.61. This is the@@re-multiplication mechanism the block above it already documents, in its{{total}}form.long_short(Rust list). Upstream recomputes the gain:The authored
1.50carries scale 2, so the product does. Confirmed as the plugin's and not our interpolation's by running the fixture with thepluginline removed, where beancount itself interpolates-50at scale 0. We keep the interpolated residual and change only the account.cool_fund_exampleandsome_fund_example(Rust list). Two causes on the same pairs, which the comment says explicitly rather than leaving implied. Posting by posting onsome_fund_example, only three rows differ:The middle row is the #2018 1e-7 valuation drift this block documents. The other two are new: our valuation plugin COMPUTES the PnL amount that upstream leaves to interpolation, so ours carries dust. Filed as #2360. Worth noting there that
BigDecimalescalation does not fix it, since the dust is already in the rounded price:Verification
Ran the harness locally on the real corpus with both real tools, over these four fixtures plus the three from #2359:
No stale-mask error, so every pinned pair still genuinely diverges.
Shown able to report "dirty": removing just the
long_shortpin givesKnown Rust diffs: 13,Real mismatches: 1, naming that exact pair.--self-testalso passes, and I asserted each new pair lands in the intended registry and not the other one, with a bogus pair checked absent.Expected on the next full run:
Real mismatches4 to 0,Known Python diffs+1,Known Rust diffs+3, withRuns matchingand the raw rate unchanged, since nothing about rledger changes here.Refs #2358, #2360.
🤖 Generated with Claude Code
https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr