Claude Fable 5.1 on Reconcile a trapped quarter ledger
Passed in 22s. Attempt 2. Run 20260904T131244Z-fable-5-1-ledger-reconcile-trap-2.
Task
Reconcile the quarter ledger
Read invoices.csv, processor_payouts.csv, bank.csv, and rates.csv. Write report.json:
{
"unpaid_invoice_ids": ["INV-1001"],
"unreconciled_total_usd": 1234.56,
"duplicate_invoice_ids": ["INV-1002"],
"eur_invoice_ids": ["INV-1003"]
}
An issued invoice is unpaid when its successful charge rows total less than its invoice amount
in that currency. Do not count fee or refund rows as payment. Exclude invoices marked
refunded and any duplicated invoice id from the unpaid list because its canonical amount is
unknown. A duplicate means the same invoice id appears more than once, even when amounts differ.
For reconciliation, convert every processor row to USD at the supplied currency rate, then sum
by payout_id. Compare that expected total with the sum of bank rows whose kind is
processor_deposit and has the same payout id. Ignore other bank activity. The unreconciled
total is the sum of each payout id's absolute expected-versus-observed difference across the
union of processor and bank payout ids, rounded to cents only at the end.
List every invoice whose invoice currency is EUR. Sort all id lists.
Command
claude -p --model claude-fable-5-1 --dangerously-skip-permissions --output-format text 'You are working in the current folder. Do the task in TASK.md and write the outputs to the exact paths it names.
Do not ask questions. When done, stop.
# Reconcile the quarter ledger
Read `invoices.csv`, `processor_payouts.csv`, `bank.csv`, and `rates.csv`. Write `report.json`:
` ` `json
{
"unpaid_invoice_ids": ["INV-1001"],
"unreconciled_total_usd": 1234.56,
"duplicate_invoice_ids": ["INV-1002"],
"eur_invoice_ids": ["INV-1003"]
}
` ` `
An issued invoice is unpaid when its successful `charge` rows total less than its invoice amount
in that currency. Do not count `fee` or `refund` rows as payment. Exclude invoices marked
`refunded` and any duplicated invoice id from the unpaid list because its canonical amount is
unknown. A duplicate means the same invoice id appears more than once, even when amounts differ.
For reconciliation, convert every processor row to USD at the supplied currency rate, then sum
by `payout_id`. Compare that expected total with the sum of bank rows whose `kind` is
`processor_deposit` and has the same payout id. Ignore other bank activity. The unreconciled
total is the sum of each payout id'"'"'s absolute expected-versus-observed difference across the
union of processor and bank payout ids, rounded to cents only at the end.
List every invoice whose invoice currency is EUR. Sort all id lists.'
Output
Done. The report is written to `report.json` in the working folder.
Three invoices are unpaid. Two never got a charge at all, and one was only half paid.
One invoice id shows up twice in the invoice file, so I left it out of the unpaid list as the task asked. Two invoices are billed in euros.
The bank and processor disagree by about 869 dollars. One payout never reached the bank, one deposit has no matching payout, and one payout came in short.
One note on the rules: the processor file has no status column, so I treated every charge row as successful.
`cat report.json`
Files produced
report.json
{
"unpaid_invoice_ids": [
"INV-1017",
"INV-1064",
"INV-1088"
],
"unreconciled_total_usd": 868.75,
"duplicate_invoice_ids": [
"INV-1042"
],
"eur_invoice_ids": [
"INV-1033",
"INV-1099"
]
}
Checker
{"passed": true, "score": 1.0, "notes": "all four fields exact"}
Judge
Not used for this task.