No, it isn't ready to merge tomorrow. Two things block it. When the job fails, it hides the failure from cron, so finance just gets no file and nobody is told. And it writes every customer's email address into the logs. There are also test gaps. The file says it is covered by `test_export_job.py`, but that file isn't in this folder, so I couldn't check any tests.

## Blockers

**1. Failures are swallowed (High)** — `export_job.py:56-57`
`run()` catches every exception, logs one line and returns normally. The process exits with code 0, so cron and any monitoring treat it as a success.
- **Example:** the finance endpoint returns 500, so `raise_for_status()` raises an error. The job logs `export failed: 500 ...` and exits 0. Finance gets no file for that day and no alert fires. It should exit non-zero, either by re-raising after logging or calling `sys.exit(1)`, and use `log.exception` so the stack trace is kept.

**2. Customer emails written to the logs (High)** — `export_job.py:52`
`[row[1] for row in rows]` puts every customer email for the day on one log line. That is personal data going to wherever your logs are shipped and kept. Log only the count.

**3. Tests missing, and too thin even if they exist (High under your TDD standard)**
`test_export_job.py` isn't in this directory. Even as described ("CSV header and one row"), it would not cover:
- a failed upload causing a non-zero exit
- a day with zero rows
- how amounts are formatted
- the date window boundaries (midnight to midnight)
- the job crashing when `FINANCE_UPLOAD_URL` is missing

## Should fix before or soon after merge

**4. Upload has no timeout (Medium)** — `export_job.py:42`
`requests.post` has no `timeout`. If the endpoint hangs, the 02:00 job hangs with it, possibly until the next night's run. Add something like `timeout=60`, and consider a retry.

**5. Amounts are converted to floats (Medium)** — `export_job.py:37`
`amount_cents / 100` produces a float.
- **Example:** 2900 cents is written as `29.0`, not `29.00`, which finance tools may reject or misread.
- **Example:** currencies without cents break. A JPY invoice of ¥500 stored as `500` comes out as `5.0`.

Use `Decimal` with a fixed format, and divide based on the currency.

**6. Timezone of "yesterday" is unclear (Medium)** — `export_job.py:28,47`
`date.today()` uses the server's local timezone, and Postgres turns the date into midnight in the database session's timezone. If those differ from the timezone finance means by "yesterday" (or from each other), invoices near midnight can land on the wrong day's export or be missed. Pick one timezone (probably UTC) and state it explicitly.

**7. A missed day can't be re-run (Medium)** — `export_job.py:47`
The date is always hard-coded to yesterday. If one night fails (which, because of blocker 1, nobody would notice), there's no way to export that day later. Accept an optional date argument.

**8. Config is read when the module loads (Low)** — `export_job.py:16`
`os.environ["FINANCE_UPLOAD_URL"]` runs at import time, so importing the module without that variable set (for example in a test) fails with a `KeyError`. Read it inside `run()` or `upload()`.

**9. The CSV containing personal data stays on disk (Low)** — `export_job.py:48`
Customer emails pile up in `/var/exports` with default file permissions and no cleanup. Decide how long these files are kept and who can read them.

**10. Empty days (Low, needs a decision)**
With zero invoices the job uploads a file with only the header row. That's probably fine, but check that finance expects it.

## What I need from you
- Where is `test_export_job.py`? If it's somewhere else, point me to it and I'll review it too.
- Does finance actually need `customer_email` in the CSV? If not, removing the column also takes care of most of 2 and 9.

Fixes 1, 2 and 4 are a few lines each. Together with tests for the failure path, they could realistically be done before tomorrow. Items 5–7 are judgment calls you could accept as known gaps and track as follow-up work.

VERDICT: NOT READY
