Not ready to merge as it stands: four problems (1–4 below) should block the merge, and the first one can cost finance a day of invoices without anyone noticing. The fixes are small, likely a few hours including tests. I read the file but did not run it, and `test_export_job.py` is not in this folder, so the test comments rely on the docstring's description.

## Blocking

1. **Failures are swallowed and the job exits 0** (`export_job.py:56-57`). If the upload returns a 500, `run()` logs one line and returns normally, so cron records a success. Expected: non-zero exit and a traceback. Fix: use `log.exception(...)` and re-raise, or `sys.exit(1)`.

2. **A missed day can never be re-exported** (`export_job.py:47`). The day is hardcoded to "yesterday". If the 14 Nov 02:00 run fails, the 15 Nov run exports only 14 Nov, and invoices paid on 13 Nov never reach finance. Fix: accept an optional `--date` argument that defaults to yesterday.

3. **The upload has no timeout** (`export_job.py:42`). If the finance endpoint accepts the connection and then stalls, `requests.post` waits forever. The process holds its database connection and the next night's run starts alongside it. Fix: `timeout=(10, 120)` or similar.

4. **Customer emails are written to the log** (`export_job.py:52`). The info line includes every customer's email address. Nothing shows today only because of problem 7; the moment logging is configured, the emails land in log files. Fix: log the count and the day only.

## Should fix, not blocking on their own

5. **Tests cover only the CSV header and one row.** Nothing tests the date window in `fetch_invoices`, an upload failure, or the failure path in `run()`. Problems 1–3 are exactly the untested paths.

6. **Amount formatting is inconsistent** (`export_job.py:37`). `amount_cents / 100` writes 1000 cents as `10.0` and 1050 as `10.5`, where finance likely expects `10.00` and `10.50`. Fix: `f"{amount_cents // 100}.{amount_cents % 100:02d}"` or `Decimal`. Also, if you invoice in currencies without two decimal places (JPY, KWD), dividing by 100 is wrong for those rows.

7. **Logging is never configured.** Run as a script, the two `log.info` lines are dropped; only the error line reaches stderr, without a timestamp. Fix: call `logging.basicConfig(level=logging.INFO, ...)` under `__main__`.

8. **"Yesterday" depends on two clocks** (`export_job.py:47`, `:28`). `date.today()` uses the cron host's timezone, while the date bounds are interpreted in the database session's timezone. If the host is UTC and finance works in IST, an invoice paid at 01:00 IST on 14 Nov lands in the 13 Nov file. Fix: pick the business timezone explicitly and build timezone-aware bounds.

9. **`FINANCE_UPLOAD_URL` is read at import time** (`export_job.py:16`). Importing the module without that variable set raises `KeyError`, including from tests. Read it inside `upload()` or `run()`, as you already do for `DATABASE_URL`.

10. **The upload sends no credentials** (`export_job.py:42`). This is fine if the URL carries a token or the network is private; worth confirming, since the payload is customer emails and amounts.

## Minor

11. **File encoding is not set** (`export_job.py:33`). `open` uses the locale default, which under cron can be ASCII; an email like `josé@example.com` would then fail the whole export. Pass `encoding="utf-8"`.
12. **The CSV is written straight to its final path.** A crash mid-write leaves a partial `invoices-<day>.csv` that looks complete. Write to a temp file and rename.
13. **Export files are never deleted.** Files containing customer emails pile up in `/var/exports` with default permissions.
14. **Spreadsheet formula injection.** An email beginning with `=`, `+`, `-` or `@` is run as a formula if finance opens the file in Excel. Prefix such cells with `'`.
15. **A connection failure behaves differently from other failures.** `psycopg2.connect` sits outside the `try` (`export_job.py:49`), so it crashes loudly while everything else is swallowed. This goes away once problem 1 is fixed.
16. **One null `amount_cents` aborts the whole export** with a `TypeError` at `export_job.py:37`.
17. **An empty day uploads a header-only file.** This may be what finance wants; confirm it.
18. **`fetchall()` loads every row into memory.** Fine at nightly volumes; only matters if a day grows to millions of rows.
19. **`EXPORT_DIR` is hardcoded**, which forces tests of `run()` to patch it.
20. **No type hints or function docstrings.**

The structure itself is sound: the four functions are small and single-purpose, and the query is parameterised and ordered.

VERDICT: NOT READY
