P3: the cash flow statement by ASC 230 (defect 1, D-35, D-42)
check / check (push) Canceled after 0s

Direct method with the operating reconciliation and noncash schedules; it
foots by construction (Lean and Kani). Every non-cash account belongs to
one section; reversals net; a member or lender paying for the company is
cash borrowed and spent (D-42, constructive receipt and disbursement);
property a member contributes stays noncash. The bookspec seed: one loader
checks every example.

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 09:35:32 -06:00
1 parent 2c29d48ab9
commit eb4329bb2a
64 files changed
+12128 -1567

No files matched your search

+23
View File
@@ -397,6 +397,29 @@ pub enum LedgerError {
end: String,
},
/// The statement of cash flows would not foot (rules.md B-14 rule 9):
/// an engine error, never output. It cannot happen on balanced books
/// (Lean `cashflow_sections_sum_to_cash_change`); if it does, the
/// engine is wrong, and nothing is shown rather than a wrong figure.
#[error(
"engine error: the cash flow statement does not foot ({what}: {found} against {expected}); nothing was produced, please report it"
)]
CashFlowDoesNotFoot {
/// Which check failed: "sections", "investing lines", "operating
/// reconciliation", "entry #N", ...
what: String,
/// The figure it should equal.
expected: Decimal,
/// The figure it came to.
found: Decimal,
},
/// The cash flow statement's account roles (cash, financing, investing)
/// contradict each other or the chart (rules.md B-14 rule 2). The text
/// names the setting and says what to change.
#[error("cash flow account roles: {0}")]
CashFlowRoles(String),
/// The referenced accounting period does not exist.
#[error("unknown period id {0}")]
UnknownPeriod(u64),