FA-60064 / Inventory cost layering / Member archive
First-expired-first-out lot picking: remaining shelf-life boundary · case 04
Lots with exactly the minimum remaining shelf life are refused at the dock.
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 fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| shelf boundary | {"cost": 33, "picks": [["B", 3]]} | {"cost": 30, "picks": [["A", 3]]} | 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 ↗