**Not ready to merge as it stands, but the three blocking fixes are small and tomorrow is still realistic.** The core logic (query, CSV, upload) is clear and well laid out. The blockers are in how the job fails and what it logs.

I only read `export_job.py`. I did not open `test_export_job.py`, so test coverage is judged from the docstring, and nothing was run.

## Must fix before merge

1. **A failed export looks like a success (high).** `run()` catches every exception, logs one line and exits with code 0 (`export_job.py:56-57`).
   - Case: the finance endpoint returns 503 at 02:00. Cron records success, nobody is alerted, and finance has no file.
   - Expected: non-zero exit with a traceback.
   - Fix: use `log.exception(...)` and re-raise, or drop the `except`.

2. **Customer emails are written to the log (high).** Line 52 logs every `customer_email` for the day in one line.
   - Case: 5,000 paid invoices produce one log line holding 5,000 email addresses.
   - Fix: log the count and the day only.

3. **The upload can hang forever (high).** `requests.post` has no `timeout` (`export_job.py:42`).
   - Case: the finance endpoint accepts the connection and never responds. The job never ends, holds its database connection open, and the next night's run piles on top.
   - Fix: add `timeout=(10, 120)` or similar.

4. **Logging is never configured (medium).** No handler is set up, so as a cron script the `log.info` lines print nothing; only the error line reaches stderr.
   - Consequence: there is no record of a successful run. It also hides item 2 today: the emails start leaking the moment someone adds `logging.basicConfig(level=INFO)`.

5. **Tests cover only the CSV header and one row (medium).** Nothing tests the date window, the upload or the failure path, which is where items 1 and 3 are. I'd add at least:
   - a failed upload makes `run()` fail;
   - `fetch_invoices` passes the window `[day, day+1)`;
   - the log contains no emails.

## Should fix, can follow shortly after

6. **A missed day cannot be re-exported (medium).** The day is hardcoded to yesterday (`export_job.py:47`). If the 12 November run fails, the only way to export it is to edit the code. Accept an optional date argument.

7. **Importing the module needs `FINANCE_UPLOAD_URL` (low-medium).** It is read at import time (`export_job.py:16`), so any test or tool that imports the file without it gets a `KeyError`. Read it inside `upload()` or `run()`.

8. **Amounts are formatted inconsistently (low).** `amount_cents / 100` writes 1000 cents as `10.0` and 1050 as `10.5`, where finance likely expects `10.00` and `10.50`. Use `f"{amount_cents / 100:.2f}"` or integer arithmetic.

9. **Export files with customer emails accumulate forever (low).** Files in `/var/exports` are never deleted, and the directory is hardcoded and assumed to exist.

10. **All rows are loaded into memory (low).** `fetchall()` is fine at modest volume; it is a risk only if a day reaches hundreds of thousands of invoices.

## Speculative: depends on facts I can't see

- **Timezone.** "Yesterday" comes from the host clock and the window from the database session timezone. If `paid_at` is `timestamptz` and the two differ from finance's business timezone, invoices near midnight land in the wrong day's file.
- **Authentication.** The upload sends no credentials. That is fine if the URL carries a token or the network is private; otherwise it is a gap.
- **Duplicates on rerun.** Whether a second upload for the same day double-counts depends on the finance endpoint.
- **Empty days.** A day with no paid invoices uploads a header-only file. Confirm finance wants that.
- **Spreadsheet formulas.** An email starting with `=` or `+` would be treated as a formula if finance opens the CSV in Excel.
- **Zero-decimal currencies.** Dividing by 100 is wrong for a currency like JPY if `amount_cents` holds whole yen.

VERDICT: NOT READY
