FAILURE MAP
← Case archive

FA-60023 / Inventory cost layering / Member archive

Retail inventory method estimate: ratio rounding stage · case 03

Ending cost drifts by several cents from the exact ratio result.

Member previewVariant 3 · 3 implementations · 8 checks per implementation

Case contract

Input totals for a period. Cost pool = begin_cost + purch_cost + freight_in - returns_cost. Retail pool = begin_retail + purch_retail - returns_retail + markups - markup_cancel. Net markdowns = markdowns - markdown_cancel. The conventional (LCM) ratio uses the retail pool before markdowns; the cost method ratio deducts net markdowns. Ending retail = retail pool - net markdowns - sales - employee_discounts. Ending cost = round-half-up(ending retail * cost pool / ratio denominator). Return {ratio_bp (rounded half up), ending_retail, ending_cost}.

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
cost method{"ending_cost": 10142, "ending_retail": 16470, "ratio_bp": 6158}{"ending_cost": 10143, "ending_retail": 16470, "ratio_bp": 6158}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 ↗