Not as it stands, but it is close: the core export logic is sound, and three small fixes plus tests would make it mergeable tomorrow. I reviewed by reading only; nothing was run, and `test_export_job.py` is not in this folder, so I could not check the tests.

## Must fix before merge

1. **A failed export looks like a success (high).** `run()` catches every exception, logs one line and exits with code 0 (`export_job.py:56-57`). For example, if the finance endpoint returns a 500, cron records a successful run, finance gets no file and nobody is alerted. The log line also drops the traceback. Fix: use `log.exception(...)` and re-raise, or exit non-zero.

2. **The upload can hang forever (high).** `requests.post` has no timeout (`export_job.py:42`). If the finance endpoint accepts the connection and never answers, the job never finishes and holds its database connection open. Fix: add `timeout=(10, 120)` or similar.

3. **Customer email addresses are written to the log (high, privacy).** Line 52 logs the full list of `customer_email` values for the day. Fix: log only the count and the date.

4. **Tests do not cover what can go wrong (high against your own standard).** The docstring says the tests cover the CSV header and one row. Nothing covers the date window in `fetch_invoices`, an upload failure, or `run()` signalling failure. Add at least those three alongside fixes 1 and 2.

## Should fix, can follow shortly after

5. **A missed day cannot be re-exported (medium).** The day is hard-coded to yesterday (`export_job.py:47`). If Tuesday's run fails, Tuesday's invoices can only be exported by editing the code. Fix: an optional `--date` argument.

6. **Amounts are formatted inconsistently (medium-low).** `amount_cents / 100` (`export_job.py:37`) writes 1000 cents as `10.0` and 1050 as `10.5`, not `10.00` and `10.50`. The values are numerically right, but a strict finance parser may reject them. Fix: `f"{amount_cents / 100:.2f}"` for integer cents, or `Decimal`.

7. **Success messages never appear when run from cron (medium-low).** The script never configures logging, so Python's default drops the `info` lines and prints only the error message to stderr. This also means fix 3 only bites once logging is configured, but it should still go. Fix: `logging.basicConfig(level=logging.INFO)` under `__main__`.

8. **Importing the module needs `FINANCE_UPLOAD_URL` set (low).** Line 16 reads it at import time, so any test or tool that imports `export_job` without it fails with `KeyError`. `DATABASE_URL` is read inside `run()`; do the same here.

9. **CSV files with customer emails accumulate in `/var/exports` (low).** Nothing deletes them, and a crash mid-write leaves a partial file under the final name.

## Worth checking, not confirmed from the code

- **Time zones.** "Yesterday" comes from the server's local date, and the query compares it to `paid_at`. If `paid_at` is a timezone-aware column and the database session uses a different zone than the cron host, invoices paid near midnight land in the wrong day's file.
- **Currencies without two decimal places.** Dividing by 100 is wrong for yen, for example, if `amount_cents` stores minor units for such currencies.
- **Upload authentication.** The POST sends no credentials; that is fine only if the URL carries a token or the endpoint is network-restricted.
- **Duplicate uploads.** Re-running a day uploads the file again; whether finance de-duplicates is unknown.
- **Spreadsheet formula injection.** An email starting with `=` would be run as a formula if finance opens the CSV in Excel.

## What is already good

The query is parameterised, the date window is half-open so no invoice is counted twice or missed between days, the CSV is opened correctly, and the connection is always closed.

Fixes 1 to 3 are a few lines each; the tests in fix 4 are the bulk of the work.

VERDICT: READY WITH CHANGES
