Engine: run findings ledger, findings gate, loop continuation, larger memory, loop lint, retry partial work, resume_session

- Runner-owned findings ledger per run: stages report a # findings section
  (new items and F<n> status changes); stable IDs, persisted (run_loop_state),
  in RunDetail.findings, findings.md, memory.md, inspect.
- type=findings gate stage routes open/clear on the ledger mechanically.
- retry --extra-visits N [--stage KEY] continues an exhausted loop; limits
  on_exhausted=decide parks the run on accept/continue/abort.
- Essential memory cap 20 KB, task never truncated, handoff and open findings
  ahead of the outcome ledger.
- Lint rejects limits.on outcomes on forward edges; warns on ineffective
  limits and resume_session.
- A resumed retry carries the failed visit's output.md and private/ under
  previous-attempt/.
- resume_session=true resumes a Claude stage's previous session on loop visits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 14:22:28 +00:00
parent c4de1de27b
commit 34b8b94223
39 changed files with 2314 additions and 132 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 {
@@ -208,6 +214,11 @@ type Message struct {
RetryVisit int `json:"retry_visit,omitempty"`
RetryVersion int `json:"retry_version,omitempty"`
RetryInput map[string]any `json:"retry_input,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.