FAILURE MAP
← Case archive

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

Straight-line depreciation journal: first charge month · case 03

Mid-month assets start depreciating a month late.

Member previewVariant 3 · 3 implementations · 7 checks per implementation

Case contract

x = {'cost', 'salvage', 'life_months', 'start_month', 'convention': 'full_month'|'mid_month'|'next_month', 'through': last month to post}. Depreciable base = cost - salvage. The first charge month is start_month (start_month + 1 for next_month). Charges use cumulative rounding: target accumulated after the j-th charge month is round(base*j/life) or, for mid_month, round(base*(2j-1)/(2*life)), half-up and capped at base; each month posts target - accumulated. Posting stops after 'through' or once accumulated reaches base. Return {'schedule': [[month, amount]], 'accumulated', 'book_value': cost - accumulated}.

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: first charge month{"accumulated": 120000, "book_value": 0, "schedule": [[4, 1667], [5, 3333], [6, 3333], [7, 3334], [8, 3333], [9, 3333], [10, 3334], [11, 3333], [12, 3333], [13, 3334], [14, 3333], [15, 3333], [16, 3334], [17, 3333], [18, 3333], [19, 3334], [20, 3333], [21, 3333], [22, 3334], [23, 3333], [24, 3333], [25, 3334], [26, 3333], [27, 3333], [28, 3334], [29, 3333], [30, 3333], [31, 3334], [32, 3333], [33, 3333], [34, 3334], [35, 3333], [36, 3333], [37, 3334], [38, 3333], [39, 3333], [40, 1667]]}{"accumulated": 120000, "book_value": 0, "schedule": [[3, 1667], [4, 3333], [5, 3333], [6, 3334], [7, 3333], [8, 3333], [9, 3334], [10, 3333], [11, 3333], [12, 3334], [13, 3333], [14, 3333], [15, 3334], [16, 3333], [17, 3333], [18, 3334], [19, 3333], [20, 3333], [21, 3334], [22, 3333], [23, 3333], [24, 3334], [25, 3333], [26, 3333], [27, 3334], [28, 3333], [29, 3333], [30, 3334], [31, 3333], [32, 3333], [33, 3334], [34, 3333], [35, 3333], [36, 3334], [37, 3333], [38, 3333], [39, 1667]]}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 ↗