FAILURE MAP
← Case archive

FA-60235 / Inventory cost layering / Member archive

LIFO reserve roll-forward: decline flag boundary · case 05

A year with an unchanged reserve is flagged as a LIFO decline.

Member previewVariant 5 · 3 implementations · 7 checks per implementation

Case contract

Input {begin:[fifo,lifo], years:[[fifo_end,lifo_end]], lifo_cogs:[per year], tax_bp}. Reserve = FIFO - LIFO. Each year: change = reserve_end - prior year reserve; FIFO-basis COGS = LIFO COGS - change; a year is flagged "decline" when change < 0; cumulative tax deferral = round-half-up(reserve_end*tax_bp/10000). Return list of {reserve, change, fifo_cogs, flag, deferral}.

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
flat year[{"change": 0, "deferral": 300, "fifo_cogs": 9000, "flag": "decline", "reserve": 1000}, {"change": 0, "deferral": 300, "fifo_cogs": 9100, "flag": "decline", "reserve": 1000}][{"change": 0, "deferral": 300, "fifo_cogs": 9000, "flag": "build", "reserve": 1000}, {"change": 0, "deferral": 300, "fifo_cogs": 9100, "flag": "build", "reserve": 1000}]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 ↗