Skip to content

Value a cash-and-carry's month-end stock on FIFO with case units, same-day ordering, supplier returns and write-downs

Exact prompt

# Value a cash-and-carry's stock at month end on first-in, first-out Inputs: `movements.csv` (line, date, sku, type, qty, unit, unit_cost), `items.json` (per sku: case_size, nrv_each) and `stock-note.txt`. Amounts are in pounds. `items.json` and these rules are the record; where the stock note disagrees, the rules win. Rules: - A qty with unit case is qty x case_size single units, whatever the movement type; a receipt's unit_cost is per unit given (per case for case receipts). - Process movements by date; on the same date, receipts come first, then supplier returns, then issues, then adjustments (ties by line). - Each receipt is a cost layer. Issues and negative adjustments use up the oldest layers first; only issues count toward cost of goods sold. - A supplier return takes units back out of the newest layer first. A positive adjustment adds a layer at the newest layer's unit cost. - At month end, if a sku's remaining cost is more than its units x nrv_each, it is written down to that amount; the write-down is the difference. - Write `out/stock.json`: `{"closing_qty": {"<sku>": <units>, ...}, "closing_value": {"<sku>": <value after any write-down>, ...}, "writedowns": {"<sku>": <amount>, ...}, "cogs": {"<sku>": <cost of goods sold>, ...}, "total_value": <sum of closing_value>}` with every sku in each map except `writedowns` (only amounts above 0); round each money figure half-up to 0.01 once, at the end. ## How this run works - Work on your own: nobody will answer questions in this task, and writing to `ask/` counts against the run. - Write only under `out/`. Create `out/` if it is missing. Inputs are synthetic; don't fetch anything from the network. - Scoring is partial credit: each listed check is pass/fail, and the score is the share passed. Numbers are compared to within 0.005 unless the task says otherwise.

Value each product's closing stock and cost of goods sold from a month of movements on first-in, first-out. Quantities come in cases and singles, receipts and issues share dates and appear out of order in the file, supplier returns come back out of the newest layer, stock-take adjustments add or remove units, and some products must be written down to net realisable value. A stock note gets the unit, return and write-down rules wrong. Original benchmark task written for usecaserank.com (not based on a specific public post). Headless, offline run on a reproducible fixture. Each run's notes say how its cost was measured (estimates are marked).

Success criteria: units fifo_cogs same_day_and_returns writedowns totals

Best model for this task so far: Claude Haiku 5.5 (effort default (no --effort flag) · thinking on) (success, $0.0055, 23s).

Run this on another model

All runs (3)

100% pass rate across 3 eligible runs: 3 pass, 0 partial, 0 fail. Partial and failed runs are listed below with everything else.ⓘ

Runs for this use case
ModelCostTimeStep-insⓘAutonomyOutcomeTrustⓘDateCompare
AClaude Opus 5.5default · thinking on$0.1420s0Fully autonomouspassTrust 80%2026-10-23
AClaude Haiku 5.5default · thinking on$0.005523s0Fully autonomouspassTrust 80%2026-10-23
AClaude Sonnet 5.5default · thinking on$0.0620s0Fully autonomouspassTrust 80%2026-10-23

Embed this result

A live badge for this use case. It links back here and updates as new runs are published.

UseCaseRank badge for Value a cash-and-carry's month-end stock on FIFO with case units, same-day ordering, supplier returns and write-downs

Get new runs and ranking changes weekly

Which models got better or cheaper on real tasks like this one.