Repair: totals are wrong for amounts over $999
Monthly totals are off, always by a round number.
Importing a statement gives totals that are too small, and the gap is always a multiple of a thousand dollars. Small purchases add up correctly. A line like
2026-03-02,rent,$1,234.50
shows up in the category breakdown as $1.00. Amounts under a thousand are fine, so this is not the CSV reader dropping rows. Everything in the ledger is stored as integer cents. The repo's own tests in tests/ are failing.
The README spells out the amount formats the bank exports and what the importer expects of parse_amount: refunds come in two spellings, and a malformed amount must be reported, not summed.
Done when
- Amounts with thousands separators parse correctly.
- Every amount format the README lists parses, and a malformed one raises
ValueError, so the importer reports the line instead of summing it. - The category report's format is unchanged and
tests/are untouched.
You have a coding agent with tools to list, read and edit files and run the tests. It has been given the report above, and nothing else: not the README, not what "done" means. Prompt it. It is graded on the repo it leaves behind: the repo's tests, hidden ones, and whether it left tests/ alone, and ranked on model calls.