FA-60222 / Inventory cost layering / Member archive
LIFO reserve roll-forward: prior reserve roll · case 02
Every year after the first reports the cumulative change since the opening balance.
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 fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| rising reserve | [{"change": 498, "deferral": 273, "fifo_cogs": 19502, "flag": "build", "reserve": 1298}, {"change": 800, "deferral": 336, "fifo_cogs": 20200, "flag": "build", "reserve": 1600}] | [{"change": 498, "deferral": 273, "fifo_cogs": 19502, "flag": "build", "reserve": 1298}, {"change": 302, "deferral": 336, "fifo_cogs": 20698, "flag": "build", "reserve": 1600}] | 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 ↗