Add stage execution limits and result-first workflow views

This commit is contained in:
2026-10-10 03:03:46 +01:00
parent 7b10e3889e
commit a66d540125
35 changed files with 1392 additions and 93 deletions
+43
View File
@@ -309,6 +309,49 @@ Quit with `:quit`, not `q`; Ctrl+C remains an interrupt.
JSON results go to stdout, errors to stderr (JSON error envelopes when requested),
and failures exit nonzero. Export/template `--source` deliberately prints raw
Markdown. `--timeout` bounds each server request and the optional wait duration.
It does not change the stage execution timeout.
### Stage limits
Model-stage `configs` support these optional settings:
```text
retries=2
timeout=1h
budget_usd=1.50
budget_tokens=50000
```
Retries default to **2** (three total attempts); timeout defaults to **one hour
per attempt**. Omitted budgets are unlimited; configured budgets must be positive.
Each budget covers all attempts, format-only repairs, and repeated visits to that
stage in one run. A new run starts new accounting. Tokens include input, output,
reasoning, and cache reads/writes. USD amounts use OpenCode's reported cost.
Missing or invalid required accounting stops the stage rather than counting zero.
Usage is polled during execution and read again afterward; an in-flight request
may exceed a limit before usage arrives. These are not provider-side hard caps.
Automatic retries cover retryable transport failures and per-attempt timeouts.
They do not replay admitted tool work, invalid results, or budget failures.
Cleanup must be confirmed before another attempt. Existing explicit `retries=0`
settings remain unchanged. The old 30-minute run deadline no longer truncates
stage timeouts; the 30-step and five-visits-per-stage limits still apply.
Native ntfy stages also accept `timeout` (default `1h`), but never automatically
retry potentially delivered notifications and do not accept model budgets.
Pinned definitions contain the configured limits. Run transcripts retain limits,
attempt counts and reported budget usage, also shown in the TUI's Evidence pane.
### Result-first views
Home shows retained result previews and completed visits alongside each run and
pipeline. Pipeline pages show the latest result for the **selected version**,
not a result from a different published definition. Run opens focused on results,
with output before input and the graph below. Failed or ongoing runs preserve
partial output and completed stage reports without labeling them final success.
These previews quote recorded output; they do not independently verify model claims.
Tab still expands the focused graph, stage list, or result pane; `n`/`p` still
navigate recorded visits, including repeated stages.
## Verification scope