merge: the audit checks a close's split at the allocation's unit, and a legacy close by its member count (V-D3)

The audit took a cent for every currency, so a JPY close (split in whole
yen) was checked a hundred times too finely, and a code with no minor
unit too coarsely. The unit now comes from the one helper the split
itself uses. Before the true-up, a last-absorbs close's last member may
carry half a unit for each of the others (BS-partner-1 statement 6), so
the bound is max(u, (n-1)u/2), derived and marked so, not one unit.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude committed 2026-11-09 17:02:26 -07:00
commit abafa94a53
4 files changed
+209 -8

No files matched your search

+16 -3
View File
@@ -519,9 +519,20 @@ INVARIANTS:
rule that posted an entry (its true-up, statement 6; the close
journals its rule and whether it posted), a member's running total
MUST be under one minor unit from its exact share, so a drift of a
unit or more is a finding. Before that true-up the count may still
carry the rounding of closes made under the older rules, so only a
drift beyond one unit is. Closes under the older rules are not read.
unit or more is a finding. The unit is the allocation's own
(`Currency::allocation_unit`, on `allocation_places`: a whole yen
for JPY, the finest a line carries for a code with no minor unit),
never a cent taken separately. Before that true-up the count may
still carry the rounding of closes made under the older rules, so
only a drift beyond B(n) is a finding, where B(n) = max(one unit,
(n-1) half-units) for n members: a unit with three or fewer
members, 1.5 units with four, 2 units with five. B(n) is DERIVED:
BS-partner-1 statement 6 states the per-member facts it comes from
(a last-absorbs close rounded each member but the last to within
half a unit, and the last absorbed up to half a unit for each of
the others; under a unit for each run break and each per-close
close), not the bound itself. Closes under the older rules are not
read.
SCENARIOS:
1. The same books audited twice through one day: one run, one
workpaper; the second call files and journals nothing.
@@ -552,6 +563,8 @@ journal feature `audits`.
(`the_cash_flow_check_says_what_it_found`,
`control_accounts_report_differences_unattached_lines_and_overpaid_documents`,
`a_close_split_drifts_by_the_regime_it_was_made_under`,
`a_jpy_close_is_checked_at_the_allocations_unit`,
`a_legacy_last_absorbs_close_drifts_by_member_count_before_its_true_up`,
`a_count_is_trued_up_by_the_first_cumulative_close_that_posts`,
`a_reversal_without_its_own_receipt_is_info_and_only_when_the_policy_would_cover_it`,
`the_bar_setting_parses_what_it_names_and_refuses_the_rest`,