FAILURE MAP
← Case archive

FA-57902 / Double-entry ledger accounting / Member archive

Trial balance columns: abnormal list ordering · case 02

The abnormal-balance list follows input order instead of chart order.

Member previewVariant 2 · 3 implementations · 7 checks per implementation

Case contract

x = [[account_code (digit string), type, total_debits, total_credits], ...]. Net = debits - credits. Zero-net accounts are omitted. A positive net goes in the debit column, a negative net (as a positive number) in the credit column. Rows are ordered by numeric account code. An account is abnormal when its column differs from its normal side (asset, expense, dividend debit-normal; others credit-normal). Return {'rows': [[code, debit, credit]], 'totals': [debits, credits], 'balanced': totals equal exactly, 'abnormal': codes in numeric order}.

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 fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
regression: abnormal list ordering{"abnormal": ["150", "4000", "99", "101"], "balanced": false, "rows": [["99", 800, 0], ["101", 1, 0], ["150", 4750, 0], ["2100", 984, 0], ["4000", 0, 984]], "totals": [6535, 984]}{"abnormal": ["99", "101", "150", "4000"], "balanced": false, "rows": [["99", 800, 0], ["101", 1, 0], ["150", 4750, 0], ["2100", 984, 0], ["4000", 0, 984]], "totals": [6535, 984]}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 ↗