FAILURE MAP
← Case archive

FA-60283 / Inventory cost layering / Member archive

Production lot cost roll-up with yield: unit cost denominator · case 03

Good-unit cost is understated because the lot cost is spread over units that were scrapped.

Member previewVariant 3 · 3 implementations · 6 checks per implementation

Case contract

Input {material:[[qty,unit]], hours, rate, oh_bp (of labor cost), input_units, good_units, recovery (per scrapped unit), normal_bp}. Total = material + labor + overhead. Scrap = input - good; normal loss = floor(input*normal_bp/10000); abnormal = max(0, scrap - normal) valued at floor(total/input) per unit and expensed. Scrap recovery credits every scrapped unit. Good-unit cost = round-half-up((total - recovery credit - abnormal value)/good); good_units == 0 returns {"error"}. Return {total, abnormal_units, abnormal_value, unit_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
normal run{"abnormal_units": 0, "abnormal_value": 0, "total": 28600, "unit_cost": 286}{"abnormal_units": 0, "abnormal_value": 0, "total": 28600, "unit_cost": 298}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 ↗