FA-60059 / Inventory cost layering / Member archive
Dollar-value LIFO layering: no-change year · case 04
A year with no real inventory change adds an empty zero-dollar layer.
Case contract
Input {layers:[[year, base_dollars, index_bp]] oldest first, year, ending_current_cost, index (bp, 10000 = base year)}. Ending base dollars = round-half-up(current cost*10000/index). An increase over the prior base total adds one layer at the current index; a decrease strips base dollars from the newest layers first, removing layers that reach zero. LIFO value = sum of round-half-up(base*index/10000) per layer. Return {end_base, layers, lifo_value}.
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 |
|---|---|---|---|
| unchanged base | {"end_base": 8000, "layers": [[2020, 8000, 10000], [2021, 0, 11000]], "lifo_value": 8000} | {"end_base": 8000, "layers": [[2020, 8000, 10000]], "lifo_value": 8000} | 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 ↗