FAILURE MAP
← Case archive

FA-60089 / Inventory cost layering / Member archive

First-expired-first-out lot picking: pick quantity cap · case 04

Whole lots are picked even when the order needs only part of the lot.

Member previewVariant 4 · 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
earliest expiry{"cost": 155, "picks": [["L1", 5], ["L3", 5], ["L2", 5]]}{"cost": 80, "picks": [["L1", 5], ["L3", 2]]}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 ↗