Repository navigation
fix(booking): a STRICT sale of every matching lot books lots in purchase order - #3074
Merged
Merged
Conversation
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 |
robcohen
force-pushed
the
fix/strict-total-match-order
branch
from
November 27, 2026 17:01
bf54def to
6539f91
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
robcohen
force-pushed
the
fix/strict-total-match-order
branch
from
November 28, 2026 01:51
6539f91 to
535d69b
Compare
robcohen
changed the base branch from
main
to
fix/auto-accounts-declared-order
November 28, 2026 01:51
robcohen
added a commit
that referenced
this pull request
Nov 28, 2026
Restacked on #3074 (v158). VitePress compiles a {{ wrapped across lines as a Vue interpolation, which broke validate-docs. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ase order When a STRICT or STRICT_WITH_SIZE reduction matches several lots and takes them all (the total-match exception), its postings came out by lot date, so a lot bought first but dated later came second. beancount lists the positions of its insertion-ordered inventory, and so now does rledger (LotOrder::Slot). Units, costs and gains are unchanged; print, #postings and the journal show bean-check order. WASM cache v156 (the parser PRs hold v151 to v155): a Ledger archives its booked directives. Found by the semantic differential. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Restacked on #3075 (v157). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Restacked on #3075: the STRICT total-match posting-order mismatches now match, no regression. Co-Authored-By: Claude Opus 5.5 <[email protected]>
robcohen
force-pushed
the
fix/strict-total-match-order
branch
from
November 28, 2026 03:13
535d69b to
04ac7f1
Compare
robcohen
added a commit
that referenced
this pull request
Nov 28, 2026
Restacked on #3074 (v158). VitePress compiles a {{ wrapped across lines as a Vue interpolation, which broke validate-docs. Co-Authored-By: Claude Opus 5.5 <[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.
What
When a
STRICTorSTRICT_WITH_SIZEreduction matches several lots and takes them all (the total-match exception), its booked postings now list the lots in the order they entered the inventory (newLotOrder::Slot: a new lot takes the next slot, removal leaves a tombstone), where they were listed by lot date.Why
beancount's inventory is an insertion-ordered map, and it books the total match in that order. Black-box, beancount 3.2.3:
beancount books
-14 VTI {207.00 USD, 2024-01-02}then-4 VTI {75.14 USD, 2023-09-08}; rledger booked them the other way round (FIFO/LIFO/HIFO already agree). Units, costs and gains are unchanged;print,#postingsand the journal show the order. Found by the semantic differential (#3071), categoryentries|postings.order|...|reduce.WASM cache v156 (the open parser PRs hold v151 to v155): a
Ledgerarchives its booked directives. The loader cache holds parsed directives and is unchanged.How to test
The core, booking, loader, query, validate, CLI and WASM suites pass.
🤖 Generated with Claude Code