It is not ready to merge as written: a failed export currently looks like a success to cron, so finance can miss a day of invoices without anyone being told. The fixes are small, and tomorrow is still realistic if items 1–4 and their tests are done.

I reviewed `export_job.py` by reading it only; I did not run it or open `test_export_job.py`, so the test comments rely on the docstring ("CSV header and one row").

The structure is sound: small single-purpose functions, a parameterised query, a half-open date window, and context managers throughout. The problems are in failure handling and operations.

## Blockers

1. **Failures are swallowed and the job exits 0** (`export_job.py:56-57`). If the upload returns a 500, the job logs one line and exits successfully, so cron raises no alert and that day is never exported. It should exit non-zero, and use `log.exception` so the traceback is kept.
2. **No way to re-export a missed day** (`export_job.py:47`). The date is always "yesterday", with no argument to override it. If the 02:00 run on 14 Nov fails, the 15 Nov run exports only 14 Nov and 13 Nov's invoices never reach finance. Add a `--date` argument.
3. **The upload has no timeout** (`export_job.py:42`). If the finance endpoint accepts the connection and never responds, the process hangs indefinitely while holding a database connection. Add `timeout=` and probably a bounded retry.
4. **Customer emails are written to the log** (`export_job.py:52`). Every run logs the full list of customer email addresses, which is personal data in log storage. Log the count only.
5. **Logging is never configured.** Run as a script, Python drops the INFO lines, so "export finished" never appears and a successful run cannot be told from one that never ran. Add `logging.basicConfig` in the `__main__` block.

## Should fix

6. **The day boundary depends on two unstated timezones** (`export_job.py:28`, `:47`). "Yesterday" comes from the host clock, but the window's midnights are interpreted in the database session's timezone. For example, with the host on UTC and the database session on US Pacific, the 02:00 UTC run exports a window ending 08:00 UTC, so invoices paid between 02:00 and 08:00 UTC are never exported. Pin one timezone explicitly; I can't tell from the file whether your setup is affected.
7. **Tests don't cover the risky paths.** Missing are the date window (an invoice at exactly midnight), a failed upload, a failed query, an empty day, and the exit code.
8. **Amount formatting assumes two-decimal currencies and gives uneven output** (`export_job.py:37`). 1010 cents is written as `10.1` and 2000 as `20.0`. If yen is stored as whole yen, JPY 500 is exported as `5.0`. Format with `Decimal` and the currency's exponent.
9. **The CSV holds customer emails, is written with default permissions and is never deleted** (`export_job.py:33`). Under a typical umask the files in `/var/exports` are world-readable and accumulate indefinitely. Set mode `0o600` and decide on retention.
10. **A re-run may duplicate data at finance.** Running the job twice for the same day uploads the same file twice. Whether that double-counts depends on the endpoint, so it is worth confirming.
11. **`FINANCE_UPLOAD_URL` is read at import time** (`export_job.py:16`). Importing the module without the variable set raises `KeyError`, including in tests. `DATABASE_URL` is read inside `run()`; do the same here.

## Minor

12. **Spreadsheet formula injection.** An email such as `=cmd@x.com` is written verbatim and Excel treats it as a formula when finance opens the file.
13. **A connection failure behaves differently from every other failure** (`export_job.py:49`). `psycopg2.connect` sits outside the `try`, so it crashes with a traceback. That is the better behaviour, but inconsistent.
14. **No connect or statement timeout on the database**, so a stuck query hangs like the upload does.
15. **An empty day uploads a header-only file.** This may be intended, but zero paid invoices could also signal an upstream problem, so log it as a warning.
16. **The file is written in place.** A crash mid-write leaves a partial CSV under the final name; write to a temp file and rename.
17. **`open()` has no explicit `encoding`** (`export_job.py:33`). Under cron's minimal locale a non-ASCII email could fail to encode on older Pythons; pass `encoding="utf-8"`.
18. **`fetchall()` loads the whole day into memory** (`export_job.py:29`). Fine at current volumes; a server-side cursor would scale.
19. **No overlap guard.** A hung run and the next night's run can execute together.
20. **`EXPORT_DIR` is hard-coded and not checked for existence**, unlike the other settings, which come from the environment.
21. **`paid_at.isoformat()` omits the UTC offset if the column is a timestamp without time zone**, leaving finance to guess the timezone.
22. **No type hints or function docstrings.**

VERDICT: NOT READY
