**Not quite ready to merge as it stands, but the fixes are small and you can finish them before tomorrow.** The structure is good: query, CSV writing, upload and orchestration are separate functions, the SQL is parameterized, the date window is half-open, and the connection always closes.

**Fix before merging**

1. **Failures are silent.** `run()` catches every exception, logs it, and exits 0 (`export_job.py:56-57`).
   - Example: the finance endpoint returns a 500. `raise_for_status()` raises, the job logs one line, and cron sees success. Finance never gets the file and nobody is alerted.
   - Fix: re-raise after logging with `log.exception(...)`, or call `sys.exit(1)`. Then cron's own failure alerting works.

2. **Customer emails go into the logs.** Line 52 logs the full list of emails for every invoice. Those logs are likely retained and visible to more people than the finance data is.
   - Fix: log only the count and the date.

3. **The upload has no timeout.** `requests.post` with no `timeout=` can hang forever if the endpoint stalls. At 02:00 the job would sit there until someone notices.
   - Fix: add `timeout=30` or similar.

**Worth fixing, but they won't block the merge**

- **Amount formatting.** `amount_cents / 100` turns 1000 into `10.0` and relies on float rounding. If finance parses this strictly, use `Decimal(amount_cents) / 100` formatted to two places. Also check whether any currency has no cents, such as JPY.
- **Timezone.** `date.today()` uses the server's local time, while `paid_at` is compared against bare dates. If `paid_at` is stored in UTC and the server isn't in UTC, invoices near midnight can land on the wrong day. Pick one timezone and state it.
- **Import-time environment read.** `UPLOAD_URL = os.environ[...]` (line 16) makes `import export_job` raise `KeyError` when the variable is unset. That includes tests that don't set it. Reading it inside `run()` avoids that.

**Tests.** `test_export_job.py` covers only the CSV header and one row. Before merging, add at least these three:
- The upload failing propagates an error.
- An empty day writes a header-only file.
- The date boundaries are handled correctly: a `paid_at` of 23:59:59 on the day is included, and 00:00:00 the next day is excluded.

The first test would also have caught problem 1.

I haven't run the code or the tests. This is from reading the file.

VERDICT: READY WITH CHANGES
