FAILURE MAP
← Case archive

FA-59873 / Inventory cost layering / Member archive

Periodic LIFO year-end layering: increment layer pricing order · case 03

The year-end LIFO increment is valued at the latest purchase prices, overstating ending inventory in inflationary years.

Member previewVariant 3 · 3 implementations · 9 checks per implementation

Case contract

Input {begin:[[qty,unit]] oldest first, purchases:[[qty,unit]] chronological, ending_qty}. Ending inventory keeps the oldest units: if ending_qty covers the base, all base layers stay and one increment layer is priced at the EARLIEST purchases of the year; otherwise the newest base layers are liquidated. ending_qty outside [0, available] returns {"error"}. Return {layers:[[qty,value]], ending_value, cogs}.

Why this case matters

Inventory valuation and cost-of-goods decisions depend on this rule.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
increment layer{"cogs": 102, "ending_value": 110, "layers": [[10, 50], [4, 24], [3, 36]]}{"cogs": 117, "ending_value": 95, "layers": [[10, 50], [4, 24], [3, 21]]}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 ↗