I reviewed `export_job.py`. The structure is good, but two things need fixing before tomorrow's merge, and both are small. The query, the CSV writing and the upload are each in their own short function, the SQL is parameterized, and the connection is always closed. The two problems are about how the job behaves in production, not how it's built.

## Must fix before merge

**1. A failed export looks like a success** (`export_job.py:56-57`)
The `except` logs the error and then `run()` returns normally, so the process exits with code 0.
- **Example:** the finance endpoint returns a 503 at 02:00. `raise_for_status()` raises, you get one `export failed: 503 ...` log line, and the process exits 0. Cron and any monitoring see a success. Finance gets no file and nobody is alerted.
- **Expected:** a non-zero exit, with a stack trace in the log.
- **Fix:** use `log.exception("export failed for %s", day)` and then `raise`, or drop the `except` and keep only the `finally`.

**2. Every customer's email address goes into the logs** (`export_job.py:52`)
`[row[1] for row in rows]` logs the `customer_email` of every paid invoice, every night, at INFO level. That puts personal data into log storage, which usually has wider access and longer retention than the database. Log the count and the day only.

**3. The upload has no timeout** (`export_job.py:42`)
If the finance endpoint accepts the connection but never answers, `requests.post` waits forever. The cron job then hangs and the next night's run can overlap it. Add `timeout=(10, 120)` or whatever fits the file size.

## Worth doing, but they don't block the merge

- **Tests only cover the happy path.** `test_export_job.py` checks the CSV header and one row. A test where `upload` raises, asserting that `run()` raises too, would have caught issue 1 and keeps it from coming back. A test for zero invoices would also help.
- **How amounts are written.** `amount_cents / 100` turns 1000 cents into `10.0`, not `10.00`. It also assumes every currency has two decimal places: JPY has none, KWD has three. If finance's import expects a fixed format, use `Decimal(amount_cents) / 100` with explicit formatting. Check what they expect.
- **Which day counts as "yesterday."** `date.today()` uses the server's local timezone. The `paid_at` comparison uses the Postgres session's timezone. If these differ from the timezone finance means by "yesterday", invoices near midnight end up in the wrong file. A one-line check of the server and database timezone settings would settle this.
- **`UPLOAD_URL` is read when the module is imported** (line 16). Importing the module without that environment variable, for example in tests, fails with a `KeyError`. Reading it inside `upload()` or `run()` avoids that.
- **No way to re-run a specific day.** If a night fails, you can't regenerate that day's file. An optional date argument to `run(day=None)` would make recovery easy.

Fixing items 1–3 takes a few lines, and one failure-path test would lock in the fix for item 1. With those in, I'd be comfortable merging this tomorrow.

VERDICT: READY WITH CHANGES
