Repository navigation
fix(extract): dedup against --existing as a scoped multiset with id links - #2495
Conversation
…inks `extract --existing` treated the existing ledger as a set: one existing transaction suppressed every identical new row, so two identical purchases on one day lost one silently. It compared only the first posting's number, so other accounts and currencies matched, and it ignored the `^ofx-` id links the OFX importer emits. `rustledger_ops::dedup::find_import_duplicates` replaces the per-row `is_duplicate`: - existing transactions are a multiset; each absorbs at most one new row - matching is scoped to the importer's account posting and its commodity - a shared `^ofx-`/`^csv-` id link is decisive; different ids in one namespace mean two transactions - passes run id, then exact text, then fuzzy text, so weak evidence cannot claim an entry strong evidence needed - existing keys are computed once and bucketed by date, account, commodity and amount: 50k x 50k goes from 550-804 s to 1.6 s The CLI lists every skipped row on stderr with its reason. The CSV importer gains `transaction_id_column`, emitting `^csv-<id>` links through the same sanitizer as OFX FITIDs (now shared in ops). Closes #2421 Closes #2422 Closes #2387 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr
📊 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?
|
✅ Compatibility Test Results
What's tested
Full results available in workflow artifacts |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
- An id link match now also needs the same account, commodity and amount: the sanitizer maps `a b` and `a:b` to one link, and such a collision must not drop a different transaction. - A ledger entry that splits the account leg over several postings is matched on its net movement per commodity as well. - A new transaction that never touches the importer account (a WASM importer may post elsewhere) falls back to the unscoped first-posting key instead of escaping dedup. - Pin that a transfer already booked from the other account's statement is a duplicate (main compared the first posting and re-imported it). - `session.dedup` semantics changed, so the component contract moves to 3.13.0, following the #2415 precedent of bumping for a semantic change. - Docs, roadmap and README describe the id-plus-amount rule. Refs #2421 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr
Current state (head f5b9e9b). This section is authoritative; the passes below are a chronological log
Numbers inside earlier passes (for example 1.6 s, 897 tests, the pass-1 mutation counts) describe the head as it was at that pass. Ninth pass: PR body, this comment, stale comments, quoted strings
Adversarial review passI ran release builds of
Component.
Lockfiles and bot commit. The fuzz lockfiles add Fail without fix. I checked each rule by mutating it on the isolated target; each mutation is restored afterwards:
Results. 1297 tests pass across 39 binaries. The gated parity suite passes against a freshly built debug wasip2 component (27 tests, 420 s). 50k × 50k now runs in 0.76 s at load 9, with output byte-identical to Second pass: cross-PR integration, properties, WIT, docsIntegration. I merged this PR together with #2497 and #2498 onto On the combined tree:
Property tests (
The four properties now hold:
Fail without the fix: restoring the empty-text guard fails 2 properties, and removing the canonical order fails the order property and a new unit test. WIT 3.13.0. The bump is complete:
Docs were re-read against the final behavior: an id match needs the same account, commodity and amount; split legs are compared by net movement; a transfer from the other statement is recognized; a WASM importer's row falls back to its first posting; empty text matches; order does not matter. I corrected Everything above ran on per-worktree target dirs. 50k × 50k takes 0.92 s, with output byte-identical to Third pass: text robustness, resources, the empty-text decision, code qualityText robustness,
The fuzzy rules are Resources (
Extract alone takes 0.43 s / 198 MB at 50k and 1.97 s / 757 MB at 200k. At 4× the input, the dedup overhead grows from about 0.3 s to 1.7 s, which is near-linear. Empty text. The risky case is two distinct description-less withdrawals on one day for one amount, with one already booked. It used to print Code quality
Fail without the fix. Every mutation from both earlier passes, plus four new ones (no Results. 1305 tests pass across 40 binaries; the parity suite passes against a fresh debug component (27 tests); clippy and rustdoc are clean. 50k × 50k is byte-identical to Fourth pass: merged with
|
| Input | Result |
|---|---|
| Empty CSV, header-only CSV | exit 1, "no transactions were extracted" (unchanged from main) |
| CSV with a BOM | header is read and the id link is emitted (exit 0) |
| Id blank on some rows | those rows get no link; the rest do |
--existing an empty file |
nothing is deduplicated; exit 0 |
--existing a directory, unreadable, or missing |
exit 1, "Failed to load existing ledger". The OS error is repeated three times, but that comes from the loader and is the same on main, so I'm proposing it as a follow-up |
| Re-importing a statement with a repeated id | both rows dropped by id (multiset) |
Findings fixed in 54281c0
- A
transaction_id_columnthe header lacks used to fail every row withfailed to read configured transaction id column, which doesn't name the column, and then report "no transactions were extracted". It now fails once withtransaction_id_column "Id" is not a column of this file (its columns: Date, Description, Amount). Fail without fix: with the check removed, 2 tests fail. - Ids repeating within one statement were accepted silently. That happens when a category, type or date column is picked by mistake, and id dedup then matches an equal-money row on any date. One warning now says how many ids repeat, with an example and its rows:
1 transaction id(s) appear on more than one row (e.g. ^csv-t1 on rows 1, 2); transaction_id_column should name a column that is unique per transaction, or extract --existing may match the wrong rows. Fail without fix: with the warning removed, 1 test fails.
Results. 1314 tests pass across 40 binaries; the parity suite passes (27 tests); clippy is clean. All earlier mutations still fail their tests. 50k × 50k takes 0.75 s, byte-identical to main. All runs used this worktree's own target.
Sixth pass: misconfiguration of the keys this PR adds
I checked each case against a release build.
transaction_id_column setting |
Result |
|---|---|
0 (integer index) |
works |
1.5, true |
error: "transaction_id_column must be a column name (string) or 0-based index (integer)" |
"" |
error: not a column of this file |
"id", " Id" |
error: not a column, now with a did you mean "Id"? hint |
9 (past the last column) |
was one context-free warning per row, then "no transactions were extracted". Now one error: transaction_id_column 9 is past the last column of this file (it has 4 columns, numbered from 0) |
"Amount", "Date" |
was accepted, emitting ^csv--4.00 and ^csv-2024-01-15. Because id dedup treats an equal id with equal money as the same transaction on any date, an amount column used as the id would drop every equal-amount row. Now refused: transaction_id_column names the same column as amount_column ("Amount"). The same check covers date_column, debit_column, credit_column, narration_column, payee_column, currency_column and secondary_date_column |
Used together with [importers.mappings], accounts and id links both come out right.
Fixed in 9f35d4f. Fail without the fix:
- with the same-column check removed, 1 test fails;
- with the index range check removed, 1 test fails;
- with the whole up-front check removed, 3 tests fail.
All earlier mutations still fail their tests. 1315 tests pass across 40 binaries, the parity suite passes (27 tests), and clippy is clean. 50k × 50k takes 0.76 s, byte-identical to main. All runs used this worktree's own target. #2495 is MERGEABLE on main after 092460b.
Seventh pass: harness integrity and a literal docs walkthrough
Harness integrity. In pass 6 a mutation silently stopped applying, so I re-ran every mutation from passes 1–6 through a new harness. For each mutation it:
- applies every replacement and asserts the exact expected match count;
- checks the file on disk differs from its backup;
- runs
cargo testwithout-q, so theCompiling <crate>lines prove a rebuild; - adds up every
test result:line (passed and failed), rather than trusting that no FAILED appeared; - restores the files byte for byte and checks them again.
Tests run: -p rustledger-ops -p rustledger-importer --all-features plus -p rustledger --all-features --lib. The baseline (no mutation) is 892 tests, 0 failed. Every mutation applied, triggered a rebuild, and failed at least one test:
| Mutation | Applied (file changed, crates rebuilt) | Tests run | Failed |
|---|---|---|---|
| baseline (no mutation) | yes (7 crates rebuilt) | 892 in 9 binaries | 0 |
| p1 no consumption (set semantics) | yes (6 crates rebuilt) | 892 in 9 binaries | 9 |
| p1 first-posting number only (no account/commodity scope) | yes (6 crates rebuilt) | 892 in 9 binaries | 7 |
| p1 id links ignored | yes (6 crates rebuilt) | 892 in 9 binaries | 4 |
| p1 single fuzzy pass (no id/exact priority) | yes (6 crates rebuilt) | 892 in 9 binaries | 10 |
| p1 CSV id link not emitted | yes (6 crates rebuilt) | 892 in 9 binaries | 4 |
| p2 id match without the money check | yes (6 crates rebuilt) | 892 in 9 binaries | 2 |
| p2 no split-leg net key | yes (6 crates rebuilt) | 892 in 9 binaries | 1 |
| p2 no unscoped fallback | yes (6 crates rebuilt) | 892 in 9 binaries | 3 |
| p3 empty text never matches (main's guard) | yes (6 crates rebuilt) | 892 in 9 binaries | 5 |
| p3 no canonical order | yes (6 crates rebuilt) | 892 in 9 binaries | 2 |
| p4 money-only matches not flagged | yes (6 crates rebuilt) | 892 in 9 binaries | 3 |
| p4 unchecked net add (overflow panic) | yes (6 crates rebuilt) | 892 in 9 binaries | 1 |
| p4 skip report uncapped | yes (6 crates rebuilt) | 892 in 9 binaries | 1 |
| p4 no broken --existing warning | yes (1 crates rebuilt) | 892 in 9 binaries | 1 |
| p5 no up-front id column check | yes (2 crates rebuilt) | 892 in 9 binaries | 3 |
| p5 no repeated-id warning | yes (2 crates rebuilt) | 892 in 9 binaries | 1 |
| p6 no same-column check | yes (2 crates rebuilt) | 892 in 9 binaries | 1 |
| p6 no index range check | yes (2 crates rebuilt) | 892 in 9 binaries | 1 |
Docs walkthrough. I followed extract.md and importing.md literally against the PR binary.
- The two quoted stderr blocks match character for character.
- The Quick Start and Duplicate Detection commands run as shown, and the description-less statement case works with default columns.
Findings, fixed in 3fb32fb (docs only)
- The Monzo
transaction_id_columnexample didn't work as written. It had noaccount,currencyor column keys, so a real Monzo-style file failed withfailed to parse date '15/01/2024'and never produced the output shown. It is now a complete entry, and its output matches the doc's beancount block byte for byte. - The
extract.mdCSV Options block was not valid TOML. It repeateddate_columnandamount_column, so copying it gave a TOML duplicate-key error (this predates the PR, but the PR edits that block). The name-based alternatives are now commented out, and the block runs. - Merging this PR and fix(extract)!: take a CSV entry's missing currency from its open directive #2498 together still conflicts only in
CHANGELOG.md; the docs edits merge cleanly.
Eighth pass: every other doc and text this PR changes
I checked each item below against the PR binary, the component, and the doctests.
Findings fixed in 9155173
-
docs/roadmap/importing.md, "Stable source IDs" row. It still opened with "Dedup keys on exact date, exact first-posting amount, and a fuzzy payee/narration match", and it listed consuming ids as remaining work, contradicting its own "shipped" sentence. It now records what shipped: OFX^ofx-, CSV^csv-, and dedup treating an equal id with equal money as the same transaction. What remains is an id convention for WASM importers (dedup only recognizes theofx-andcsv-prefixes) and extract --output truncates the target file, destroying existing ledger content #2251. -
CHANGELOG performance entry. It still quoted 1.6 s and 1.8 s from before the review rounds. Re-measured on an idle machine:
Run Time main, 50k × 50k101 s this PR, 50k × 50k 0.76 s (the import alone is 0.43 s) full re-import, every row a duplicate 0.37 s 200k × 200k 3.6 s The PR body table is updated to match.
-
docs/development/import-architecture.md. It described id matching without the same-money condition; that is now stated.
Checked and accurate, no change needed
-
The README sentence.
-
Every CHANGELOG claim other than the performance numbers, each checked against the binary in passes 1–7.
-
The WIT
session.dedupdoc. Each claim is now asserted in the component's own test (dedup_flags_and_format_loaded_close_the_loop):- two identical candidates against one held entry →
[true, false]; - a candidate in another first-posting commodity →
[false]; - a shared
^csv-link with the same money but completely different text →[true].
The gated parity test passes against a freshly built debug wasip2 component.
- two identical candidates against one held entry →
Rustdoc. None of the new public items in rustledger-ops had an example. find_import_duplicates (the two-coffees multiset case) and id_link now have runnable examples, and cargo test --doc -p rustledger-ops reports 2 passed (the 1 ignored doctest is the existing ml one).
Clippy and rustdoc are clean. All runs used this worktree's own target.
Property tests (new crates/rustledger-ops/tests/import_dedup_properties.rs) found two invariant failures: - Re-importing a statement whose rows have no payee or narration added every row again: empty text never matched. Identical empty text now counts as identical in the exact pass. - Which rows survived depended on file order: the greedy fuzzy pass let an earlier row claim the entry a later one needed. Rows are visited, and candidates offered, in a canonical content order, so the kept set is a function of the contents alone. The properties pin: a re-import adds zero rows; drops never exceed existing entries and each rests on the same money; permuting either side keeps the same rows; a half-then-whole import is idempotent. Refs #2421 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr
- A match where neither side has a payee or narration is reported as
`DuplicateReason::AmountOnly`, counted separately and flagged on stderr
("-- check: nothing but the date and amount ties these together"):
two different description-less rows on one day for one amount are
indistinguishable, so the user should see such skips.
- The split-leg net uses checked_add, so a crafted ledger whose net
overflows Decimal no longer panics the import.
- Ranks are computed once per transaction and borrowed, instead of
allocating in every sort comparison; `DuplicateReason` is
`#[non_exhaustive]`; `ID_LINK_PREFIXES` is private (nothing outside
needs it); `id_link` docs describe the id-plus-money rule.
- Docs note that text is not Unicode normalized (NFC vs NFD differ).
Refs #2421
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr
…sting - A full re-import listed every skipped row: 50,000 lines on stderr. The report now lists at most 20 rows of each kind (ordinary, flagged money-only, so flagged rows never hide behind ordinary ones) and counts the rest; the summary line keeps the full counts. - An --existing ledger with parse or include errors was used silently, so duplicates in the part that failed to load were re-imported without a word. extract now warns, naming the first error. - Pin that CRLF CSVs yield clean ^csv- links. Refs #2421 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr
…tiset # Conflicts: # CHANGELOG.md
…epeats - A `transaction_id_column` the header lacks failed every row with the same context-free warning, then reported "no transactions were extracted". It now fails once: `transaction_id_column "Id" is not a column of this file (its columns: ...)`. - Ids repeating within one statement (a category or date column picked by mistake) made id dedup match an equal-money row on any date. One warning now names how many ids repeat, with an example and its rows. Refs #2387 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr
…tiset # Conflicts: # CHANGELOG.md
- An index past the last column failed every row with a context-free warning; it is now one error naming the key and the column count. - A name differing from a header only in case or surrounding spaces gets a "did you mean" hint. - The same column as one the importer already reads (`amount_column`, `date_column`, ...) is refused: those values are not unique per transaction, and id dedup trusts an equal id with equal money as the same transaction on any date. Refs #2387 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr
Followed literally, the Monzo `transaction_id_column` example had no account, currency or columns, so it failed on the date and never produced the output shown; it is now a complete entry whose output matches the doc byte for byte. The CSV Options block repeated `date_column` and `amount_column`, a TOML error when copied; the name-based alternatives are commented out. Refs #2387 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr
… to date - The roadmap row for stable source ids still described dedup as keyed on first-posting amount and fuzzy text, and proposed consuming ids as remaining work; it now records what shipped and what remains (an id convention for WASM importers, #2251). - The CHANGELOG performance entry quoted 1.6 s / 1.8 s from before the review rounds; re-measured: 0.76 s (import alone 0.43 s), 0.37 s for a full re-import, 101 s for main on an idle machine. - import-architecture.md now says an id match needs the same money. - Runnable doctests for `find_import_duplicates` and `id_link`, and the component test asserts each `session.dedup` claim in the WIT doc (multiset, commodity scope, id link with equal money). Refs #2421 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr
The existing-ledger loader doc named `first_posting_amount`, a function that no longer exists, and the dedup module doc and the component's `SessionState::dedup` doc described an id-link match without the same-money condition. Refs #2421 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr
What changed
rledger extract --existingnow uses a new matcher,rustledger_ops::dedup::find_import_duplicates, in place of the per-rowis_duplicatecheck. The CSV importer also gains atransaction_id_column.Correctness (#2421)
^ofx-<FITID>links^ofx-…,^csv-…) with the same account, commodity and amount is a duplicate whatever the date or text say. The amount check stops a sanitizer collision (a banda:bboth becomecsv-a-b) from dropping a different transaction. Different ids in the same namespace mean two transactions, however alike they look. When only one side has an id (a ledger imported before ids existed), the text decides. Namespaces are separate, so an OFX id and a CSV id never contradict each othermainre-imported it. A new row that never posts to the configured account (a WASM importer may post elsewhere) falls back to the first-posting key instead of escaping dedupFiltered N duplicate transaction(s)... and N morefor the rest). A partly broken--existingledger gets a warningThe #2421 reproduction, on
mainand on this branch:Performance (#2422)
Existing keys are computed once and bucketed by
(date, account, commodity, normalized amount). Id links go in their own index. Text is compared only within a bucket.Synthetic input: 50,000 CSV rows against a 50,000-transaction ledger on 336 shared dates (generator in the session scratch dir), release builds. The final numbers below were measured at this PR's final head, on an idle machine:
main--existing--existing, 8 accidental dups--existing, every row a duplicateBoth binaries write byte-identical output for the 50k × 50k run.
CSV transaction ids (#2387)
transaction_id_column = "Transaction ID"in animporters.tomlentry adds^csv-<id>to each transaction. It goes through the same sanitizer as OFX's^ofx-<FITID>, which now lives inrustledger_ops::dedup::id_linknext to the prefixes dedup recognizes, so the convention has one source. A blank cell adds no link. Misconfiguration fails once, up front, with a message naming the key: a column the file lacks (with a hint for a case or whitespace near-miss), an index past the last column, or a column the importer already reads asamount_column,date_columnand so on. Ids that repeat within one statement get a warning. It is documented indocs/commands/extract.mdanddocs/guides/importing.md. I added no CLI flag, since the issue asks for the config key.API / component
rustledger_ops::dedup::is_duplicateis removed. A per-transaction "does it match any?" check is the set semantics that caused extract --existing silently drops legitimate repeated transactions (ignores multiplicity, account, currency and ids) #2421.find_fuzzy_duplicateskeeps its signature and now runs the same matcher unscoped (first posting's account + commodity + amount, multiset, id links).session.dedupusesfind_fuzzy_duplicates, so its verdicts change in the same way. Because that is a contract change, the component moves to 3.13.0 (world.witpackage plusAPI_VERSION). This follows fix(loader)!: read account-name options as leaves under a root, as beancount does #2415, which bumped for a purely semantic change. The WIT doc says what changed, and the CHANGELOG lists it under Breaking. The only consumers are this repo's parity tests: rustfava deduplicates through beangulp'simporter.deduplicate, notsession.dedup, and the MCP server does not call it.ImporterEntryandCsvConfiggained atransaction_id_columnfield.rustledger-ffi-wasi/fuzz,rustledger-loader/fuzz) are refreshed for the newrustc-hashdependency ofrustledger-ops. They also pick upbigdecimal/smallvecentries that were already missing onmain.Decisions (approved by @robcohen)
session.dedupsemantics change.rustledger_ops::dedup::is_duplicateis removed, not deprecated.Identical empty text is a match
If neither the new row nor the existing entry has a payee or narration, they match on account, commodity, date and amount alone. Without this, a statement with no description column is duplicated in full on every re-import, which is what
maindoes. The cost is that two genuinely different description-less rows on one day for one amount, with one already booked, import as one.Each such skip is reported as
AmountOnly, counted separately in the summary and flagged on its own stderr line. The report lists at most 20 rows of each kind (ordinary skips and flagged skips) and counts the rest. A full 50k re-import prints 22 lines instead of 50,000:A row with text on only one side is never a match.
Scaling and memory
Release builds, load average about 3–9, synthetic input with 336 distinct dates (measured in review pass 3; pass 8 reproduced these to within ±0.03 s):
--existingtime--existingAt 4× the input, the dedup work (the time on top of extract alone) grows from about 0.3 s to 1.7 s, roughly 5.5×. That is near-linear: the sort is n log n, and buckets get bigger because the date count is fixed at 336. Memory on top of extract is +16 MB at 50k and +25 MB at 200k.
mainat 200k × 200k would take hours, since it is quadratic, so I did not run it.Text matching vs
mainThe text rules are unchanged from
main, apart from empty text and the order independence above. I ran both binaries on these cases and their verdicts were identical:COFFEE SHOP 1234vsCoffee Shop)Text is not Unicode-normalized, so an NFD
édiffers from an NFCé. That gap exists inmainas well. Its failure mode is a visible duplicate, not a silent drop. It is documented in the guide, and I'm proposing a follow-up for it because the fix needs a new dependency (unicode-normalization).How tested
All counts are at the final head, run on a target dir used only by this worktree.
cargo test -p rustledger-ops -p rustledger-importer -p rustledger-ffi-component -p rustledger --all-features: 1317 tests pass across 40 test binaries, including the doctests.Property tests in
crates/rustledger-ops/tests/import_dedup_properties.rs:They found two bugs, both now fixed: a statement with no description column re-imported every row, and file order decided which row survived the fuzzy pass.
Gated parity suite against a freshly built debug wasip2 component: 27 tests pass. The component's own test asserts each
session.dedupclaim in the WIT doc.Fail without the fix: I ran 18 mutations covering every rule in this PR through a harness. For each one it asserts the exact replacement count, checks the file changed, requires
Compilinglines as proof of a rebuild, totals everytest result:line, and restores the files byte for byte. Every mutation applied and failed at least one test. The baseline is 892 tests with 0 failed; per mutation, between 1 and 10 tests fail. The full table is in the review comment.cargo clippy --workspace --all-features --all-targets -D warningsandcargo doc -D warningsfor the changed crates are clean.Merging
#2497 has merged into
main, andmainis merged into this branch. This PR and #2498 merge in either order. The only conflict is inCHANGELOG.md, where both add a bullet at the top of the same section; keep both. On the combined tree, a CSV entry with nocurrencytakes EUR from theopendirective, and dedup compares in EUR. #2498'sthe_resolved_currency_is_what_dedup_compareschecks this: it fails on the combined tree when the old USD fallback is restored.Closes #2421
Closes #2422
Closes #2387
🤖 Generated with Claude Code
https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr