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
+11
View File
@@ -50,6 +50,12 @@ type Stage struct {
type StageLimits struct {
MaxVisits int `json:"max_visits"`
On []string `json:"on,omitempty"`
// OnExhausted is "fail" (the default) or "decide": the runner parks the run
// on an operator decision (accept / continue / abort) instead of failing
// when this stage's loop exhausts its visits.
OnExhausted string `json:"on_exhausted,omitempty"`
// AcceptTo is the target of the "accept" decision (default #success).
AcceptTo string `json:"accept_to,omitempty"`
}
type NotificationPolicy struct {
@@ -216,6 +222,11 @@ type Message struct {
BudgetUSD float64 `json:"budget_usd,omitempty"`
// RunSettings is the get/set_run_settings body and reply.
RunSettings *RunSettings `json:"run_settings,omitempty"`
// RetryExtraVisits (1-5) grants extra visits to a resumed loop: to
// RetryExtraStage when set, otherwise to the stage(s) that exhausted their
// visits. The resume continues the exhausted loop instead of failing again.
RetryExtraVisits int `json:"retry_extra_visits,omitempty"`
RetryExtraStage string `json:"retry_extra_stage,omitempty"`
// Search is the broad, read-only search traffic over pipelines, versions,
// runs, steps, field text and artifacts. See search.go for the per-type
// payloads and the ranking/kind/bound vocabulary.