FAILURE MAP
← Case archive

FA-59895 / Inventory cost layering / Member archive

Periodic LIFO year-end layering: negative count rejection · case 05

A negative physical count is accepted and produces negative layers instead of an error.

Member previewVariant 5 · 3 implementations · 8 checks per implementation

Case contract

Input {begin:[[qty,unit]] oldest first, purchases:[[qty,unit]] chronological, ending_qty}. Ending inventory keeps the oldest units: if ending_qty covers the base, all base layers stay and one increment layer is priced at the EARLIEST purchases of the year; otherwise the newest base layers are liquidated. ending_qty outside [0, available] returns {"error"}. Return {layers:[[qty,value]], ending_value, cogs}.

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
negative ending{"cogs": 18, "ending_value": 0, "layers": []}{"error": "invalid ending quantity"}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 ↗