**The job is close, but I would not merge it as it stands. Three small fixes, about an hour of work, should go in first.** The structure itself is good: four small functions with one job each, a parameterised query, a half-open date range (`>=` start, `<` end) so nothing is double-counted at midnight, and the connection is always closed.

I reviewed by reading only; I did not run the job or open `test_export_job.py`, so comments about tests rely on the docstring.

## Fix before merging

1. **A failed export looks like a successful one (`export_job.py:56-57`).** The `except Exception` logs one line and the script exits with code 0.
   - Example: finance's endpoint returns a 503 at 02:00. `raise_for_status()` raises, the job logs `export failed: 503 Server Error`, and cron records success. Finance has no file and nobody is alerted.
   - Expected: non-zero exit and a full traceback.
   - Fix: use `log.exception(...)` and then `raise` (or `sys.exit(1)`).

2. **Every customer email is written to the log (`export_job.py:52`).** `[row[1] for row in rows]` puts the full list of addresses into the log line.
   - Example: on a day with 4,000 paid invoices, that is 4,000 email addresses in one log line, kept wherever logs are shipped and retained.
   - Fix: log the count and the day only.

3. **The upload can hang forever (`export_job.py:42`).** `requests.post` has no timeout.
   - Example: the finance endpoint accepts the connection and then stalls. The job never finishes and never fails.
   - Fix: `timeout=(10, 120)` or similar.

## Check before merging

- **Which timezone "yesterday" means (`export_job.py:47`).** `date.today()` uses the server's local clock, while the query boundaries are interpreted in the database session's timezone. If `paid_at` is a timezone-aware column and the two differ, an invoice paid at 23:30 UTC could land in the wrong day's file or none. If both are UTC, this is fine.
- **The "finished" log line may never appear.** The script never configures logging, so Python drops `info` messages by default. Unless something else configures it, add `logging.basicConfig(level=logging.INFO)` under `__main__`.

## Fine to follow up after merge

- **No way to re-run a missed day.** The date is hard-coded to yesterday, so a failed Tuesday run cannot be recovered on Thursday without editing code. An optional `--date` argument solves this.
- **Tests cover only the CSV header and one row.** Worth adding: an invoice at exactly midnight on each boundary, an upload returning a 500 (which would pin fix 1), and an empty day.
- **Amount formatting.** `amount_cents / 100` writes 2000 cents as `20.0`, not `20.00`. Values are correct, but `f"{amount_cents / 100:.2f}"` is safer if finance parses strictly.
- **Importing the module requires `FINANCE_UPLOAD_URL`** (`export_job.py:16`). Reading it inside `upload()` makes the module easier to test.

VERDICT: READY WITH CHANGES
