`export_job.py` is not ready to merge as it stands: three defects would hurt in production, and the test file its docstring names is not where I looked. The fixes are small, roughly half a day, so tomorrow is still reachable if they land first.

I reviewed by reading the file only; nothing was executed. No requirements document was available, so I judged it against the module docstring: export yesterday's paid invoices to finance every night.

## Must fix before merge

**1. A failed export looks like a successful one (high).**
- Lines 56-57 catch every exception, log one line, and let the process exit with code 0.
- Concrete case: the finance endpoint returns 500 at 02:00. Expected: cron sees a non-zero exit and someone is alerted. Actual: exit 0, no stack trace, and finance has no file for that day.
- Fix: use `log.exception(...)` and re-raise, or `sys.exit(1)`.

**2. A missed day cannot be re-exported (high, compounds 1).**
- Line 47 hardcodes the day to yesterday, with no date argument.
- If Tuesday's run fails, Wednesday's run exports only Tuesday's invoices, and Monday's are never sent unless someone edits the code.
- Fix: accept an optional `--date` argument that defaults to yesterday.

**3. Customer email addresses are written to the log (high).**
- Line 52 logs the full list of `customer_email` values for every run.
- This puts personal data in log storage, which usually has wider access and longer retention than the database.
- Fix: log the count only.

**4. The upload can hang forever (medium-high).**
- Line 42 calls `requests.post` with no `timeout`, and `requests` has no default timeout.
- If the endpoint accepts the connection and stalls, the job never ends and holds its database connection open.
- Fix: add `timeout=(10, 120)` or similar.

**5. Tests are missing for everything that can go wrong (high against your own standards).**
- The docstring says `test_export_job.py` covers the CSV header and one row.
- That file is not in the working directory next to `export_job.py`, so I could not confirm even that. I could not search other folders.
- There is no stated coverage for the date window, the upload, or the failure path.
- Minimum to add: the failure path exits non-zero, the query window is yesterday 00:00 to today 00:00, upload raises on a non-2xx response, and an empty day.

## Should fix, can follow the merge if you name the debt

- **Logging is never configured (medium).** Run as a script, Python drops the `info` lines (41, 52, 55) and prints errors as bare text to stderr with no timestamp. Add `logging.basicConfig(...)` under `__main__`.
- **Amount formatting is inconsistent (medium-low).** Line 37 divides by 100 as a float, so 1010 cents is written as `10.1` and 2000 cents as `20.0`. Use `f"{amount_cents / 100:.2f}"` or `Decimal`.
- **Importing the module requires an environment variable (low).** Line 16 reads `FINANCE_UPLOAD_URL` at import time, so any test importing the module fails with `KeyError` unless it is set. `DATABASE_URL` is read inside `run()` (line 49); do the same for both.
- **Export files pile up (low).** Files containing customer emails are written to `/var/exports` (line 48) and never deleted, and a failed run leaves a partial file behind.
- **Database connection failure is not logged (low).** `connect` on line 49 sits outside the `try`. It does exit non-zero, which is the right behaviour, but it is inconsistent with the rest.
- **All rows are loaded into memory (low).** `fetchall()` on line 29 is fine at today's volume if a day is thousands of rows, not millions.

## Speculative, depends on things I could not see

- **Time zone boundary.** "Yesterday" comes from the server's local clock (line 47), while the query compares against `paid_at` in the database session's time zone. If the two differ, or `paid_at` is stored in UTC and finance expects local days, invoices near midnight land in the wrong file. This depends on the column type and server settings.
- **Non-two-decimal currencies.** Dividing by 100 is wrong for yen (no minor unit) or Kuwaiti dinar (three decimals), if you bill in those.
- **No authentication on the upload.** Line 42 sends no credentials. That is fine if the URL carries a token or the network is private.
- **Spreadsheet formula injection.** An email starting with `=` would run as a formula if finance opens the CSV in Excel. This only matters if email values are not validated upstream.
- **Empty days.** A day with zero paid invoices uploads a header-only file. Confirm finance wants that and not no file.

## What is good

The query is parameterised, the connection is always closed, the functions are small and single-purpose, and the CSV is opened with `newline=""` as it should be.

VERDICT: NOT READY
