Three spec decisions from Stephen (2026-10-13), raised by the spec-blind
test writers, each test-first:
- A payment dated before its invoice or bill is refused
(PaymentBeforeDocument); a real prepayment is a deposit. Test:
a_payment_never_predates_its_document. Replay is unaffected (it goes
through replay_invoice_payment / replay_bill_payment).
- Aging as of a date shows only documents issued by then, less only the
payments made by then. The ledger now records each document's payment
entries (live and on replay), and aging counts those dated by as_of.
Test: aging_as_of_a_date_sees_only_what_existed_then; the A/R and A/P
conservation properties' aging oracles updated to the confirmed rule
(they had assumed aging ignored dates).
- A schedule through a mid-month date prorates that month by days; the
code was right and its doc wrong. The spec-blind test that disagreed is
rewritten to the confirmed spec and no longer ignored.
Also found while wiring payments: a payment to an unknown cash account
created the payment's draft and then failed, leaving it behind; the cash
account is now checked before anything is created.
The unreviewed golden van_schedule.json is gone: every row was first
checked against an independent hand computation (all 61 matched), then
replaced by van_schedule_is_the_hand_computed_one, which asserts that
computation directly (548.39, 59 x 1,000.00, 451.61; total 60,000.00).
Tests: 452. No spec-disagreements left ignored.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GWVo7x3UHw5kwCUaWxiejX