From 5debaa1be1352cbc2c20e84bdc9d1c43b59c7ad6 Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Tue, 10 Nov 2026 01:55:11 -0700 Subject: [PATCH] docs(core): the legacy close bound is one close's worst case, and says so The audit allows a member's running total (n-1)/2 units of drift, floored at a unit, until the first close under the cumulative rule trues it up. That figure is derived for one last-absorbs close. Books that made several before their first cumulative close can carry more, each close having rounded on its own, and the audit raises it. That is the safe direction (a finding to read, which the next close that posts removes), but the spec block did not say the bound stops at one close. It does now. A comment only: no code changes. Co-Authored-By: Claude --- crates/ledger-core/src/audit.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/ledger-core/src/audit.rs b/crates/ledger-core/src/audit.rs index c570406e..493566e7 100644 --- a/crates/ledger-core/src/audit.rs +++ b/crates/ledger-core/src/audit.rs @@ -524,6 +524,12 @@ fn closes(ledger: &Ledger, through: NaiveDate) -> Vec { /// way reaches it), so the pre-true-up test is strict (> B(n)). /// Once trued up, statement 5's bound is strict the other way: a /// drift of a unit or more is raised (>= u). +/// B(n) is one last-absorbs close's worst case. Books that made +/// several such closes before their first cumulative one can carry +/// more than B(n) legitimately (each close rounds on its own), and +/// the audit raises it: a finding to read that the next close which +/// posts trues up, never a drift passed that one close's bound would +/// have raised. /// ``` pub fn check_split( period: u64,