FA-60238 / Inventory cost layering / Member archive
LIFO reserve roll-forward: tax deferral base · case 03
Cumulative tax deferral swings with each year change and can go negative.
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": 497, "deferral": 104, "fifo_cogs": 19503, "flag": "build", "reserve": 1297}, {"change": 303, "deferral": 64, "fifo_cogs": 20697, "flag": "build", "reserve": 1600}] | [{"change": 497, "deferral": 272, "fifo_cogs": 19503, "flag": "build", "reserve": 1297}, {"change": 303, "deferral": 336, "fifo_cogs": 20697, "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 ↗