Merge main (findings ledger, loop continuation) into usage-limit branch

Keeps the findings ledger, extra visits and on_exhausted=decide alongside the
run budget, failure classes, quota parking and error-loop backoff.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 14:35:54 +00:00
66 changed files with 3565 additions and 148 deletions
+19
View File
@@ -903,6 +903,25 @@ Retry replays the entire workflow; earlier edits or notifications are not undone
and may happen again. A missing original directory blocks retry rather than
silently using your current directory.
`pipelines retry <run-id> --extra-visits N [--stage KEY]` (wire fields
`retry_extra_visits` 1-5 and `retry_extra_stage`) continues a run whose loop
exhausted its visits (`max_visits`, the five-visit or 30-step cap) where it
stopped instead of re-running the visit that hit the cap: N extra visits go to
every exhausted stage, or with `--stage` to that stage only. Grants are
recorded on the run (`visit_grants`) and inherited by later retries; each
granted visit also lets the 30-step cap grow by one pass over the graph
(bounded at 120). It cannot be combined with `--mode=restart` or `--visit`.
A resumed retry also inherits the run's findings ledger as it stood before the
retried visit, and receives the failed visit's `output.md` and `private/`
files (bounded: 200 files, 1 MiB each, 8 MiB total) under
`previous-attempt/` in its turn directory, listed in its `input.md`'s
`# Previous attempt` section.
`pipelines inspect` lists the run's findings ledger (counts, open findings
most severe first, closed IDs) and its extra-visit grants; `--json` carries the
whole ledger (`findings`, with every status change) and `visit_grants`.
Retry is hidden and rejected while a run is executing or agent cleanup remains
active, even if a terminal status was already persisted. Run RPCs report
`executing` alongside status so clients can distinguish cleanup from completion.