check / check (push) Canceled after 0s
New vendored sources (docs/spec/sources/): Intuit's bank CSV upload and
IIF formats, ECMA-376 / Excel number storage, and the IRS form lines the
tax categories map to.
IIF export (rewritten to Intuit's IIF Import Kit):
- declares every account first (!ACCNT NAME, ACCNTTYPE, ACCNUM): an
undeclared account is created in QuickBooks "as a new bank account";
the MCP export types them (cash accounts BANK, the control accounts AR
and AP, registered fixed assets FIXASSET, the rest by type);
- subaccounts by colon path, parents first; colons in a name replaced;
- ASCII only (IIF is ASCII text), dashes and quotes transliterated;
- the kit's 2007+ journal layout and M/D/YYYY dates; an entry using an
undeclared account is refused.
Bank CSV:
- the 4-column layout is money out then money in by position, which
matches Intuit's "Credit, Debit" and banks' "Debit, Credit" both (the
doc's "Expense, Income" labels were wrong, the parsing was not);
- a slash date's order comes from the file (a part over 12 settles it)
or the caller's new date_order, never a guess: Intuit recommends
dd/mm/yyyy, US banks write mm/dd/yyyy;
- fractions of a cent and double negatives ("(-5)") are refused; the
header is recognized on the first non-blank row.
Chart CSV: a blank code or name is refused with its row (found by the
new fuzz_import_csv target), and the core now refuses a blank account
code or name too (replay keeps older books).
MCP:
- books.import_chart_csv and books.import_bank_csv rehearse the whole
file on a copy of the ledger first: a bad row anywhere refuses the
file (before, a duplicate within the file, a parent after its child,
or a date in a closed period left earlier rows behind);
- bank rules: the longest matching pattern wins (they arrive in a map,
so "first match" changed from run to run).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GWVo7x3UHw5kwCUaWxiejX
77 lines
1.3 KiB
TOML
77 lines
1.3 KiB
TOML
[package]
|
|
name = "ledger-core-fuzz"
|
|
version = "0.0.0"
|
|
publish = false
|
|
edition = "2024"
|
|
|
|
[package.metadata]
|
|
cargo-fuzz = true
|
|
|
|
[dependencies]
|
|
libfuzzer-sys = "0.4"
|
|
arbitrary = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
serde = "1"
|
|
rust_decimal = "1"
|
|
chrono = "0.4"
|
|
|
|
[dependencies.ledger-core]
|
|
path = "../crates/ledger-core"
|
|
|
|
[dependencies.ledger-store]
|
|
path = "../crates/ledger-store"
|
|
|
|
[dependencies.ledger-import]
|
|
path = "../crates/ledger-import"
|
|
|
|
[[bin]]
|
|
name = "fuzz_journal_line"
|
|
path = "fuzz_targets/fuzz_journal_line.rs"
|
|
test = false
|
|
doc = false
|
|
bench = false
|
|
|
|
[[bin]]
|
|
name = "fuzz_entry_validate"
|
|
path = "fuzz_targets/fuzz_entry_validate.rs"
|
|
test = false
|
|
doc = false
|
|
bench = false
|
|
|
|
[[bin]]
|
|
name = "fuzz_op_sequence"
|
|
path = "fuzz_targets/fuzz_op_sequence.rs"
|
|
test = false
|
|
doc = false
|
|
bench = false
|
|
|
|
[workspace]
|
|
|
|
[[bin]]
|
|
name = "fuzz_core_serde"
|
|
path = "fuzz_targets/fuzz_core_serde.rs"
|
|
test = false
|
|
doc = false
|
|
bench = false
|
|
|
|
[[bin]]
|
|
name = "fuzz_store_open"
|
|
path = "fuzz_targets/fuzz_store_open.rs"
|
|
test = false
|
|
doc = false
|
|
bench = false
|
|
|
|
[[bin]]
|
|
name = "fuzz_store_replay"
|
|
path = "fuzz_targets/fuzz_store_replay.rs"
|
|
test = false
|
|
doc = false
|
|
bench = false
|
|
|
|
[[bin]]
|
|
name = "fuzz_import_csv"
|
|
path = "fuzz_targets/fuzz_import_csv.rs"
|
|
test = false
|
|
doc = false
|
|
bench = false
|