--retry-failed reaches the UI

The CLI could retry failed upload jobs; the web app couldn't, so a run
that hit a bug (twice today) left work only a terminal could reclaim.
/api/pipeline now reports the failed count, and the upload card grows a
"retry N failed" checkbox — shown only when there are failures — that
rides along with both Dry run and the real Upload. Help explains why
failures are skipped by default.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016jXZFSTZQKzAC8fqpWSz9g
This commit is contained in:
Eric Wagoner
2026-08-05 22:44:23 -04:00
co-authored by Claude Fable 5
parent 9283a3e980
commit e49d1234d6
4 changed files with 37 additions and 13 deletions
+8 -4
View File
@@ -113,17 +113,21 @@ def test_upload_defaults_to_dry_run(tmp_path):
calls = []
jobs = JobRunner()
def upload(dry_run=True, limit=None):
calls.append({"dry_run": dry_run, "limit": limit})
def upload(dry_run=True, limit=None, retry_failed=False):
calls.append({"dry_run": dry_run, "limit": limit, "retry_failed": retry_failed})
web = _app(cfg, stages={"upload": upload}, jobs=jobs)
web.post("/api/run/upload") # no body: the safe direction
jobs.wait()
web.post("/api/run/upload", json={"dry_run": False, "limit": 2})
jobs.wait()
# a failed job is skipped on normal runs; the UI opts back in
web.post("/api/run/upload", json={"dry_run": False, "retry_failed": True})
jobs.wait()
assert calls == [
{"dry_run": True, "limit": None},
{"dry_run": False, "limit": 2},
{"dry_run": True, "limit": None, "retry_failed": False},
{"dry_run": False, "limit": 2, "retry_failed": False},
{"dry_run": False, "limit": None, "retry_failed": True},
]