FA-60169 / Inventory cost layering / Member archive
Negative inventory provisional costing: provisional cost source · case 04
Backordered issues are always costed at the item default even after real receipts established a price.
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 fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| backorder settled | {"backorder": [], "layers": [[3, 49]], "results": [0, 230, -3]} | {"backorder": [], "layers": [[3, 49]], "results": [0, 200, 27]} | 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 ↗