FAILURE MAP
← Case archive

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

Period closing entries: oci routing · case 04

Unrealized OCI movements show up in net income.

Member previewVariant 4 · 3 implementations · 7 checks per implementation

Case contract

x = {'accounts': {name: [type, normal-signed balance]}, 'retained': opening retained earnings, 'aoci': opening accumulated OCI}. Temporary types are revenue, contra_revenue, expense, gain, loss, dividend and oci. Income summary = revenue - contra_revenue + gain - expense - loss and is net income. Retained earnings close = opening + net income - dividends. OCI closes to AOCI, never to income or retained earnings. 'closed' lists temporary accounts with a nonzero balance (including abnormal negative ones), sorted. Return {'net_income', 'retained', 'aoci', '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 fixture

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

Boundary fixtureActualExpectedOutcome
regression: oci routing{"aoci": 1500, "closed": ["expe_2", "loss_3", "loss_5", "oci_0"], "net_income": -3150, "retained": -3650}{"aoci": 1500, "closed": ["expe_2", "loss_3", "loss_5", "oci_0"], "net_income": -4350, "retained": -4850}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 ↗