FAILURE MAP
← Case archive

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

Trial balance columns: abnormal balance flag · case 02

Every liability and revenue account is flagged as abnormal.

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 balance flag{"abnormal": ["205", "2100"], "balanced": false, "rows": [["30", 1, 0], ["205", 0, 1], ["2100", 0, 1]], "totals": [1, 2]}{"abnormal": ["2100"], "balanced": false, "rows": [["30", 1, 0], ["205", 0, 1], ["2100", 0, 1]], "totals": [1, 2]}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 ↗