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:
@@ -54,9 +54,13 @@ Each visit gets `input.md`, `memory.md`, `history.md`, `output.md` and `private/
|
||||
in `<run>/stages/<seq>-<stage>/`, plus the run-level shared `public/` addressed by
|
||||
its absolute path.
|
||||
|
||||
- `memory.md` (capped at 4 KB, always inlined in the prompt): the run task, the
|
||||
previous stage's `# handoff` with its outcome and `public/` additions, a
|
||||
one-line-per-stage outcome ledger and the server-captured changed files.
|
||||
- `memory.md` (about 20 KB, always inlined in the prompt), in priority order:
|
||||
the run task (never truncated), the previous stage's `# handoff` with its
|
||||
outcome and `public/` additions, the open findings ledger, this stage's own
|
||||
previous handoff, a one-line-per-stage outcome ledger and the server-captured
|
||||
changed files. Lower-priority sections shrink first.
|
||||
- `findings.md`: the run's whole findings ledger with every status change
|
||||
(written when the run has one).
|
||||
- `input.md`: the run task, plus on later turns the previous turn's full output
|
||||
(`internal/turn/render.go`). A stage with `read` reads it on demand; a stage
|
||||
without `read` gets it inlined (up to 32 KB) on every call, so give `read` to
|
||||
@@ -96,6 +100,60 @@ The `{ "outcome": ..., "output": ... }` JSON envelope and its format-repair ladd
|
||||
are retired: never ask for JSON fields or invent server sections. Missing tools or
|
||||
evidence route to `blocked` when declared, else `error`; never fabricate a result.
|
||||
|
||||
## Findings ledger
|
||||
|
||||
The runner keeps one findings ledger per run and shows it to every later visit
|
||||
(open items in `memory.md`, everything in `findings.md`), in `inspect` and in
|
||||
the app's Findings tab. Any model stage may add an optional `# findings`
|
||||
section to `output.md`, one item per line:
|
||||
|
||||
````markdown
|
||||
# findings
|
||||
|
||||
- important introduced internal/cache.go:42: eviction never runs
|
||||
- nit pre-existing -: helper names are inconsistent
|
||||
- F3 fixed: evict on write; test added
|
||||
- F4 dismissed: intended behaviour, documented in README
|
||||
- F5 settled: operator accepted the trade-off
|
||||
- F2 open: the fix misses the error path
|
||||
````
|
||||
|
||||
A new finding is `<severity> <origin> <file:line or ->: <summary>` with
|
||||
severity `critical`, `important`, `minor` or `nit` and origin `introduced` or
|
||||
`pre-existing`. The runner assigns stable IDs (`F1`, `F2`, ...). A status line
|
||||
is `<id> fixed|dismissed|settled|open: <reason>`. Dismissed and settled items
|
||||
are closed for good: re-raising one (same location and summary) or reopening it
|
||||
is ignored; re-raising a fixed one reopens it. Prompts need not restate this
|
||||
syntax (the runner explains it); tell reviewers to reference IDs and to raise
|
||||
only new problems.
|
||||
|
||||
Route on the ledger mechanically with a findings gate instead of a model
|
||||
triage stage:
|
||||
|
||||
````markdown
|
||||
# stage triage
|
||||
|
||||
```configs
|
||||
type=findings
|
||||
severity=important
|
||||
origin=introduced
|
||||
```
|
||||
|
||||
```limits
|
||||
{"max_visits":3}
|
||||
```
|
||||
|
||||
```edges
|
||||
open -> implement
|
||||
clear -> land
|
||||
```
|
||||
````
|
||||
|
||||
The outcome is `open` when any open finding has at least `severity` (default
|
||||
`important`) and the given `origin` (default `introduced`; `pre-existing` or
|
||||
`any`), otherwise `clear`. No model runs. Only `open`, `clear` and `error`
|
||||
edges are allowed.
|
||||
|
||||
## Configs
|
||||
|
||||
- `provider`/`model`: exact IDs validated during server setup. Templates
|
||||
@@ -122,6 +180,10 @@ evidence route to `blocked` when declared, else `error`; never fabricate a resul
|
||||
check stage.
|
||||
- `allow_workspace_changes=true`: lets a stage with `shell` but no `edit` leave file changes
|
||||
in the run directory (below).
|
||||
- `resume_session=true`: on a loop visit, resume this stage's previous harness
|
||||
session instead of starting a cold one (Claude harness only; others start
|
||||
fresh; a session Claude Code no longer has starts fresh). Use it for
|
||||
implementers that re-enter after review; keep reviewers fresh.
|
||||
- `auto_skip=false`: disable the server skip fallback for a stage that declares a
|
||||
`skipped` edge (`references/operations.md`, Server skip fallback).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user