No, it isn't ready to merge tomorrow. There are two blocking problems. First, when the export fails, nobody finds out. Second, every customer's email address gets written to the logs each night. Also, the test file the docstring mentions, `test_export_job.py`, isn't in this folder, so I couldn't find any tests. I only read the code and didn't run anything.

## Blocking

**1. Failures are silent (High).** `export_job.py:56-57` catches every exception, logs one line and returns normally, so cron sees a successful run.
- Example: the finance endpoint returns a 500. `raise_for_status()` raises, the job logs `export failed: 500 Server Error`, and the process exits with code 0. Finance gets no file and nobody is alerted.
- Expected: the process exits non-zero so cron or your monitoring flags it.
- Fix: use `log.exception(...)` (which also keeps the stack trace that `log.error` drops), then re-raise. Leave the `finally: conn.close()` in place.

**2. Customer emails go into the logs (High).** `export_job.py:52` logs `[row[1] for row in rows]`, which is every customer email in the export, every night. That puts personal data into wherever your logs are sent and kept. Log only the count.

## Should fix before merge

**3. Amounts are wrong for some currencies (Medium-High).** `amount_cents / 100` at line 37 assumes every currency has two decimal places, and it produces a float.
- Example: a ¥500 invoice is stored as `500`, and the CSV says `5.0`.
- Example: `100` cents comes out as `1.0` and `10` cents as `0.1`, where finance probably expects `1.00` and `0.10`.
- Fix: use `Decimal` with a decimal-places-per-currency lookup, or simply export `amount_cents` as an integer and let finance convert it. Check with finance which format they expect.

**4. No HTTP timeout (Medium).** `requests.post` at line 42 has no `timeout`. If the endpoint hangs, the job hangs forever and the next night's run piles up behind it. Add something like `timeout=60`.

**5. Timezone boundary is unclear (Medium).** `date.today()` uses the server's local timezone. A plain `date` passed into the query becomes midnight in the Postgres session's timezone. If `paid_at` is `timestamptz` and those two timezones differ from the one finance means by "yesterday", invoices near midnight end up in the wrong day's file or get missed. Choose the timezone explicitly, for example by building UTC datetimes for the start and end of the day.

**6. A missed night can't be re-run (Medium).** The date is hardcoded to "yesterday" (line 47). If tonight's run fails, there's no supported way to export that date tomorrow. Let `run(day=None)` take an optional date and accept a `--date` CLI argument.

**7. Tests are missing or too thin (Medium).** The docstring says the tests cover only "CSV header and one row", and that test file doesn't exist here. The bare minimum before merge:
- An upload failure makes the job exit non-zero.
- A day with no invoices produces the expected output (currently a header-only file gets uploaded; confirm finance wants that).
- Amount formatting, including a non-two-decimal currency.
- The day boundaries passed to the query.

## Low (fine as follow-ups)

8. `UPLOAD_URL = os.environ[...]` at line 16 runs when the module is imported, so importing it in tests or tools without that variable set crashes with `KeyError`. Read it inside `run()` instead.
9. `__main__` never configures logging, so the `log.info` lines are dropped (Python only shows warnings and above by default). Add `logging.basicConfig(level=logging.INFO)`.
10. The CSV is written straight to its final path with default file permissions. It contains personal data in `/var/exports`, so restrict who can read it, and consider writing to a temporary file and renaming it so a crash doesn't leave a half-written file behind.
11. Values in the CSV aren't escaped against spreadsheet formula injection. For example, an email starting with `=` would be treated as a formula if finance opens the file in Excel. The risk is low but worth knowing about.

Given the deadline, the smallest change that makes this mergeable is fixes 1, 2 and 4 (a few lines each) plus a test for the upload failure. Fixes 3 and 5 need a quick answer from finance on amount format and timezone. If they can't answer by tomorrow, record both as tracked debt with a ticket and don't leave them unrecorded.

VERDICT: NOT READY
