I wouldn't merge this tomorrow as it stands. Three problems block it, and all three are small fixes. The core logic is sound: the query, the date window and the CSV layout are fine.

## Blockers

**1. A failed export looks like a success (`export_job.py:56-57`).**
`run()` catches every exception, logs it and returns normally, so the process exits with code 0. For example: the finance endpoint returns a 500, `raise_for_status()` raises, the job logs "export failed" and exits 0. Cron and any monitoring see a successful run, and finance gets no file. Nobody finds out until finance asks where the data is. The fix is to log the error and then re-raise it (or `sys.exit(1)`), so the failure shows up.

**2. Every customer email address goes into the logs (`export_job.py:52`).**
`[row[1] for row in rows]` puts the full list of customer emails into an info log line every night. That is personal data leaking into logs, which are usually kept longer and seen by more people than the database. Log only the count and the day.

**3. The tests the docstring mentions don't exist.**
Line 3 says the job is tested by `test_export_job.py`, but there is no such file in this directory. Even if it exists somewhere else, "CSV header and one row" only covers the easy path. Before merging, I'd want tests for:
- `write_csv` with zero rows, and with amounts like 100 and 5 cents (see item 4)
- `run()` returning a non-zero exit when the upload fails (proves blocker 1 is fixed)
- `fetch_invoices` using a half-open window (`>= day`, `< day+1`)

These are hard to write at the moment because line 16 reads `FINANCE_UPLOAD_URL` when the module is imported. Importing the module without that variable set raises `KeyError`. Read the variable inside `run()` or `upload()` and pass it in.

## Should fix (can be follow-ups if you name them)

4. **Money is written as a float (line 37).** For example, 100 cents is written as `1.0` and 5 cents as `0.05`, but `1.0` is not what most finance imports expect. It also assumes every currency has 2 decimal places, which is wrong for JPY (0) and KWD (3). Use `Decimal` and format to the currency's number of decimal places, or confirm with finance that only 2-decimal currencies ever appear.
5. **The upload has no timeout (line 42).** If the endpoint hangs, the job hangs forever. Pass something like `timeout=60`.
6. **"Yesterday" depends on the server's timezone (lines 28 and 47).** `date.today()` uses the host's local time, while the DB compares `paid_at` in its own session timezone. If those differ, invoices near midnight end up in the wrong day's file or are missed entirely. Pin both to UTC, or to whatever timezone finance defines a day in.
7. **A missed day can't be re-run.** The date is hard-coded to yesterday, so if the job fails on Tuesday there is no way to export Monday's invoices again. Accept an optional `--date` argument.
8. **The info logs probably go nowhere.** Logging is never configured, and Python's default only prints warnings and above. The "finished" line will never appear, so add `logging.basicConfig(level=logging.INFO)` in `__main__`.
9. **CSVs with emails pile up in `/var/exports` forever.** Decide on a retention period, or delete each file after a successful upload.

Fixing 1 to 3, plus the timeout in item 5, is roughly an hour's work. With those done I'd call it mergeable and track 4, 6 and 7 as follow-ups.

VERDICT: NOT READY
