I don't think it's ready to merge tomorrow. Two of the problems below need fixing first, and both are small changes. The structure is good: the query is parameterised, the functions are small and each does one job, and the connection is always closed. Most of the rest of the list is small polish.

I couldn't run anything. The file's docstring mentions `test_export_job.py`, but that file isn't in this folder, so I reviewed the code by reading it.

## Blocking (fix before merge)

**1. A failed export looks like a success** (`export_job.py:56-57`)
The `except Exception` logs the error and then `run()` returns normally, so the process exits with code 0.
- *Example:* the finance endpoint returns 500 → `raise_for_status()` raises → the error is logged → exit code 0. Cron and any monitoring see a successful run, and finance never gets the file.
- *Expected:* a non-zero exit code. Use `log.exception(...)` and then re-raise, or call `sys.exit(1)`.

**2. Every customer's email address goes into the logs** (`export_job.py:52`)
`[row[1] for row in rows]` writes every customer email into the log line each night. That's personal data in logs, which usually have wider access and longer retention than the database. Log only the count.

## High

**3. Amounts are floats and assume every currency has 2 decimal places** (`export_job.py:37`)
- *Example:* 1000 cents in USD is written as `10.0`, not `10.00`. A JPY invoice for ¥500, stored as 500 because yen has no minor unit, is written as `5.0`. That's 100× too small.
- *Fix:* use `Decimal` with each currency's exponent, or export `amount_cents` as an integer and let finance convert it.

**4. Which "yesterday" you get depends on server and database time zone settings** (`export_job.py:28, 47`)
`date.today()` uses the server's local time zone. Comparing `paid_at` against a plain date uses the database session's time zone. If those differ from each other, or from finance's definition of a day, invoices near midnight end up on the wrong day's file or in no file at all. Pick a time zone (UTC, say) and pass timezone-aware bounds.

## Medium

**5. The upload has no timeout** (`export_job.py:42`). If the endpoint hangs, the job hangs forever. Add something like `timeout=60`.

**6. Importing the module crashes if `FINANCE_UPLOAD_URL` isn't set** (`export_job.py:16`). Any test that imports the module needs the variable set, or it fails with `KeyError`. Read the variable inside `upload()` or `run()`.

**7. You can't re-run a missed day.** The day is always computed as yesterday. If the job fails on Tuesday night, the only way to backfill Monday is to edit the code. Accept an optional date argument.

**8. Test coverage is thin, and the test file isn't here.** By the docstring's own description, the tests check only the CSV header and one row. Missing cases:
- the upload failing (should exit non-zero)
- a day with zero invoices
- amount formatting, including a currency that isn't 2-decimal
- the day boundaries

## Low

9. The CSV is written straight to its final path, so a crash mid-write leaves a partial file that looks complete. Write to a temp file and rename it.
10. If `/var/exports` doesn't exist, the job fails. Create it, or document that it must exist.
11. `__main__` never configures logging. The `log.info` messages are dropped, and errors only appear through Python's fallback handler.
12. On a day with no invoices, the job uploads a file with just the header. That may be what you want, but confirm finance expects it.

## Nits

13. The CSV column `amount` doesn't say what unit or format it's in. `amount_major` or a short note would help.
14. `fetchall()` loads the whole day into memory. That's fine at current volumes; just worth knowing.
15. Check whether finance actually needs `customer_email` in the file. If not, dropping it shrinks the personal data you send them.

Fixing 1 and 2 is about a five-line change. With those, plus 3 and 5, I'd be comfortable seeing it merged.

VERDICT: NOT READY
