FAILURE MAP
← Case archive

FA-60173 / Inventory cost layering / Member archive

Negative inventory provisional costing: backorder settlement priority · case 03

Receipts rebuild positive stock while the negative balance stays outstanding forever.

Member previewVariant 3 · 3 implementations · 7 checks per implementation

Case contract

Events: receipts ["recv",qty,cost] and issues ["issue",qty]. Issues draw FIFO layers; any shortfall is issued provisionally at the last receipt cost (default_cost before any receipt) and queued as a backorder. A receipt first settles backorders oldest first, returning the true-up qty*(receipt cost - provisional cost); only the remainder becomes a layer. Return {results, layers, backorder}.

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
backorder settled{"backorder": [[3, 40]], "layers": [[6, 48]], "results": [0, 200, 0]}{"backorder": [], "layers": [[3, 48]], "results": [0, 200, 24]}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 ↗