**Not ready to merge as written, but close.** Four defects mean a failed export can go unnoticed and customer emails end up in logs. I read the file but did not run it or see `test_export_job.py`, so the test comments rely on the docstring.

The structure is good: small single-purpose functions, a parameterized query, and context managers throughout. The problems are in failure handling and operations.

## Blockers

1. **A failed export looks like a success** (`export_job.py:56-57`). The `except Exception` logs one line and the process exits with code 0. For example, if the finance endpoint returns a 503, cron sees success, nothing is retried, and that day's invoices never reach finance. Let the exception propagate (or `sys.exit(1)`), and use `log.exception` so the traceback is kept.

2. **Logging is never configured** (`export_job.py:13`). With no `logging.basicConfig`, both `log.info` lines are dropped when the script runs from cron. The error line reaches stderr as bare text with no timestamp. Combined with item 1, the job leaves almost no trace either way.

3. **Customer emails are written to the log** (`export_job.py:52`). The line logs every `customer_email` for the day. It is hidden today only because of item 2; once logging is fixed, each run puts the full list of emails into log files. Log the count only.

4. **The upload has no timeout** (`export_job.py:42`). `requests.post` waits forever by default. If the endpoint accepts the connection and stalls, the job hangs indefinitely and the next night's run starts alongside it. Add `timeout=`.

## Should fix (before merge or immediately after)

5. **No way to re-run a missed day** (`export_job.py:47`). The day is always "yesterday". If the 14 November run fails, exporting 13 November needs a code edit. Accept an optional date argument.

6. **Tests cover only the CSV header and one row.** Nothing covers the date window in `fetch_invoices`, an upload failure, the failure path in `run`, or a day with zero invoices. Items 1 and 4 need tests with their fixes.

7. **Amount formatting is inconsistent and assumes two decimal places** (`export_job.py:37`). `1000 / 100` writes `10.0` and `1050 / 100` writes `10.5`, not `10.00` and `10.50`. For yen, `amount_cents = 500` writes `5.0` when the invoice is 500 JPY. Format with `Decimal` and a per-currency exponent, or confirm only two-decimal currencies exist.

8. **"Yesterday" depends on two clocks** (`export_job.py:47`, `:28`). `date.today()` uses the cron host's timezone, and the database turns the date into midnight in its own session timezone. If they differ, the window is not the calendar day finance expects. Build explicit timezone-aware bounds in the agreed zone.

9. **Late-recorded payments are never exported.** An invoice whose `paid_at` is 13 November but which is marked `PAID` after 02:00 on 14 November falls into no later window. Whether this can happen depends on how `paid_at` is set.

10. **`FINANCE_UPLOAD_URL` is read at import time** (`export_job.py:16`). Importing the module without it raises `KeyError`, so tests must set it before import. Read it inside `upload` or `run`, like `DATABASE_URL`.

11. **Exported files with customer emails pile up in `/var/exports`.** There is no cleanup and no explicit file permissions, so readability depends on the cron user's umask.

## Minor

12. **A database connection failure skips the logging path** (`export_job.py:49`). `connect` sits outside the `try`, so that error is an unlogged traceback while every other error is a logged line.
13. **A crash mid-write leaves a truncated file at the final path** (`export_job.py:33`). Write to a temp file and rename.
14. **No `encoding="utf-8"` on the CSV** (`export_job.py:33`). Under cron's minimal locale, a non-ASCII email can raise `UnicodeEncodeError`.
15. **Spreadsheet formula injection.** An email starting with `=`, `+`, `-` or `@` is run as a formula if finance opens the CSV in Excel.
16. **No retry on upload.** A single network blip fails the whole night.
17. **No authentication visible on the upload**, unless the URL carries a token. If it does, keep the URL out of logs.
18. **An empty day uploads a header-only file.** Confirm finance wants that.
19. **Re-running a day uploads it twice.** Whether that duplicates data depends on the endpoint.
20. **`fetchall` loads every row into memory.** Fine at current volume.
21. **`EXPORT_DIR` is hard-coded and assumed to exist.**
22. **No type hints.**

Items 1 to 4 are roughly an hour of work including tests, so merging tomorrow is realistic if those land first.

VERDICT: NOT READY
