FAILURE MAP
← Case archive

FA-59862 / Inventory cost layering / Member archive

FIFO perpetual issue: non-positive receipt filter · case 02

A zero-quantity receipt line creates an empty cost layer that shows up in the valuation report.

Member previewVariant 2 · 3 implementations · 8 checks per implementation

Case contract

Input {layers:[[qty,unit_cost]] oldest first, events:[["recv",qty,unit_cost]|["issue",qty]]}. Issues consume the oldest layer first; an issue larger than on-hand is rejected whole and reported as "short"; a receipt at exactly the newest layer cost merges into it; receipts of zero or negative quantity are ignored. Return {cogs:[per-issue cost or "short"], layers}.

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
zero receipt{"cogs": [50], "layers": [[4, 25], [0, 32]]}{"cogs": [50], "layers": [[4, 25]]}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 ↗