You can merge tomorrow, but fix two things first: when the job fails, nobody finds out, and it writes every customer's email address into the logs. Both are small changes, probably under an hour including tests. The rest of the job is solid. The pieces are small and each has one job, the SQL is parameterized, the date range is half-open (`>= day`, `< day+1`) so no invoice is counted twice, and the connection is always closed.

## Fix before merging

**1. A failed export looks like a success** (`export_job.py:56-57`)
The `except` logs the error and then lets the program end normally. Cron sees exit code 0, so it raises no alert.
- Example: the finance endpoint returns a 500 at 02:00. You get one `export failed` log line and the script exits 0. Finance has no file that day, and nobody is told until finance asks.
- Expected: the script exits non-zero so whatever watches cron sends an alert.
- Fix: use `log.exception(...)` (it keeps the stack trace) and then re-raise, or `sys.exit(1)`. Add a test where `upload` raises and check that `run()` fails.

**2. Customer emails go into the logs** (`export_job.py:52`)
`[row[1] for row in rows]` is the `customer_email` column, so every night's log line holds every paying customer's email. Logs usually reach more people and are kept longer than the database, which makes this a real privacy exposure. Log just the count:
```python
log.info("exporting %d invoices for %s", len(rows), day)
```

## Worth doing now (each is a line or two)

**3. The upload has no timeout** (`export_job.py:42`). If the endpoint stops responding, the job can hang forever, and the next night's run would start alongside it. Add `timeout=60` (or whatever suits the endpoint).

**4. Amounts assume every currency has 2 decimal places** (`export_job.py:37`). `amount_cents / 100` is right for USD and EUR. It's wrong for currencies with 0 decimals (JPY: 500 becomes 5.0) or 3 decimals (KWD). If you only bill in 2-decimal currencies, add a short comment saying so. Otherwise, divide by a per-currency factor.

## Check, but don't block on it

**5. Which midnight counts as "yesterday."** `date.today()` uses the server's local timezone, and Postgres compares a date against `paid_at` using the database session's timezone. If those differ from the timezone finance means by "yesterday," invoices paid near midnight end up in the wrong day's file. If both are UTC and finance expects UTC, you're fine.

## Tests
The docstring says the tests cover the CSV header and one row. I only read `export_job.py`, not the test file. Item 1's fix needs a failure-path test, and an "upload raises" test is the one that matters most. A zero-invoices test, where the job still uploads a file with just the header, would also be cheap to add.

VERDICT: READY WITH CHANGES
