The structure is good: small functions, parameterized SQL, a context-managed cursor, `conn.close()` in a `finally`, and a clear docstring. It needs a few fixes before tomorrow, and the first two matter most. I didn't run the code or the tests. This review is from reading `export_job.py` only.

## Must fix before merge

1. **Failures are silent.** `run()` catches every exception, logs it, and exits 0 (lines 56-57). Say the upload returns a 500 at 02:00. Cron sees success, no alert fires, and finance finds out when the file is missing. The expected behavior is a non-zero exit. Re-raise after logging (`log.exception(...)` then `raise`), or call `sys.exit(1)`.
2. **Customer emails are written to the logs.** Line 52 logs the email of every exported invoice at INFO. That puts customer personal data into log storage that probably has wider access and longer retention than the finance upload. Log only the count and the day.
3. **The upload has no timeout.** `requests.post` with no `timeout` (line 42) can hang forever if the endpoint stalls. The cron run then never finishes and the next one can overlap it. Use something like `timeout=30`.

## Should fix

4. **Time zone and day boundaries.** `date.today()` uses the server's local time zone, and the query compares `paid_at` against bare dates in the database session's time zone. If the two zones differ, invoices paid near midnight fall into the wrong day or get exported twice or never. Pick one zone (probably UTC) and apply it in both places. This also needs a test for an invoice paid at 23:59 and one at 00:00.
5. **Amounts are formatted from floats.** `amount_cents / 100` (line 37) gives `10.5` for 1050 cents, not `10.50`. Finance parsers may expect two decimals. It also assumes every currency has two decimal places, which is wrong for JPY (0) and KWD (3). Use `Decimal`, or write the integer cents column as it is.
6. **Test coverage is thin.** The docstring says the tests cover a CSV header and one row. Nothing covers an empty day, the day-boundary behavior, the upload, or the failure path from item 1. Items 1, 4 and 5 should each get a test as part of fixing them.
7. **No way to re-run a specific day.** If a night fails, you can't backfill without editing code. A small optional `--date` argument fixes that.
8. **`UPLOAD_URL` is read at import time (line 16).** A missing variable raises `KeyError` as soon as the module is imported, including in tests. Read it inside `run()` or `upload()`, and fail with a clear message.

## Minor

9. **Logging isn't configured.** There is no `logging.basicConfig`, so under cron the INFO lines are dropped and only the errors appear.
10. **A day with no invoices still uploads a header-only file.** That may be what finance wants, but it should be a deliberate choice, ideally with a comment.
11. **The file isn't written atomically.** If the process dies mid-write, a partial CSV sits at the final path. Write to a temp name and rename. Also, `EXPORT_DIR` is hardcoded and assumed to exist. The file holds customer data and gets default permissions.
12. **Spreadsheet formula injection.** If an email value ever starts with `=`, `+`, `-` or `@`, it could run as a formula when finance opens the file in Excel. The risk is low for emails, but it's a known pattern.
13. **`fetchall()` loads everything into memory.** That's fine at nightly volume. Switch to a streaming cursor only if volume grows.

Items 1-3 are small edits, probably under an hour including the tests.

VERDICT: READY WITH CHANGES
