Repository navigation
refactor(parser): delete drop_errors_inside_a_line_error; the oracle names the invalid token - #3067
Merged
Merged
Conversation
robcohen
force-pushed
the
fix/bom-quiet-overlay
branch
from
November 27, 2026 17:05
02c26cd to
ab75364
Compare
robcohen
force-pushed
the
fix/drop-line-error-pass
branch
from
November 27, 2026 21:20
d505cdd to
5949eb0
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✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…names the invalid token convert.rs's hand-modeled drop_errors_inside_a_line_error (#2787) dropped an unreadable token's own error inside its line's error and renamed the line error after the token. The error oracle's reconciler already keeps the narrowest of rledger's errors on each token beancount reports, so the pass only decided which of two errors survived, and its name. The pass, its transaction-span list and its linear-time counter are deleted. In its place the beancount oracle names, after reconciling, each `unexpected input` error that alone stands for one of beancount's lexer errors (the narrowest error on the token, holding no other): `unexpected input: invalid token 'h'`, as bean-check's `Invalid token: 'h'`. So more errors name their token than before, and an error on a token is reported at the token, not over its whole line. Error counts and lines are unchanged: parity 122,378 of 123,394, nothing re-pinned. The BOM matrix's token texts and three cause labels are re-pinned (BOM_MATRIX_RELABEL), and the corpus baseline's 12 drifted files (messages only). Stacked on the bom-in-account overlay, which keeps the one-BOM-per-line rule this pass also applied. WASM cache v152. Co-Authored-By: Claude Opus 5.5 <[email protected]>
robcohen
force-pushed
the
fix/drop-line-error-pass
branch
from
November 27, 2026 21:58
5949eb0 to
bcbcba2
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
Deletes convert.rs's hand-modeled
drop_errors_inside_a_line_error(#2787). This is the retry: in #3063, removing it broketransaction_holds_invalid_token, and #3064 has since moved that function onto the oracle.The pass dropped an unreadable token's own error when it sat inside its line's error, and renamed the line error after the token. The error oracle's reconciler already keeps the narrowest of rledger's errors on each token beancount reports. So the pass now decided only which of two errors survived, and what it was called.
name_invalid_tokensin the beancount oracle. After reconciling, it names eachunexpected inputerror that alone stands for one of beancount's lexer errors: the narrowest error on the token, and one that holds no other token. The message becomesunexpected input: invalid token 'h', matching bean-check'sInvalid token: 'h'.'freddo'in-5.65 freddo NZDand'"Lunch'in an unterminated narration. An error on a token is now reported at the token, not over its whole line.unterminated_quotetests are updated to match.test_parse_line_error_names_the_invalid_tokenandtest_parse_header_after_two_leading_boms_names_its_invalid_tokenpass unchanged.Gates
BOM_MATRIX_RELABEL=1): 679 rows now name their token. Three known rows lose a cause label, since the counts are the same.STRICT_BASELINE: I re-pinned only the corpus files whose messages drifted: 11 found locally, plusdouble-entry-generator/example_mt_example-mt-output.beancount, which only CI's larger corpus has (fetched from upstream, blake3 matches the pinned source hash).-D warningsis clean, and the validate, loader, lsp, wasm and rustledger tests pass.Stack and caches
This PR is stacked on #3065. That PR's
bom-in-accountoverlay keeps the one-BOM-per-line rule this pass also applied; without it, 9 BOM matrix rows regress. #3065 has merged; this PR now targets main.WASM cache v152. The loader cache is unchanged.
🤖 Generated with Claude Code