Repository navigation
fix!: refuse a price to compute beside a cost, report non-UTF-8 bytes, and make --auto load beancount's auto plugin - #3059
Merged
Merged
Conversation
robcohen
force-pushed
the
fix/upstream-missing-checks
branch
from
November 27, 2026 05:01
e0a0213 to
31b2f17
Compare
robcohen
force-pushed
the
fix/upstream-decisions
branch
from
November 27, 2026 05:02
c087915 to
58e3f16
Compare
robcohen
force-pushed
the
fix/upstream-missing-checks
branch
from
November 27, 2026 06:06
31b2f17 to
a94980e
Compare
robcohen
force-pushed
the
fix/upstream-decisions
branch
from
November 27, 2026 06:31
58e3f16 to
f6b2ec8
Compare
robcohen
force-pushed
the
fix/upstream-missing-checks
branch
from
November 27, 2026 06:50
a94980e to
97164b4
Compare
robcohen
force-pushed
the
fix/upstream-decisions
branch
from
November 27, 2026 06:59
f6b2ec8 to
fbd3ffd
Compare
robcohen
force-pushed
the
fix/upstream-decisions
branch
from
November 27, 2026 08:07
fbd3ffd to
26d5c60
Compare
Contributor
📊 Benchmark Results
vs base, measured in this run
A difference counts only when it clears the combined spread of the two measurements, per shape (2σ: What do these numbers mean?
|
Contributor
✅ Compatibility Test Results
What's tested
Full results available in workflow artifacts |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
1 HOOL {10 USD} @ USD (or a bare @, @@, @@ USD) was accepted and the price
ignored (#1919). beancount reports "Cannot infer price for postings with
units held at cost" (and then crashes); rledger now refuses it as a booking
failure on the posting (InterpolationError::PriceBesideCost). A price NUMBER
without a currency (@ 12) still takes the cost currency (#3047).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A non-UTF-8 file was decoded lossily and accepted. The decode stays lossy (no panic, the text is still shown), but SourceText now remembers where the invalid sequences were, and the loader reports them as beancount 3.2.3 does: an invalid token outside strings (one per run), one error per string on its last line (UnicodeDecodeError), nothing in a comment. Loader cache v81. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…heck --auto does bean-check --auto adds beancount.plugins.auto; rledger --auto ran auto_accounts alone. LoadOptions::auto_accounts now runs both parts, each in its own pass, through plugin_parts. check also renders parse-error snippets of a non-UTF-8 file from the lossily decoded text the loader parsed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…vered, bump caches compatibility.md sections 1 (beancount refuses unbalanced multi-currency transactions too), 3 (rledger reports all four push/pop mistakes) and 4 (unknown options are E7001, deprecated E7004) described old behavior. checks.toml: the bare-price row is covered, the lexer row names the UTF-8 test. WASM cache v145. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
robcohen
force-pushed
the
fix/upstream-decisions
branch
from
November 27, 2026 10:03
0a14c5f to
d743034
Compare
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
Implements the maintainer's three decisions on the ambiguous cases left by the upstream check table (#3054), and fixes three stale compatibility.md sections. Stacked on #3057, which provides
rustledger_plugin::plugin_parts; it will be rebased onto main as #3054 and #3057 merge.1. A price to compute beside a cost is refused (breaking)
1 HOOL {10 USD} @ USD, or a bare@,@@,@@ USD, used to be accepted with the price ignored (#1919,a_bare_price_beside_a_cost_is_inert). It is now a booking failure (BOOK) on the posting, which is beancount'sCannot infer price for postings with units held at cost. bean-check 3.2.3 records that error and then crashes, so the table row keepspython_crash. A price number written without a currency (@ 12) still takes the cost's currency, as #3047 made it. Implemented as the newInterpolationError::PriceBesideCost, and the old "inert" test is replaced with a test for the refusal.2. Bytes that are not UTF-8 are reported where beancount reports them (breaking)
The decode stays lossy, so nothing panics and the text is still shown. What changes is that
SourceText::from_utf8_lossynow records where each invalid sequence was (SourceText::invalid_utf8), and the loader reports them as bean-check 3.2.3 does (probed shape by shape):Invalid token: '\xe9', one per runP0012invalid token, one per runUnicodeDecodeError, one per string, on the line the string endsP0012, one per string, on its last linerledger checknow renders the snippet from the same decoded text. Before,read_to_stringgave it an empty text.&strand are unaffected.iconv).3.
rledger check --autoruns beancount'sautoplugin (breaking)bean-check --autoaddsbeancount.plugins.auto, which isauto_accountsfollowed byimplicit_prices.rledger check --autoranauto_accountsalone.LoadOptions::auto_accountsnow runs both parts, each in its own pass, throughplugin_parts.checkis the only command whose--autoloads plugins;extract --autois unrelated (it infers the importer).Stale compatibility.md sections
Caches
The numbers follow #3060's v81/v146, which is expected to merge first.
How to test
🤖 Generated with Claude Code