**`export_job.py` is not ready to merge tomorrow.** It swallows every failure, so the nightly cron job can fail without anyone finding out, and it writes customer emails into the logs.

The docstring says `test_export_job.py` covers it, but that file doesn't exist in this directory. I reviewed the code by reading it. I haven't run anything.

## Blockers

1. **Failures are hidden (`run`, lines 56-57).**
   - The `except Exception` block logs the error and then returns normally. The process exits 0, so cron sees success.
   - Example: the finance endpoint returns a 500 at 02:00. `raise_for_status()` raises, the error goes to the log, the exit code is 0, and finance never receives that day's invoices. Nobody finds out until someone notices the missing file.
   - Fix: re-raise, or exit non-zero, and alert on that.

2. **Customer emails are logged (line 52).**
   - `[row[1] for row in rows]` writes every customer's email address to the log for each export. That is personal data in plaintext logs, and it is a long line on a busy day.
   - Fix: log the count and the day only.

3. **There are no tests, and the one named in the docstring is missing.**
   - Your standards require tests for the happy path and the important failure cases.
   - The docstring says the test covers only "CSV header and one row". That would not catch blocker 1, and it wouldn't catch the amount bug below.
   - Fix: add `test_export_job.py` covering the items in this review.

## Should fix before merge

4. **The amount is wrong in the wrong format (line 37).**
   - `amount_cents / 100` is float division. 1999 cents becomes `19.99`, but 100000 cents becomes `1000.0`. Floats can also introduce rounding noise in money values.
   - Expected: `1000.00`, with exactly two decimals.
   - Fix: use `Decimal` or format as `f"{cents // 100}.{cents % 100:02d}"`. This is wrong for currencies that don't use two decimal places, such as JPY. I can't tell from this file whether you have any, so check.

5. **The day boundary depends on the server's timezone (lines 28 and 47).**
   - `date.today()` uses the server's local time. `paid_at` is compared against bare dates, which Postgres reads in the session timezone.
   - Example: if the server is in UTC and finance expects US-Eastern days, an invoice paid at 11pm Eastern lands in the next day's file.
   - Fix: pick a timezone explicitly and document it.

6. **Retries can create duplicates or half-finished runs.**
   - The CSV is written before the upload. If the upload fails and cron re-runs, the file is overwritten and re-sent.
   - Whether the finance endpoint deduplicates uploads is unknown. Confirm that, or make the upload idempotent.

## Minor

7. **`UPLOAD_URL = os.environ["FINANCE_UPLOAD_URL"]` runs at import time.** Importing the module for a test raises `KeyError` unless the variable is set. Read it inside `run()` instead.
8. **`requests.post` has no timeout (line 42).** A hung endpoint hangs the job forever.
9. **`EXPORT_DIR` is hardcoded to `/var/exports`.** It also isn't created if missing.
10. **The CSV contains customer emails and is left on disk.** Check the directory permissions and whether old files need cleaning up.
11. **`paid_at.isoformat()` fails if `paid_at` is null.** The query filters on `paid_at`, so this is safe today. It would break if the query changed.

## What's fine

The SQL is parameterised, so there is no injection risk. The connection is closed in `finally`. The functions are small and separated sensibly.

Blockers 1 and 2 are each a few lines to fix, and the tests are the real work. With the deadline tomorrow, I'd fix those three and items 4 and 8 at minimum, and open tickets for the rest.

VERDICT: NOT READY
