**Not ready to merge tomorrow.** If the upload fails, the job still reports success to cron, so nobody would find out that finance didn't get the file. It also writes every customer's email address into the logs. Both are small fixes, and the structure is solid: the functions are small and focused, the query uses parameters, and the connection is always closed. The test file the docstring mentions, `test_export_job.py`, isn't in the folder, so I couldn't check what it covers.

## Critical (block merge)

1. **Failures are hidden** (`export_job.py:56-57`). `except Exception` logs the error and returns normally, so the process exits with code 0.
   - Example: the finance endpoint returns 500. The log gets one line, cron records a success, and finance gets no file. Nobody is alerted.
   - `log.error` also drops the traceback.
   - Fix: use `log.exception(...)` and then `raise`, or `sys.exit(1)` in `__main__`.

2. **Customer emails go into the logs** (`:52`). The `[row[1] for row in rows]` part writes every email address to the logs each night, which is a privacy and compliance problem. Log only the count.

## High

3. **Money as a float, and two decimal places assumed for every currency** (`:37`).
   - `100 / 100` writes `1.0` instead of `1.00`.
   - JPY has no minor unit. If `amount_cents=500` means ¥500, the file says `5.0`.
   - KWD has three decimal places, so it breaks the other way.
   - Fix: use `Decimal` with a per-currency exponent, or export the integer minor units and let finance convert.

4. **No timeout on the upload** (`:42`). If the endpoint stalls, `requests.post` waits forever and the job never finishes or fails. Add `timeout=`.

5. **"Yesterday" depends on time zones.** `date.today()` uses the server's local zone. If `paid_at` is a `timestamptz`, the date bounds are read in the database session's zone.
   - Example: the server runs in UTC and the database session in US/Eastern. Invoices paid between 00:00 and 05:00 UTC land in the wrong day's file.
   - Depending on how the zones line up, they can be dropped or exported twice.
   - Fix: build explicit UTC (or finance-agreed) datetime bounds.

6. **Tests are missing or too thin** (`:3`). `test_export_job.py` isn't in this folder. Even as the docstring describes it (header plus one row), nothing covers:
   - an upload failure or a database failure making the job exit non-zero
   - a day with no invoices
   - amount formatting (`100`, `5`, zero-decimal currencies)
   - the start and end of the date range
   - the log line leaving out emails

## Medium

7. **The upload URL is read when the module is imported** (`:16`). Just importing the module, including in tests, raises `KeyError` if `FINANCE_UPLOAD_URL` isn't set. Read it inside `run()`, as you already do for `DATABASE_URL`.

8. **There's no way to export a specific day.** The day is fixed to "yesterday". If a night fails, someone has to edit code or fake the clock to backfill it. Let `run(day=None)` take an optional date (or a CLI argument).

9. **No retry on the upload.** One network blip loses the night's export. Even a simple retry with backoff, or a documented manual rerun (see item 8), would cover this.

10. **Logging is never set up** (`:62-63`). Without `logging.basicConfig`, the two `log.info` lines are thrown away when the script runs from cron. Only warnings and errors reach stderr.

## Low / minor

11. **Partial files can be left behind** (`:33`). A crash halfway through `write_csv` leaves a truncated CSV in `/var/exports`. Write to a temporary file and rename it when done.
12. **Formula injection in spreadsheets.** An email starting with `=`, `+`, `-` or `@` runs as a formula when finance opens the CSV in Excel. Sanitize those values if finance uses spreadsheets.
13. **Empty days upload a header-only file.** That may be what you want; confirm with finance.
14. **`fetchall()` loads the whole day into memory.** Fine at today's volume; a server-side cursor would scale better.
15. **`EXPORT_DIR` is hardcoded** and isn't created if it's missing. Consider an environment variable with a default.
16. **No type hints or function docstrings.** Cosmetic, but they would make the money and date types clear.

Items 1, 2, 4 and 7 are each a line or two. Item 3 and the tests in item 6 are the real work, and those are what would let you merge with confidence.

VERDICT: NOT READY
