`export_job.py` is not ready to merge tomorrow: a failed export still exits successfully, so finance can silently miss a day of invoices, and customer emails are written to the logs. Both fixes are small, but neither is in place and there are no tests around them.

I read the file only; nothing was run. The docstring names `test_export_job.py`, but that file is not in this folder, so I could not check what it covers.

## Blocking

1. **Failures are swallowed (high).** `run()` catches every exception, logs one line, and returns normally (`export_job.py:56-57`).
   - Example: the finance endpoint returns 503 at 02:00. The job logs "export failed" and exits with code 0, where it should exit non-zero so cron alerts.
   - The log line also drops the traceback.
   - Fix: use `log.exception` and re-raise, or exit with code 1.

2. **Customer emails are logged (high).** `export_job.py:52` writes the full list of customer emails for the day into the log on every run. That is personal data in log storage, and the line grows with invoice count. Log the count only.

3. **The upload has no timeout (high).** `requests.post` at `export_job.py:42` waits indefinitely if the finance endpoint hangs. The job then holds its database connection open and never finishes or fails. Add `timeout=`.

4. **The day boundary depends on the server timezone (high, if `paid_at` is timezone-aware).** `date.today()` uses the server's local time, and the query compares bare dates against `paid_at` in the database session's timezone (`export_job.py:47`, `:28`).
   - Example: if the server is on US Eastern, the database session is UTC and `paid_at` is `timestamptz`, an invoice paid at 21:00 Eastern on the 13th is stored as 02:00 UTC on the 14th. The export for the 13th leaves it out and it appears in the next day's file.
   - I can't see the schema or server config, so confirm which timezone finance means by "yesterday" and make the boundaries explicit.

## Should fix, can follow the merge if you accept the risk

5. **No way to re-run a missed day (medium).** The date is fixed to yesterday inside `run()`. If a night fails, recovering that day means editing code. Accept an optional date argument.

6. **Re-runs can duplicate data at finance (medium).** A retry after a partial failure uploads the same file again with nothing identifying it as a repeat. Whether that matters depends on whether the finance endpoint de-duplicates, which I can't see.

7. **Amounts are converted with float division (medium).** `amount_cents / 100` at `export_job.py:37` writes 1999 as `19.99` but 1000 as `10.0`, and assumes every currency has two decimal places. JPY amounts would come out 100 times too small if they are stored in whole yen. Format with `Decimal` or integer arithmetic, per currency.

8. **Tests cover only the CSV header and one row (medium).** That is by the docstring's own description. There are no tests for upload failure, the date window, an empty day, or amount formatting. These should accompany fixes 1, 3, 4 and 7.

## Minor

9. **No logging setup (low).** Run as a script, the two `log.info` lines go nowhere because nothing configures logging; only the error line reaches stderr.
10. **Import-time environment lookup (low).** `UPLOAD_URL = os.environ[...]` at `export_job.py:16` makes importing the module fail with a `KeyError` when the variable is unset, which also complicates testing. Read it inside `run()`.
11. **All rows loaded into memory (low).** `fetchall()` is fine at current volumes but will not scale to a very large day.
12. **Empty days still upload a header-only file (low).** Confirm that is what finance wants.
13. **CSV files accumulate (low).** Files in `/var/exports` are never cleaned up and contain customer emails.
14. **No authentication on the upload (low, unverified).** The request sends no credentials, so check that the URL itself is not the only protection.

Items 1 to 3 are a few lines each, and item 4 is mostly a decision. With those done and tested, this could merge soon after.

VERDICT: NOT READY
