**Not ready to merge as it stands: a failed export exits as if it succeeded, and that day's invoices are then never sent to finance.** The blocking fixes are small, so tomorrow is still realistic. I reviewed only `export_job.py`; I did not open `test_export_job.py` and relied on the docstring's description of it.

## Must fix before merge

1. **Failures are swallowed** (`export_job.py:56-57`). The `except Exception` logs one line and the process exits with code 0.
   - Case: the finance endpoint returns 503 at 02:00. Cron records success and there is no traceback. Expected: non-zero exit with the full traceback.
   - Fix: remove the `except` (keep `finally`), or use `log.exception` and re-raise.

2. **A missed day is never recovered** (`export_job.py:47`). The date is hard-coded to yesterday, so the next night's run moves on.
   - Case: the 14 Nov run fails, the 15 Nov run exports only 15 Nov, and 14 Nov's invoices never reach finance.
   - Fix: accept an optional date argument so a day can be re-run.

3. **The upload has no timeout** (`export_job.py:42`). If the endpoint accepts the connection and never answers, the job hangs indefinitely and holds its database connection open.
   - Fix: `requests.post(..., timeout=(10, 120))` or similar.

4. **Customer emails are written to the log** (`export_job.py:52`). Every run logs the full list of that day's customer emails, which puts personal data into log storage.
   - Fix: log the count only.

5. **Logging is never configured.** Run from cron, both `log.info` lines are dropped, so there is no record that an export ran or how many rows it sent. Only the error line reaches stderr.
   - Fix: call `logging.basicConfig(level=logging.INFO)` in the `__main__` block.

6. **Tests cover only the CSV header and one row.** Nothing tests the date window, an upload failure, or `run()` — the paths where the bugs above live.
   - Add at minimum: `fetch_invoices` passes `[day, day+1)`; `upload` raises on a non-2xx response; `run()` propagates a failure and still closes the connection; amount formatting.

## Should fix, or confirm with finance

- **Amount formatting** (`export_job.py:37`). `amount_cents / 100` is a float, so 1000 cents exports as `10.0` and 1050 as `10.5`, not `10.00` and `10.50`. Use `Decimal(amount_cents) / 100` formatted to two places.
- **Non-two-decimal currencies.** If amounts are stored in minor units for every currency, a ¥500 invoice exports as `5.0 JPY`. This depends on how the table stores JPY or KWD.
- **Which timezone "yesterday" means.** `date.today()` uses the cron host's timezone, and the date bounds are interpreted in the database session's timezone. If either differs from finance's business day, invoices near midnight land in the neighbouring day's file. Compute explicit timezone-aware bounds.
- **Re-uploads.** Once a day can be re-run, confirm the finance endpoint deduplicates or replaces by filename, otherwise a re-run double-counts.
- **No authentication is visible on the upload.** That is fine if `FINANCE_UPLOAD_URL` carries a token; worth confirming.

## Minor

- `UPLOAD_URL` is read at import time (`export_job.py:16`), so importing the module without that variable set raises `KeyError`. Read it inside `upload()`, as `DATABASE_URL` is read inside `run()`.
- CSV files containing customer emails accumulate in `/var/exports` with no cleanup.
- A day with zero paid invoices uploads a header-only file; confirm finance expects that.

The SQL is parameterised, the half-open date range is correct, and the split into fetch, write and upload functions is clean and testable.

VERDICT: NOT READY
