FA-58055 / Double-entry ledger accounting / Member archive
Posting period lock: roll target choice · case 05
Rolled entries skip ahead to the last open period of the year.
Case contract
x = {'periods': [[start_day, end_day, 'open'|'soft'|'closed']] (non-overlapping, any order), 'policy': 'reject'|'roll', 'entries': [[id, day, adjusting]]}. The period containing the day (start and end inclusive) is found; none gives [id, None, 'no_period']. Soft periods accept adjusting entries only. Open acceptance gives [id, day, 'posted']. Otherwise under 'roll' the entry posts on the start day of the earliest later open period ([id, start, 'rolled']) and with none, or under 'reject', gives [id, None, 'closed'].
Why this case matters
Ledger software must keep debits equal to credits and apply normal-balance, period and cutoff rules exactly; small sign or boundary slips silently misstate financial statements.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: roll target choice | [["E0", 95, "posted"], ["E1", 95, "rolled"], ["E2", 94, "posted"]] | [["E0", 95, "posted"], ["E1", 67, "rolled"], ["E2", 94, "posted"]] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗