I wouldn't merge this tomorrow as it stands. Three problems block it: a failed export looks like a success, every customer email gets written to the logs, and the tests the file mentions don't exist. All three are small to fix, so it can probably still make tomorrow's merge if you fix them today.

## Must fix before merge

**1. Failures are hidden: 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 record a success. For example, if the finance endpoint returns a 500, `raise_for_status()` raises, the error is logged as `export failed: 500 Server Error`, and the process still exits 0. Finance gets no file and nobody is alerted. You'd expect a non-zero exit and an alert. Fix: use `log.exception(...)` and then `raise` (or `sys.exit(1)`). `log.exception` also keeps the traceback, which the current `log.error` throws away.

**2. Customer emails go into the logs: High** (`export_job.py:52`)
`[row[1] for row in rows]` logs every customer's email at INFO level every night. That's personal data spreading into log storage, and it's a likely compliance finding. Log only the count.

**3. The tests are missing: High**
The docstring says it is "Tested by test_export_job.py", but there is no such file in this directory. Even the tests it describes (CSV header and one row) wouldn't cover the risky parts. The minimum I'd want:
- the date window for "yesterday"
- converting the stored amount to the CSV value
- an upload failure making `run()` fail
- an empty day
- a test that the log contains no emails

## Should fix (soon after merge is acceptable, but track it)

**4. Money is written as a float, and every currency is assumed to have 2 decimal places: Medium-High** (`:37`)
`amount_cents / 100` turns `1000` into `10.0` and creates float artifacts. It's also wrong for currencies that don't use 2 decimals. If a JPY invoice is stored as `500` (¥500), the export says `5.0`. KWD and BHD use 3 decimals. Format with `Decimal` and the currency's minor-unit exponent. I'm assuming amounts are stored in minor units; please confirm.

**5. "Yesterday" depends on the server's timezone: Medium** (`:28, :47`)
`date.today()` uses the host's local time, and the naive date bounds are read in the Postgres session timezone. If those differ from finance's reporting timezone, invoices near midnight land in the wrong day's file. Pin the timezone explicitly, for example by building UTC-aware bounds.

**6. The upload has no timeout: Medium** (`:42`)
`requests.post` with no `timeout` can hang forever, and the next night's run will pile up behind it. Add something like `timeout=60`.

**7. Customer data stays on disk: Medium** (`:48`)
Each night's CSV, with customer emails in it, stays in `/var/exports` indefinitely with default permissions. Delete it after a successful upload, or set restrictive permissions and a retention policy.

**8. A missed night can't be re-run: Low-Medium** (`:47`)
The day is hard-coded to yesterday, so a failed night can't be exported later without editing code. Accept an optional date argument.

**9. Settings are read when the module is imported: Low** (`:16`)
`os.environ["FINANCE_UPLOAD_URL"]` runs at import, so just importing the module (for example, in a test) raises `KeyError` unless that variable is set. Read it inside `run()` or `upload()`.

**10. Spreadsheet formula injection: Low** (`:37`)
If finance opens the CSV in Excel, an email field that starts with `=`, `+`, `-` or `@` runs as a formula. Prefix such values with a `'`.

**11. Empty days: Low**
On a day with no invoices, a header-only file is still uploaded. That may be fine, but confirm finance expects it.

If you want, I can write the test file and make fixes 1, 2, 6 and 9 now. Together they're about 30 minutes of work and would make this mergeable.

VERDICT: NOT READY
