# Plan: add a retry to the export job

An example narrative file for the `paired-plan` skill. It answers **why**. The state is in
`example-plan.json`.

## Problem

The nightly export fails when the storage API answers 503, and nobody notices until the next
morning. Observed on 2026-01-15 in the job logs: 3 failed nights out of the last 14, all with
a 503, and all fixed by running the job again by hand.

## Decisions

- **Retry in the job, not in the scheduler.** The scheduler cannot tell a 503 from a bad input,
  so it would also retry the failures that retrying cannot fix.
- **Three tries with growing waits (1 s, 4 s, 16 s).** The storage provider documents 503 as
  temporary. A longer wait would hide a real outage.
- **Log every retry.** A job that succeeds on the third try is a warning sign, so it must be
  visible.

## Risks

- A retry can write the same file twice. The upload uses a fixed file name, so a second write
  replaces the first.

## Rollback

Remove the `withRetry` wrapper in `src/export.ts`. Nothing else depends on it.
