`export_job.py` is not ready to merge as written: when the export fails, the job still reports success, so finance can miss a day of invoices without anyone being told. Four fixes are needed before merge, all small enough to make a merge tomorrow realistic.

I reviewed by reading the file only; nothing was run. The docstring cites `test_export_job.py`, but that file is not in this folder, so I could not check the tests.

## Must fix before merge

1. **Failures are silent (high).** `run()` catches every exception, logs one line and exits normally (lines 56-57). If the upload returns a 500, cron sees exit code 0, no file reaches finance, and the stack trace is lost. Use `log.exception` and re-raise so the job exits non-zero.

2. **A failed day is never exported (high).** The day is always "yesterday" (line 47) and cannot be overridden. If the run on the 14th for the 13th fails, the run on the 15th exports only the 14th. Add a date argument so a day can be re-run.

3. **Customer emails are written to the log (high, privacy).** Line 52 logs every customer's email address for the day. Log the count only.

4. **The upload can hang forever (high).** `requests.post` has no timeout (line 42). If the finance endpoint stops responding, the process never exits and nothing is logged. Add a timeout, for example `timeout=(10, 120)`.

5. **Test coverage is far short of your own standard (high).** By the docstring, tests cover only the CSV header and one row. The query's date window, the upload, and every failure path are untested, and those are where the defects above are.

## Should fix, can follow shortly after

6. **Logging is never configured (medium).** Run as a script, there is no `logging.basicConfig`, so both `log.info` lines are dropped and only the bare error text reaches stderr. A successful run leaves no trace.

7. **Amounts are formatted inconsistently (medium).** `amount_cents / 100` (line 37) writes 1000 cents as `10.0`, 1050 as `10.5` and 1099 as `10.99`. Finance would likely expect `10.00`, `10.50`, `10.99`. Format with `Decimal` or `f"{cents // 100}.{cents % 100:02d}"`.

8. **Importing the module requires `FINANCE_UPLOAD_URL` (low).** It is read at import time (line 16), so any test that imports the file fails with `KeyError` unless the variable is set. `DATABASE_URL` is read inside `run()`; do the same here.

9. **A database connection failure behaves differently from every other failure (low).** `psycopg2.connect` sits outside the `try` (line 49), so it is the one error that does crash with a non-zero exit. Fixing item 1 makes this consistent.

10. **The CSV is opened without an explicit encoding (low).** Line 33 uses the cron environment's default. Set `encoding="utf-8"`.

11. **Export files containing customer emails accumulate in `/var/exports` (low).** Nothing deletes them, and a failed run leaves a partial file behind.

## Possible concerns, depending on facts I don't have

- **Day boundary.** "Yesterday" comes from the server's local clock, and the date is compared against `paid_at` in the database session's timezone. If those differ from finance's business timezone, invoices paid near midnight land in the wrong day's file.
- **Currencies without two decimals.** Dividing by 100 is wrong for JPY (no minor unit) or KWD (three decimals) if such invoices exist.
- **No authentication on the upload.** The request sends no token or header. That is fine only if the URL carries a secret or the network restricts access.
- **Re-running a day.** Whether finance's endpoint de-duplicates a second upload for the same day matters once item 2 is fixed.
- **Empty days.** A day with no paid invoices uploads a header-only file; check finance wants that.
- **Spreadsheet formulas.** An email starting with `=`, `+` or `-` is valid and would be read as a formula if finance opens the CSV in Excel.

VERDICT: NOT READY
