FAILURE MAP
← Case archive

FA-60043 / Inventory cost layering / Member archive

Dollar-value LIFO layering: liquidation order · case 03

A decline in inventory strips the base-year layer, leaving recent high-priced layers intact.

Member previewVariant 3 · 3 implementations · 8 checks per implementation

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 fixture

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

Boundary fixtureActualExpectedOutcome
partial strip{"end_base": 11003, "layers": [[2020, 9003, 10000], [2021, 2000, 10800]], "lifo_value": 11163}{"end_base": 11003, "layers": [[2020, 10000, 10000], [2021, 1003, 10800]], "lifo_value": 11083}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 ↗