`export_job.py` is not ready to merge as it stands, but it is close: the happy path looks correct, and four small fixes (about an hour of work) would make it safe to merge tomorrow. I reviewed by reading only; nothing was run.

## Must fix before merge

1. **Failures are silent to cron (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 at 02:00, cron sees a successful run, no alert fires, and finance simply has no file for that day. Use `log.exception(...)` and re-raise (or `sys.exit(1)`) so the failure is visible and has a traceback.

2. **The upload can hang forever (high).** `requests.post` has no `timeout` (`export_job.py:42`). If the endpoint accepts the connection and stalls, the job never finishes and never fails. Add a timeout such as `timeout=(10, 120)`.

3. **Customer emails are written to the logs (high, privacy).** Line 52 logs the full list of `customer_email` values for the day. Log the count and the day only.

4. **Logging is never configured (medium).** There is no `logging.basicConfig` or handler setup, so when cron runs the script, both `log.info` lines are dropped. The only output is the bare "export failed" message on stderr. Add `logging.basicConfig(level=logging.INFO)` under `__main__`.

## Should fix, can follow shortly after

5. **Tests are thin, and the test file is missing here (medium).** The docstring says `test_export_job.py` covers the CSV header and one row, but that file is not in this directory, so I could not check it. Nothing covers the date window, an upload failure, or `run()`.

6. **No way to re-run a missed day (medium).** `run()` always exports yesterday (`export_job.py:47`). If Tuesday's run fails, Tuesday's invoices can only be recovered by editing code. Accept an optional date argument.

7. **"Yesterday" depends on two unpinned time zones (medium).** `date.today()` uses the host's local time, and the database converts the date bounds using its session time zone. If the two differ, or `paid_at` is stored with a time zone, invoices paid near midnight can land in the wrong day's file or in none. Pin both, ideally to UTC or finance's time zone.

8. **Amounts have inconsistent decimal places (low to medium).** `amount_cents / 100` writes 2000 cents as `20.0`, 1050 as `10.5` and 1999 as `19.99` (`export_job.py:37`). Format with two fixed decimals, for example `f"{amount_cents / 100:.2f}"` or `Decimal`.

9. **Importing the module needs `FINANCE_UPLOAD_URL` (low).** Line 16 reads it at import time, so any test or tool that imports the module without it gets a `KeyError`. Read it inside `upload()` or `run()`.

10. **Export files pile up and can be left half-written (low).** Files in `/var/exports` contain customer emails and are never deleted. A crash mid-write leaves a partial CSV under the final name.

11. **A database connection failure behaves differently from every other failure (low).** `psycopg2.connect` sits outside the `try` (`export_job.py:49`), so it crashes with a traceback while everything else is swallowed. Fixing item 1 makes this consistent.

## Speculative, depends on things I cannot see

- **Null amounts:** if `amount_cents` can be NULL, one such row raises a `TypeError` and aborts the whole day's export.
- **Zero-decimal currencies:** if these are stored as whole units (JPY, for example), dividing by 100 is wrong for them.
- **Upload authentication:** the upload sends no auth header. That is fine if the URL carries a token or the network is private.
- **Empty days:** a day with zero invoices uploads a header-only file. Confirm finance expects that rather than no file.
- **Spreadsheet formulas:** an email starting with `=`, `+`, `-` or `@` would be read as a formula if finance opens the CSV in Excel.
- **File encoding:** the file is opened without an explicit `encoding`, so a non-ASCII email could fail under an unusual cron locale.

VERDICT: READY WITH CHANGES
