FAILURE MAP
← Case archive

FA-60080 / Inventory cost layering / Member archive

First-expired-first-out lot picking: same-expiry tie-break · case 05

Among lots with the same expiry the pick order is unstable against the stated lot-id rule.

Member previewVariant 5 · 3 implementations · 7 checks per implementation

Case contract

Input {lots:[[lot,qty,expiry_day,unit_cost]], today, order_qty, min_shelf}. A lot is eligible when expiry_day - today >= min_shelf. Eligible lots are picked by earliest expiry, ties by lot id ascending. If eligible stock < order_qty return {"error":"insufficient","available":eligible qty}. Return {picks:[[lot,qty]], cost}.

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
tie by lot{"cost": 23, "picks": [["Z9", 2], ["A1", 1]]}{"cost": 22, "picks": [["A1", 2], ["Z9", 1]]}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 ↗