FAILURE MAP
← Case archive

FA-60187 / Inventory cost layering / Member archive

Negative inventory provisional costing: provisional issue cost · case 02

Issues that run stock negative report only the cost of units actually on hand.

Member previewVariant 2 · 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": [], "layers": [[3, 47]], "results": [0, 80, 21]}{"backorder": [], "layers": [[3, 47]], "results": [0, 200, 21]}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 ↗