social-reporting-tool/v2
DJP 376802db41 Pipeline retry: idempotent all + retry endpoint + UI buttons
The pipeline `all` command now skips stages whose .state/stage{N}.done
sentinel is present (unless --force), so retrying picks up exactly where
the previous run failed without re-spending on completed stages. Stage 5
(validate) is the deliberate exception — it always re-runs because
--drop-failing changes the selection set.

- pipeline/cli.ts: `all` wraps every stage in a maybeRun() helper that
  checks the sentinel + writes one after running. Validate runs every
  retry; if it doesn't reach 100% coverage the pipeline now fails LOUDLY
  with a clear error rather than crashing in Stage 6.
- routes/reports.ts: handleRetryReport — POST /api/reports/:id/retry,
  resets reports.status to pending (clears error_message + finished_at),
  spawns `pipeline cli all` with --drop-failing (and --force when the
  client passes {force:true}). Same singleton-running guard as run.
- operator-app: useRetryReport hook + two new buttons on Reports detail:
  - "Retry pipeline" / "Force re-run" on the failure panel.
  - "Retry with drop-failing" on the manifest panel (Stage 5 specific).

Items explicitly deferred (documented in head):
- SSE for live progress (3s React Query polling already in place).
- Conversational CLI brief intake (V3 §0; the operator-app form covers it).

62/62 unit tests pass. SPA build 284 kB.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 20:11:37 -04:00
..
db Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00
deploy deploy: chown briefs/ to uid 1000 so container can write per-report dirs 2026-04-29 20:06:56 -04:00
examples Briefs: import + export + demo brief; clean cli usage text 2026-04-29 19:48:36 -04:00
operator-app Pipeline retry: idempotent all + retry endpoint + UI buttons 2026-04-29 20:11:37 -04:00
pipeline Pipeline retry: idempotent all + retry endpoint + UI buttons 2026-04-29 20:11:37 -04:00
server Pipeline retry: idempotent all + retry endpoint + UI buttons 2026-04-29 20:11:37 -04:00
templates Per-report dashboard SPA (V3 §10a) — 9 interactive views 2026-04-29 20:06:12 -04:00
.env.example Finish V2: serve dashboards, downscale covers, post-run Apify cost re-poll, 2026-04-29 19:31:38 -04:00
.gitignore Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00
docker-compose.v2.dev.yml Drop db-v2 host port binding in prod; add port pre-flight to cutover script 2026-04-29 18:49:44 -04:00
docker-compose.v2.prod.yml Drop db-v2 host port binding in prod; add port pre-flight to cutover script 2026-04-29 18:49:44 -04:00
docker-compose.v2.yml Bake VITE_AZURE_* into the SPA at docker build time; sweep V1 leftovers in cutover 2026-04-29 19:00:15 -04:00
Dockerfile.v2 Per-report dashboard SPA (V3 §10a) — 9 interactive views 2026-04-29 20:06:12 -04:00
package-lock.json Per-report dashboard SPA (V3 §10a) — 9 interactive views 2026-04-29 20:06:12 -04:00
package.json Per-report dashboard SPA (V3 §10a) — 9 interactive views 2026-04-29 20:06:12 -04:00
tsconfig.base.json Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00
tsconfig.json Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00
vitest.config.ts Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00