FAILURE MAP
← Case archive

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

Trial balance columns: abnormal list ordering · case 03

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

Member previewVariant 3 · 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": ["2100", "7200", "6", "99", "205"], "balanced": false, "rows": [["6", 0, 984], ["99", 0, 1234], ["101", 0, 1234], ["205", 0, 1], ["2100", 0, 4900], ["4000", 0, 4750], ["7200", 4900, 0]], "totals": [4900, 13103]}{"abnormal": ["6", "99", "205", "2100", "7200"], "balanced": false, "rows": [["6", 0, 984], ["99", 0, 1234], ["101", 0, 1234], ["205", 0, 1], ["2100", 0, 4900], ["4000", 0, 4750], ["7200", 4900, 0]], "totals": [4900, 13103]}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 ↗