FA-60250 / Inventory cost layering / Member archive
Layer aging and slow-moving reserve: overflow bucket · case 05
Stock older than the last bound is merged into the last bucket and reserved at its lower rate.
Case contract
Input {layers:[[receipt_day,qty,unit]], today, buckets:[upper age bounds, inclusive], reserve_bp:[rate per bucket incl. overflow]}. Age = today - receipt_day; layers with negative age are in transit and excluded. A layer falls in the first bucket whose bound is >= age, else the overflow bucket. Reserve = sum over buckets of round-half-up(value*bp/10000). Return {values, reserve}.
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 |
|---|---|---|---|
| mixed ages | {"reserve": 32, "values": [110, 0, 126, 0]} | {"reserve": 37, "values": [110, 0, 105, 21]} | 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 ↗