P3: rename accounts, one set of period defaults, tax categories warn or refuse (defects 15, 16, 8)
check / check (push) Canceled after 0s

books.rename_account; account names trimmed, bounded, refused when a
sibling's or TIN-shaped; books.show refuses what its target ignores. A
report asked for without dates covers this fiscal year so far, everywhere
(one rule for tools, descriptions and the viewer; the IIF and CPA package
keep their own dates). policy.require_tax_category warns or refuses; a
Form 4797 gain is shown apart on every return.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T3gXMVt7XJPi6ens1or9Dj
This commit is contained in:
swaitsandClaude Opus 5.5 committed 2026-10-21 10:41:24 -06:00
1 parent 8255ac2103
commit 9ab003d0d1
69 files changed
+8063 -570

No files matched your search

+28
View File
@@ -537,6 +537,34 @@ open_at_start = "ask"
);
}
/// INVARIANT 4 for policy.require_tax_category (rules.md B-32): it is
/// `[books] require_tax_category` in a file, and round-trips; a file
/// without it clears it back to warn.
#[test]
fn the_tax_category_policy_round_trips() {
let file = FERNHILL.replace(
"parties = \"require\"\n",
"parties = \"require\"\nrequire_tax_category = \"required\"\n",
);
let s = imported(&file);
assert_eq!(
s.require_tax_category(),
ledger_core::settings::TaxCategoryPolicy::Refuse
);
let text = export(&s, "USD");
assert!(text.contains("require_tax_category = \"refuse\""), "{text}");
let back = import(&text, None, &s, "USD").unwrap();
assert!(back.changes.is_empty(), "{:?}\n{text}", back.changes);
let cleared = import(FERNHILL, None, &s, "USD").unwrap();
assert_eq!(
cleared.changes,
[Change {
key: "policy.require_tax_category".into(),
value: None
}]
);
}
/// INVARIANT 1: keys the file leaves out are cleared.
#[test]
fn what_the_file_leaves_out_is_cleared() {