@giamme/forge 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +77 -0
- package/README.md +1 -1
- package/SKILL.md +31 -12
- package/VERSION +1 -1
- package/docs/add-ons.md +11 -6
- package/docs/artifacts.md +18 -6
- package/docs/commands.md +189 -17
- package/docs/decomposed-runs.md +13 -5
- package/docs/forge-ui.md +34 -4
- package/docs/memory.md +2 -1
- package/docs/models.md +4 -2
- package/docs/reviews.md +81 -19
- package/docs/troubleshooting.md +3 -1
- package/forge +17 -1
- package/package.json +1 -1
- package/references/dataset.md +40 -14
- package/references/decision-models.md +759 -0
- package/references/decompose.md +197 -28
- package/references/harnesses.md +10 -3
- package/references/planning.md +8 -0
- package/references/solo.md +13 -3
- package/references/ui.md +11 -0
- package/scripts/forge-artifact.sh +30 -4
- package/scripts/forge-config.py +238 -29
- package/scripts/forge-contract.py +127 -58
- package/scripts/forge-control.py +40 -9
- package/scripts/forge-decide.py +6 -0
- package/scripts/forge-dispatch.sh +47 -15
- package/scripts/forge-fail-first.py +2 -2
- package/scripts/forge-gate-addressed.sh +40 -0
- package/scripts/forge-gate-message.sh +64 -0
- package/scripts/forge-issues.py +368 -36
- package/scripts/forge-jev-options.sh +269 -42
- package/scripts/forge-lib-attribute.sh +447 -0
- package/scripts/forge-lib-gates.sh +32 -0
- package/scripts/forge-lib-plans.sh +17 -6
- package/scripts/forge-lib-review.sh +24 -19
- package/scripts/forge-lib-task.sh +219 -39
- package/scripts/forge-lib-verify.sh +45 -8
- package/scripts/forge-memory.sh +3 -3
- package/scripts/forge-parallel-options.sh +44 -5
- package/scripts/forge-parallel.sh +503 -304
- package/scripts/forge-plan-check.py +35 -1
- package/scripts/forge-pre-review.py +437 -0
- package/scripts/forge-prompt.py +25 -5
- package/scripts/forge-route.py +2 -2
- package/scripts/forge-runtime.py +55 -1
- package/scripts/forge-schedule.py +70 -9
- package/scripts/forge-shadow.py +2 -2
- package/scripts/forge-solo.sh +41 -10
- package/scripts/forge-submodules.py +389 -0
- package/scripts/forge-sweep.py +542 -0
- package/scripts/forge_dataset/cli.py +12 -6
- package/scripts/forge_dataset/export.py +55 -45
- package/scripts/forge_dataset/forecast.py +4 -1
- package/scripts/forge_dataset/harvest.py +33 -5
- package/scripts/{forge_jev/outcome.py → forge_dataset/states.py} +21 -7
- package/scripts/forge_decide/__init__.py +141 -0
- package/scripts/forge_decide/budget.py +149 -0
- package/scripts/forge_decide/cache.py +66 -0
- package/scripts/forge_decide/cli.py +953 -0
- package/scripts/forge_decide/doctor.py +221 -0
- package/scripts/forge_decide/label_addressed.py +75 -0
- package/scripts/forge_decide/label_attribution.py +62 -0
- package/scripts/forge_decide/label_coverage.py +81 -0
- package/scripts/forge_decide/label_message.py +38 -0
- package/scripts/forge_decide/label_prompt.py +139 -0
- package/scripts/forge_decide/labels.py +328 -0
- package/scripts/forge_decide/metrics.py +125 -0
- package/scripts/forge_decide/migrate.py +226 -0
- package/scripts/forge_decide/providers.py +292 -0
- package/scripts/forge_decide/replay.py +350 -0
- package/scripts/forge_decide/report.py +382 -0
- package/scripts/forge_decide/resolve.py +397 -0
- package/scripts/forge_decide/sites.py +377 -0
- package/scripts/forge_jev/__init__.py +202 -104
- package/scripts/forge_jev/addressed.py +171 -0
- package/scripts/forge_jev/attribution.py +198 -0
- package/scripts/forge_jev/cli.py +460 -382
- package/scripts/forge_jev/client.py +155 -77
- package/scripts/forge_jev/coupling.py +19 -87
- package/scripts/forge_jev/coverage.py +303 -0
- package/scripts/forge_jev/findings.py +219 -0
- package/scripts/forge_jev/gates.py +225 -27
- package/scripts/forge_jev/memory.py +65 -4
- package/scripts/forge_jev/message.py +134 -0
- package/scripts/forge_jev/plan_gates.py +294 -0
- package/scripts/forge_jev/questions.py +173 -313
- package/scripts/forge_jev/verify.py +130 -104
- package/ui/README.md +41 -10
- package/ui/docs/api.md +212 -44
- package/ui/forge_ui/checks.py +331 -0
- package/ui/forge_ui/control.py +60 -11
- package/ui/forge_ui/export.py +8 -3
- package/ui/forge_ui/models.py +1 -0
- package/ui/forge_ui/reader.py +436 -26
- package/ui/forge_ui/server.py +13 -0
- package/ui/forge_ui/static/app.js +15 -8
- package/ui/forge_ui/static/checksview.js +449 -0
- package/ui/forge_ui/static/controls.js +20 -13
- package/ui/forge_ui/static/convo.js +11 -2
- package/ui/forge_ui/static/findingsview.js +6 -4
- package/ui/forge_ui/static/index.html +1 -0
- package/ui/forge_ui/static/panel.js +105 -17
- package/ui/forge_ui/static/runmodel.js +40 -2
- package/ui/forge_ui/static/scene3d.js +2 -15
- package/ui/forge_ui/static/settings.js +336 -41
- package/ui/forge_ui/static/style.css +72 -7
- package/ui/forge_ui/transcripts.py +225 -54
- package/references/jev.md +0 -865
- package/scripts/forge_jev/backtest.py +0 -322
- package/scripts/forge_jev/corpus.py +0 -156
- package/scripts/forge_jev/features.py +0 -24
- package/scripts/forge_jev/predict.py +0 -204
- package/scripts/forge_jev/review.py +0 -73
- package/scripts/forge_jev/routing.py +0 -271
- package/scripts/forge_jev/subset.py +0 -123
package/ui/docs/api.md
CHANGED
|
@@ -13,6 +13,7 @@ forge_ui/diffs.py unified diffs: parsing, the ```diff fence of a review pr
|
|
|
13
13
|
forge_ui/models.py per-run model facts (attempts and reviews) for the leaderboard, cached per run
|
|
14
14
|
forge_ui/fractal.py Fractal child tasks under $XDG_STATE_HOME/forge/fractal, read through dir fds
|
|
15
15
|
forge_ui/transcripts.py an agent CLI's `<role>.log` read as one conversation, whichever harness wrote it
|
|
16
|
+
forge_ui/checks.py the checks an agent ran, its running call and the environment problems it met, from a transcript
|
|
16
17
|
forge_ui/server.py serves those dicts as JSON plus the static page, 127.0.0.1 only; authenticates writes
|
|
17
18
|
forge_ui/control.py the write routes: each one is a forge CLI call (see Controls)
|
|
18
19
|
forge_ui/static/ the page: index.html, app.js, style.css, graph.js and the scripts they load
|
|
@@ -47,6 +48,7 @@ written), and the reader must never raise because of one.
|
|
|
47
48
|
| `verification.retry.log` | the output of a deterministic or Jev rerun of a single command |
|
|
48
49
|
| `verification.lanes.json` | a lanes verification's live and final state, written by `scripts/forge-verify.py` (read up to 4 MB); `verification.lane.<name>.log` and `verification.lane.<name>.run-<k>.log` each lane's output |
|
|
49
50
|
| `verification.commit` | one line, the commit verified |
|
|
51
|
+
| `attribution.json` | the result of `forge-parallel.sh attribute`: `culprit` (a task id or `null`), `base_fails`, `inconclusive` (a reason or `null`), `merges`, `steps`, `verification_runs`, `gate` (`null` without the gate, else `{mode, ranking, tried, outcome}`); returned as `attribution`, see RunDetail |
|
|
50
52
|
| `max_parallel`, `escalate_after`, `verify_retries` | one integer each |
|
|
51
53
|
| `qa_threshold` | `P0`..`P3`, the least severe finding that still blocks; `final_qa` the final review's QA spec |
|
|
52
54
|
| `deferrals.txt` | one line per task the wave planner deferred |
|
|
@@ -56,16 +58,22 @@ written), and the reader must never raise because of one.
|
|
|
56
58
|
| `final-review` | a symlink to the newest *published* review dir; `final-review.verdict` a copy of its verdict |
|
|
57
59
|
| `integrate-<epoch>-<pid>/` | one `integrate`: `setup.log`, `merge.log`, `verification.*`, `attempts/verification-<uuid>/`, and `final-review/` (a review dir as above) when it ran one |
|
|
58
60
|
| `tasks/<id>/merged` | exists when the task was merged; its mtime is when |
|
|
59
|
-
| `tasks/<id>/status` | one word: `RUNNING PASS FAIL ERROR INFRA TIMEOUT UNKNOWN INVALIDATED BLOCKED INTERRUPTED NOCHANGES CONFLICT` |
|
|
61
|
+
| `tasks/<id>/status` | one word: `RUNNING PASS FAIL ERROR INFRA TIMEOUT UNKNOWN INVALIDATED BLOCKED INTERRUPTED NOCHANGES CONFLICT NEEDS_INPUT` |
|
|
60
62
|
| `tasks/<id>/attempt` | the current attempt number |
|
|
61
|
-
| `tasks/<id>/attempts.tsv` | `epoch<TAB>attempt<TAB>status<TAB>infra_class` per line, one per attempt entry; status may also be `MERGED`, `infra_class` may be empty, `-` or missing |
|
|
63
|
+
| `tasks/<id>/attempts.tsv` | `epoch<TAB>attempt<TAB>status<TAB>infra_class` per line, one per attempt entry; status may also be `MERGED`, `BOUNCED` or `INCOMPLETE` (a send-back that no reviewer judged: the task status stays `FAIL`), `infra_class` may be empty, `-` or missing |
|
|
62
64
|
| `tasks/<id>/escalations.tsv` | `epoch<TAB>attempt<TAB>from_spec<TAB>to_spec[<TAB>source]` per line; `source` (who decided: `policy`, a human's `retry --dwarf` as `retry`, or a `pin`) is missing on older rows, which read as `policy` |
|
|
63
65
|
| `tasks/<id>/qa.last` | the reviewer's final message; its last line matching `FORGE_VERDICT: PASS` or `FORGE_VERDICT: FAIL` is the verdict |
|
|
64
66
|
| `tasks/<id>/prompt.md`, `approach.md`, `retry_findings.md` | free text |
|
|
67
|
+
| `tasks/<id>/needs_input.md` | the question for the user, written when the task stopped `NEEDS_INPUT`: `The implementer asked:`, then the end of the dwarf's last message; free text, returned as `needs_input` |
|
|
65
68
|
| `tasks/<id>/accepted.by` | who accepted a task over a reviewer's FAIL, and why (`key=value`: `task`, `status`, `reason`, `by`, `at`, `epoch`, `attempt`, `reviewed_commit`; older runs are free text; returned as text) |
|
|
66
|
-
| `tasks/<id>/qa.gate` | `threshold<TAB>decision<TAB>worst<TAB>n_confirmed<TAB>n_unlabelled<TAB>n_below` (`decision` is `accept` or `keep`, `-` for none) |
|
|
69
|
+
| `tasks/<id>/qa.gate` | `threshold<TAB>decision<TAB>worst<TAB>n_confirmed<TAB>n_unlabelled<TAB>n_below` (`decision` is `accept` (the reviewer said FAIL, every CONFIRMED finding was below the threshold), `fail` (the reviewer said PASS, but listed a blocking CONFIRMED finding) or `keep`, `-` for none) |
|
|
67
70
|
| `tasks/<id>/known_issues.md` | the confirmed findings a threshold tolerated |
|
|
71
|
+
| `tasks/<id>/prereview.json`, `prereview.md` | the pre-review tests of the latest attempt (opt-in `plan --pre-review-tests`): `status` (`passed`, `flaky`, `pre-existing`, `failed`, `skipped`, `error`), `reason`, `command`, `selected`, `failing`, `preexisting`, `flaky`, `runs`, `seconds`; returned on a task as `pre_review` `{status, reason, command, selected, failing, preexisting, flaky, seconds, tail}` (`tail`: the end of the last failing run's output), `null` without the file. `prereview.md` is the implementer's findings of a `failed` check |
|
|
68
72
|
| `tasks/<id>/dwarf.input`, `qa.input` | the prompts forge assembled; `<role>.delivered`, `<role>.resolved` the live dispatch files |
|
|
73
|
+
| `tasks/<id>/<role>.log`, `<role>.clock` | the running dispatch's harness log and its clock: one `<epoch> <bytes>` line each time the log grew (forge-dispatch.sh samples it every second; `FORGE_LOG_CLOCK=off` writes none) |
|
|
74
|
+
| `tasks/<id>/escalation.stop`, `split.suggested` | the retry policy stopped the task: `<attempts><TAB><model>`, and the split it suggests (free text) |
|
|
75
|
+
| `scheduler.live` | `{"pid": n}`: the scheduler running the plan; it is live while that process is |
|
|
76
|
+
| `drain`, `stop`, `max_parallel`, `infra.paused` | a live scheduler's controls (Controls below): a drain, a stop (`graceful` or `now`), a capacity, and its infrastructure pauses as `{"scopes": [{scope, class, harness, model, tasks, cycle, until, exhausted}]}` |
|
|
69
77
|
| `tasks/<id>/attempts/<role>-<uuid>/` | one execution of the task: `task`, `dwarf` or `qa` |
|
|
70
78
|
| `tasks/<id>/changes.diff` | `git diff --binary` of the task's work since its base, cumulative, rewritten every attempt; `changes.prev.diff` the previous attempt's; `committed.diff` base..the reviewed commit |
|
|
71
79
|
| `tasks/<id>/drift.txt`, `conflict.files` | one path per line: files the diff changed without declaring them; files that conflicted on merge |
|
|
@@ -74,8 +82,6 @@ written), and the reader must never raise because of one.
|
|
|
74
82
|
| `fractal-selection.json` | `{"enabled": true, "run": "run-<20 hex>"}` (or `enabled: false`): the run's Fractal choice, see Fractal below |
|
|
75
83
|
| `tasks/<id>/route.jsonl` | one JSON object per line, one per routing decision: `at` (epoch), `task`, `tier`, `epsilon`, `candidates` (list of specs), `default` (spec), `chosen` (spec), `explored` (bool), `propensity` (probability the chosen spec had), `inputs` (object), `decision` (a short hash identifying the decision). Keep unknown fields |
|
|
76
84
|
| `tasks/<id>/route.explored` | exists when the task's route was an exploratory pick |
|
|
77
|
-
| `tasks/<id>/clef.first_pass` | JSON: `p` (predicted probability the first attempt passes), `model`, `at`, `plan_table`, `assignment` (`{dwarf, qa}`) |
|
|
78
|
-
| `tasks/<id>/clef.retry_pass.<n>` | JSON, same shape plus `attempt` = n |
|
|
79
85
|
| `shadow/<id>/<attempt>-<k>/shadow.json` | JSON: `task`, `attempt`, `reviewed`, `primary`, `spec`, `pick`, `started`. A second, never-read review of attempt `<attempt>` |
|
|
80
86
|
| `shadow/<id>/<attempt>-<k>/shadow.status` | one word |
|
|
81
87
|
| `shadow/<id>/<attempt>-<k>/qa.last` | the shadow reviewer's final message, verdict as above |
|
|
@@ -88,10 +94,11 @@ one of `task dwarf qa solo verification parallel` and `<uuid>` 32 lowercase hex
|
|
|
88
94
|
|---|---|
|
|
89
95
|
| `metrics.json` | `role`, `started` (monotonic), `wall_started` (epoch), `phase`, `phase_started` (monotonic), `elapsed_s` (seconds per phase, `total` once done), `exit_code` (`null` while in flight), `harness`, `prompt_bytes`, `input_tokens`, `cached_input_tokens`, `output_tokens`, `infra_class`, `shadow` |
|
|
90
96
|
| `dataset.json` | may be absent: `parent` (the execution that started this one, e.g. `task-<uuid>`), `trigger`, `attempt_start` and `resume` (task executions) |
|
|
91
|
-
| `<role>.resolved`, `.prompt`, `.last`, `.timedout` | copies made when it finished: the model resolution (`key=value`), the prompt, the final message, the timeout marker |
|
|
97
|
+
| `<role>.resolved`, `.prompt`, `.last`, `.timedout`, `.log`, `.clock` | copies made when it finished: the model resolution (`key=value`), the prompt, the final message, the timeout marker, the harness log and its clock |
|
|
92
98
|
|
|
93
|
-
Only the transcript
|
|
94
|
-
ExecutionTranscript)
|
|
99
|
+
Only the transcript, checks and environment endpoints open an execution's `.log` and `.clock` (a
|
|
100
|
+
`dwarf`'s or `qa`'s, see ExecutionTranscript and Checks), and RunDetail reads the last 256 KB of a
|
|
101
|
+
running one's log for its `now`; no read opens a `.cmd`.
|
|
95
102
|
|
|
96
103
|
**Task status** is `MERGED` if `tasks/<id>/merged` exists, otherwise the first word of
|
|
97
104
|
`tasks/<id>/status`, otherwise `PENDING`.
|
|
@@ -166,6 +173,9 @@ def final_review_diff(path, name, source='plan') -> dict | None # a DiffDetai
|
|
|
166
173
|
def files_detail(path, source='plan') -> dict | None # Files
|
|
167
174
|
def run_findings(path, source='plan') -> dict | None # RunFindings
|
|
168
175
|
def execution_transcript(path, name, source='plan') -> dict | None # an ExecutionTranscript
|
|
176
|
+
def execution_checks(path, name, source='plan') -> dict | None # ExecutionChecks
|
|
177
|
+
def task_checks(path, task_id, source='plan') -> dict | None # TaskChecks
|
|
178
|
+
def run_environment(path, source='plan') -> dict | None # RunEnvironment
|
|
169
179
|
def fractal_detail(path, task_id, source='plan') -> dict | None # a TaskFractal
|
|
170
180
|
def fractal_node(path, task_id, node, source='plan') -> dict | None # a FractalNodeDetail
|
|
171
181
|
def fractal_node_diff(path, task_id, node, source='plan') -> dict | None # a DiffDetail
|
|
@@ -180,6 +190,7 @@ class Catalog:
|
|
|
180
190
|
def final_review(self, key, name) -> dict | None
|
|
181
191
|
def diff(self, key, task_id, which='current'), execution_diff(self, key, name),
|
|
182
192
|
final_review_diff(self, key, name), files(self, key), findings(self, key), transcript(self, key, name),
|
|
193
|
+
execution_checks(self, key, name), task_checks(self, key, task_id), environment(self, key),
|
|
183
194
|
fractal(self, key, task_id),
|
|
184
195
|
fractal_node(self, key, task_id, node), fractal_node_diff(self, key, task_id, node),
|
|
185
196
|
verification_log(self, key, lane=None, k=None, first=None) -> dict | None
|
|
@@ -203,7 +214,7 @@ loaded. When it cannot be loaded, `findings_available` is `false` and every find
|
|
|
203
214
|
is `null`; verdicts and `gate` do not need it.
|
|
204
215
|
|
|
205
216
|
Text fields are capped so one huge file cannot blow up a response: `request`, `prompt`,
|
|
206
|
-
`approach`, `retry_findings` keep their first 20,000 characters; `qa_tail`, `dwarf_tail`
|
|
217
|
+
`approach`, `retry_findings`, `needs_input` keep their first 20,000 characters; `qa_tail`, `dwarf_tail`
|
|
207
218
|
and `verification.log_tail` keep their last 4,000. A capped field ends (or, for tails,
|
|
208
219
|
starts) with `…` and the value of `truncated` lists the field names that were cut.
|
|
209
220
|
|
|
@@ -229,6 +240,9 @@ its last 20,000 behind a leading `…`. Their `truncated` lists the field names
|
|
|
229
240
|
| `GET /api/runs/<key>/files` | `200 Files` |
|
|
230
241
|
| `GET /api/runs/<key>/findings` | `200 RunFindings` |
|
|
231
242
|
| `GET /api/runs/<key>/executions/<qa-or-dwarf>/transcript` | `200 ExecutionTranscript` |
|
|
243
|
+
| `GET /api/runs/<key>/executions/<qa-or-dwarf>/checks` | `200 ExecutionChecks`; another role is a 404 |
|
|
244
|
+
| `GET /api/runs/<key>/tasks/<id>/checks` | `200 TaskChecks`; `<id>` as for TaskDetail |
|
|
245
|
+
| `GET /api/runs/<key>/environment` | `200 RunEnvironment` |
|
|
232
246
|
| `GET /api/runs/<key>/verification/log[/lines/<n>]` | `200 VerificationLog` of `verification.log`: its tail, or with `/lines/<n>` a range |
|
|
233
247
|
| `GET /api/runs/<key>/verification/retry/log[/lines/<n>]` | `200 VerificationLog` of `verification.retry.log`, a single command's rerun |
|
|
234
248
|
| `GET /api/runs/<key>/verification/lanes/<lane>/log[/lines/<n>]` | `200 VerificationLog` of `verification.lane.<lane>.log` |
|
|
@@ -243,7 +257,7 @@ its last 20,000 behind a leading `…`. Their `truncated` lists the field names
|
|
|
243
257
|
| `POST /api/runs/<key>/delete` | dry-run or delete a run with `forge runs rm`; authenticated, 900 s timeout; later requests for the key answer `404` |
|
|
244
258
|
| `GET /api/models/reviewers` | `200` the `forge dataset reviewers --json` report (how each reviewer's PASSed work held up); no parameters |
|
|
245
259
|
| `GET /api/config?run=<key>` | `200` the `forge config show --json` of that run's repo |
|
|
246
|
-
| `POST /api/config` | set or unset one allowed key (`repo.verify`, `repo.setup`, `repo.verify-subset`, `jev.enabled`
|
|
260
|
+
| `POST /api/config` | set or unset one allowed key (`repo.verify`, `repo.setup`, `repo.verify-subset`, `decide.gate.<gate>`, `decide.gate.<gate>.provider`, `decide.gate.<gate>.model`); `jev.enabled` is gone; authenticated |
|
|
247
261
|
| `GET /api/runs/<key>/export?texts=0\|1&paths=0\|1` | `200` the run as one HTML file (see Export), `Content-Disposition: attachment`, `Content-Security-Policy: default-src 'none'; sandbox`; `404` for an unknown run |
|
|
248
262
|
| `GET /api/runs/<key>/tasks/<id>/fractal` | `200 TaskFractal` |
|
|
249
263
|
| `GET /api/runs/<key>/tasks/<id>/fractal/nodes/<node>[/diff]` | `200 FractalNodeDetail`, or with `/diff` a `DiffDetail` of its `candidate.diff`; `<node>` matches `[A-Za-z0-9][A-Za-z0-9_-]{0,100}` |
|
|
@@ -351,6 +365,8 @@ Every RunSummary field, plus:
|
|
|
351
365
|
"settings": {"explore": 0.5, "shadow_rate": 0.5, "shadow_qa": ["opus", "sol:xhigh"], "timeout": 3600,
|
|
352
366
|
"max_parallel": 2, "qa_threshold": "P2", "escalate_after": 3, "verify_retries": 1,
|
|
353
367
|
"final_qa": "opus"},
|
|
368
|
+
"attribution": {"culprit": "page", "base_fails": false, "inconclusive": null, "verification_runs": 4,
|
|
369
|
+
"gate_outcome": "confirmed"},
|
|
354
370
|
"verification": {"status": "PASS", "command": "python3 -m unittest", "log_tail": "...",
|
|
355
371
|
"runs": [{"n": 1, "kind": "initial", "exit": 0, "tree_changed": false,
|
|
356
372
|
"duration_s": 12.3, "log": "verification.lane.unit.run-1.log",
|
|
@@ -372,6 +388,12 @@ Every RunSummary field, plus:
|
|
|
372
388
|
"ended": 1760622300.0}]},
|
|
373
389
|
"final_review": FinalReviewSummary,
|
|
374
390
|
"final_reviews": [FinalReviewSummary, ...],
|
|
391
|
+
"scheduler": {"live": true, "drained": false, "stopping": null, "max_parallel": 3,
|
|
392
|
+
"pauses": [{"scope": "model:codex/gpt-6", "class": "rate_limit", "harness": "codex", "model": "gpt-6",
|
|
393
|
+
"tasks": ["perf"], "cycle": 1, "until": 1760622130.0, "exhausted": false}]},
|
|
394
|
+
"sweep": {"at": 1760622050.0, "severity": "P3", "plausible": false, "tasks": ["sweep-1"], "findings": 2, "fixed": 1,
|
|
395
|
+
"dropped": [{"task": "page", "severity": "P3", "location": "ui/page.html:3", "summary": "Old markup.",
|
|
396
|
+
"reason": "changed", "merged_since": ["graph"]}]},
|
|
375
397
|
"deferrals": ["wave 2: docs deferred (file overlap with a task already in this wave)"],
|
|
376
398
|
"findings_available": true,
|
|
377
399
|
"warnings": ["tasks/graph/route.jsonl line 2: not JSON"],
|
|
@@ -381,8 +403,18 @@ Every RunSummary field, plus:
|
|
|
381
403
|
|
|
382
404
|
- `settings` values are `null` when the file is missing or unparsable; `shadow_qa` is a
|
|
383
405
|
list (empty when missing). `max_parallel`, `escalate_after`, `verify_retries` are integers,
|
|
384
|
-
`
|
|
385
|
-
|
|
406
|
+
`final_qa` the first line of their file. `qa_threshold` is the effective level (`P0`..`P3`):
|
|
407
|
+
a missing file reads `P2` (forge's default) with `qa_threshold_source` `default`; a file reads
|
|
408
|
+
with source `set`, and `none` in it reads `P3`. A solo run has no plan settings: every value
|
|
409
|
+
is `null`, including `shadow_qa`, except `qa_threshold` and its source, which read the same way.
|
|
410
|
+
- `attribution` is the result of `forge-parallel.sh attribute` from `attribution.json`, or `null` when
|
|
411
|
+
the file is missing. `culprit` is the merged task's id or `null`; `base_fails` is `true` only when the
|
|
412
|
+
base verified FAIL; `inconclusive` is the reason the search stopped without a culprit, or `null`;
|
|
413
|
+
`verification_runs` is how many verifications the search ran; `gate_outcome` is `gate.outcome`
|
|
414
|
+
(`confirmed` or `refuted`), `null` without the gate. A file that is not a JSON object, or lacks any of
|
|
415
|
+
`culprit`, `base_fails`, `inconclusive`, `verification_runs` or `gate`, or has a value of the wrong type
|
|
416
|
+
(`culprit` and `inconclusive` a string or `null`, `base_fails` a boolean, `verification_runs` an integer,
|
|
417
|
+
`gate` `null` or an object whose `outcome` is a string or `null`), is `null` and warned.
|
|
386
418
|
- `verification` is `null` when none of `verification.status`, `.command`, `.log` exists. A
|
|
387
419
|
solo run's `verification` is always `null`. `runs` comes from `verification.runs.tsv`
|
|
388
420
|
(malformed rows are warned and skipped; an empty `exit` is `null`), `commit` is the first
|
|
@@ -448,6 +480,17 @@ Every RunSummary field, plus:
|
|
|
448
480
|
epoch in the name), or `null`; `final_reviews` lists the newest 20, newest first. That newest
|
|
449
481
|
review's `outdated` is its own. `final_review_outdated` stays the published review's flag, so
|
|
450
482
|
the two differ when a newer review exists than the one `final-review` links to.
|
|
483
|
+
- `scheduler`: `live` is whether the pid in `scheduler.live` is a running process. Only then are the
|
|
484
|
+
rest read: `drained` (a `drain` file), `stopping` (`stop` holds `graceful` or `now`, else `null`),
|
|
485
|
+
`max_parallel` (the `max_parallel` file when it holds 1 to 64, else `null`) and `pauses` (the scopes of
|
|
486
|
+
`infra.paused`, `[]` without it); while no scheduler runs they are `false`, `null`, `null` and `[]`.
|
|
487
|
+
A solo run's `scheduler` is `null`.
|
|
488
|
+
- `sweep`: the run's finding sweep (`run --sweep`), `null` without `sweep/plan.json` (and for a solo
|
|
489
|
+
run). `tasks` are its fix tasks (tasks with a `sweep.json`), `findings` how many findings they took
|
|
490
|
+
and `fixed` how many of those their reviews marked fixed (a fix task counts once it merged).
|
|
491
|
+
`dropped` lists, from the plan, at most 200 findings the sweep left for `forge issues`, each with
|
|
492
|
+
its `reason` (`below-severity`, `dismissed`, `no-location`, `file-gone`, `changed`, `duplicate`,
|
|
493
|
+
`group-cap`, `over-max`, `no-model`) and, for `changed`, the tasks that `merged_since` the review.
|
|
451
494
|
- `deferrals`: the non-empty lines of `deferrals.txt`, `[]` when it is missing.
|
|
452
495
|
- `findings_available`: whether `scripts/forge-contract.py` could be loaded.
|
|
453
496
|
- `fractal`: `null` without `fractal-selection.json`, else `{"enabled", "run", "available", "reason"}`
|
|
@@ -487,15 +530,12 @@ Every RunSummary field, plus:
|
|
|
487
530
|
"route": [{"at": 1760619000.0, "task": "reader", "tier": "high", "epsilon": 0.5,
|
|
488
531
|
"candidates": ["astra", "opus"], "default": "opus", "chosen": "astra",
|
|
489
532
|
"explored": true, "propensity": 0.25, "inputs": {}, "decision": "9c1e4b7a0d2f3e58"}],
|
|
490
|
-
"clef": {"first_pass": {"p": 0.71, "model": "clef", "at": 1760619100.0,
|
|
491
|
-
"assignment": {"dwarf": "astra", "qa": "opus"}},
|
|
492
|
-
"retry_pass": {"2": {"p": 0.64, "model": "clef", "at": 1760620600.0, "attempt": 2,
|
|
493
|
-
"assignment": {"dwarf": "sol", "qa": "opus"}}}},
|
|
494
533
|
"shadow": [{"attempt": 1, "k": 0, "spec": "sol:xhigh", "primary": "opus",
|
|
495
534
|
"status": "PASS", "verdict": "FAIL", "started": 1760620100.0}],
|
|
496
535
|
"prompt": "full prompt.md text",
|
|
497
536
|
"approach": null,
|
|
498
537
|
"retry_findings": "...",
|
|
538
|
+
"needs_input": "the question in tasks/<id>/needs_input.md, or null",
|
|
499
539
|
"qa_tail": "last 4000 chars of qa.last",
|
|
500
540
|
"dwarf_tail": "last 4000 chars of dwarf.last",
|
|
501
541
|
"executions": [Execution, ...],
|
|
@@ -503,7 +543,14 @@ Every RunSummary field, plus:
|
|
|
503
543
|
"findings": FindingsSummary,
|
|
504
544
|
"gate": {"threshold": "P2", "decision": "keep", "worst": "P3", "n_confirmed": 1,
|
|
505
545
|
"n_unlabelled": 0, "n_below": 1},
|
|
506
|
-
"known_issues": true
|
|
546
|
+
"known_issues": true,
|
|
547
|
+
"now": {"role": "dwarf", "execution": "dwarf-…", "attempt": 2, "phase": "model", "phase_started": 1760621200.0,
|
|
548
|
+
"started": 1760621195.0, "last_output_at": 1760621410.2,
|
|
549
|
+
"call": {"kind": "command", "command": "npm test", "tool": null, "started": 1760621390.0, "check": "test"}},
|
|
550
|
+
"waiting": null,
|
|
551
|
+
"sweep": null,
|
|
552
|
+
"swept": [{"id": "S1", "severity": "P2", "confidence": "CONFIRMED", "task": "reader", "location": "ui/reader.py:12",
|
|
553
|
+
"summary": "Status is read twice.", "status": "fixed", "note": null, "by": "sweep-1"}]
|
|
507
554
|
}
|
|
508
555
|
```
|
|
509
556
|
|
|
@@ -529,8 +576,6 @@ Every RunSummary field, plus:
|
|
|
529
576
|
plan task, the run dir's `dwarf.last` for a solo run), or `null` when the file is missing.
|
|
530
577
|
Capped like `qa_tail`.
|
|
531
578
|
- `explored`: `true` if `route.explored` exists or any `route` entry has `explored: true`.
|
|
532
|
-
- `clef.first_pass` is `null` when absent; `clef.retry_pass` is `{}` when there are none;
|
|
533
|
-
its keys are the attempt numbers as strings.
|
|
534
579
|
- `shadow`: one entry per `shadow/<id>/<attempt>-<k>/` dir, sorted by attempt then k.
|
|
535
580
|
`status` is `shadow.status`, `verdict` is parsed from that dir's `qa.last`; fields from
|
|
536
581
|
`shadow.json` (`spec`, `primary`, `started`, `reviewed`, `pick`, as they are) that are
|
|
@@ -544,9 +589,33 @@ Every RunSummary field, plus:
|
|
|
544
589
|
run, the run dir's `attempts/` (`solo`, `dwarf`, `qa`). Shadow executions are not in it.
|
|
545
590
|
- `merged_at`: the mtime of `tasks/<id>/merged`, or `null`.
|
|
546
591
|
- `findings`: FindingsSummary of the current `qa.last`, or `null`.
|
|
547
|
-
- `gate`: the parsed `qa.gate` (`n_*` integers, `-` is `null`), or `null` when missing or
|
|
592
|
+
- `gate`: the parsed `qa.gate` (`decision` `accept`, `fail` or `keep`; `n_*` integers, `-` is `null`), or `null` when missing or
|
|
548
593
|
malformed (malformed is warned).
|
|
594
|
+
- `needs_input`: the text of `tasks/<id>/needs_input.md`, capped like `prompt`, or `null` when the file is
|
|
595
|
+
missing. The question a task stopped `NEEDS_INPUT` for; the export leaves it out unless texts are chosen.
|
|
549
596
|
- `known_issues`: whether `known_issues.md` is a non-empty file.
|
|
597
|
+
- `now`: `null` unless the task is `RUNNING`. Then where it is: the newest running non-shadow `dwarf`
|
|
598
|
+
or `qa` execution (`role`, `execution`, `attempt`, `phase`, `phase_started`, `started`), else the
|
|
599
|
+
running task execution, and, for an agent, `last_output_at` (its log's mtime) and `call`: the call
|
|
600
|
+
it is making, read from the last 256 KB of `tasks/<id>/<role>.log` (the run dir's for a solo run),
|
|
601
|
+
or `null` while it thinks or writes. `call.kind` is `command`, `tool` or `edit`; `command` keeps
|
|
602
|
+
400 characters; `check` is the command's kind as Checks below tells it (`null` for none);
|
|
603
|
+
`started` comes from the harness's own times, from `<role>.clock`, or, when the call is the log's
|
|
604
|
+
last line, the log's mtime. Every value but the call is `null` when unknown.
|
|
605
|
+
- `waiting`: why a task that is not running waits, as far as the run dir says, or `null`:
|
|
606
|
+
`{"kind": "escalation", "attempts", "model", "split"}` when `escalation.stop` exists (whether or
|
|
607
|
+
not a scheduler runs); else, while `scheduler.live` is true, for a `PENDING` or `INFRA` task:
|
|
608
|
+
`infra` (a pause in `scheduler.pauses` holds it: scope `all`, or its id in `tasks`; the pause's
|
|
609
|
+
keys plus `kind`), then for a `PENDING` task `deps` (`on`: its deps not merged, `stopped`: those
|
|
610
|
+
in a stopped status such as `FAIL`), `stopping` (`mode`), `drained`, `overlap` (`on`: running
|
|
611
|
+
tasks whose files overlap its own, as forge-schedule.py tells overlap), `slot` (`running`,
|
|
612
|
+
`max_parallel`: the run is at its capacity) or `next` (nothing holds it).
|
|
613
|
+
- `sweep`: `null` unless the task is a finding sweep's fix task (it has a `sweep.json`). Then `file`
|
|
614
|
+
and `findings`, each `{id, severity, confidence, task, location, summary, status, note}`: `task` is
|
|
615
|
+
the task the finding came from, `status` what the fix task's review said of it (`fixed`,
|
|
616
|
+
`not-fixed`, or `unreported` when it merged without a line for it; read from `sweep.outcome.json`)
|
|
617
|
+
and `null` until the fix task merged, `note` the review's words on it.
|
|
618
|
+
- `swept`: this task's findings a fix task took, the same objects plus `by` (the fix task); `[]`.
|
|
550
619
|
- Text fields are `null` when the file is missing.
|
|
551
620
|
|
|
552
621
|
A solo run's one task uses this same shape. `id` is `solo` and `title` is the goal, or
|
|
@@ -556,9 +625,9 @@ it is missing or `<harness default>`). `wave` is 1, `branch` is `null`, and `att
|
|
|
556
625
|
from the run dir's `attempts.tsv`. `status` is the solo status; `attempt` is the highest `n`
|
|
557
626
|
in `attempts.tsv`, or `null`. `escalations`, `route` and `shadow` are empty. `verdict` and
|
|
558
627
|
`qa_tail` come from `qa.last`, and `prompt` comes from `prompt.md`. `deps` and `files` are
|
|
559
|
-
`[]`; `difficulty`, `accepted_by`, `approach` and `
|
|
560
|
-
false; `accepted_attempt` and `accepted_over` are `null`; `explored` is false; `
|
|
561
|
-
|
|
628
|
+
`[]`; `difficulty`, `accepted_by`, `approach`, `retry_findings` and `needs_input` are `null`; `accepted` is
|
|
629
|
+
false; `accepted_attempt` and `accepted_over` are `null`; `explored` is false; `waiting` and `sweep` are `null`, `swept` is `[]`. `request` on
|
|
630
|
+
the detail is `request.md`.
|
|
562
631
|
|
|
563
632
|
## Execution
|
|
564
633
|
|
|
@@ -829,12 +898,90 @@ or `input` when there are none), `tool` (`tool`, `input`, `output`), `result` (`
|
|
|
829
898
|
with `same: true` when the last message said it; `tokens`), `error` (`text`), `text` (`text`,
|
|
830
899
|
`stream: "stderr"` for lines between JSON events) and `gap` (`count` events left out). Any event
|
|
831
900
|
may have `t` (epoch seconds), `id` (the harness's call id), `error` (`true` for a failed call or a
|
|
832
|
-
non-zero exit, `false` for a call answered without one) and `running: true` (a call not finished yet)
|
|
901
|
+
non-zero exit, `false` for a call answered without one) and `running: true` (a call not finished yet); an
|
|
902
|
+
answered `command`, `edit` or `tool` may have `ended` (epoch seconds). Times are the harness's own when
|
|
903
|
+
its lines carry them (claude's and opencode's), else read from `<role>.clock` beside the log: a line
|
|
904
|
+
is timed by the first sample that saw the log reach its end, to within the clock's second (codex and
|
|
905
|
+
grok write no times; a run from before the clock has none). `tokens` are the run's totals
|
|
833
906
|
(`input` counts cached input too). A message, a reasoning or a result keeps 20,000 characters, a
|
|
834
907
|
command, an input or an output its first two thirds and last third of 8,000 around `… n
|
|
835
908
|
characters …` (`<key>_cut` holds n). A log over 32 MB is read from its end; past 5,000 events or
|
|
836
909
|
4,000,000 characters the middle is left out (a `gap` event, `truncated: true`). Parses are kept by
|
|
837
|
-
the log's `(path, size, mtime_ns)
|
|
910
|
+
the log's `(path, size, mtime_ns)`, its clock's and the session file's.
|
|
911
|
+
|
|
912
|
+
## Checks (`forge_ui/checks.py`)
|
|
913
|
+
|
|
914
|
+
The checks an agent ran are the `command` events of its transcript that are tests, type checks,
|
|
915
|
+
lints or builds. A command is split on `&&`, `||`, `;`, `|` and newlines; each part loses its
|
|
916
|
+
environment assignments and wrappers (`env`, `timeout 600`, `uv run`, `npx`, `poetry run`, a
|
|
917
|
+
`sh -c '…'` around it, …) and a `cd` part is left out. `kind` is the first of `test`, `typecheck`,
|
|
918
|
+
`lint`, `build` that some part is (pytest and `python -m unittest`, `npm test`, `node --test`, jest,
|
|
919
|
+
vitest, mocha, `go test`, `cargo test`, a `test`/`check` shell script; tsc, mypy, pyright, `bash -n`,
|
|
920
|
+
`cargo check`, `go vet`; eslint, ruff, flake8, shellcheck, `cargo clippy`, a formatter with
|
|
921
|
+
`--check`; `npm run build`, `cargo build`, plain `make`, …).
|
|
922
|
+
|
|
923
|
+
ExecutionChecks (a `dwarf` or `qa` execution):
|
|
924
|
+
|
|
925
|
+
```json
|
|
926
|
+
{"run": "3f9a0c1d2e4b", "execution": "dwarf-…", "role": "dwarf", "state": "done", "attempt": 1, "spec": "luna",
|
|
927
|
+
"harness": "codex", "source": "log", "truncated": false, "last_output_at": null,
|
|
928
|
+
"owner": {"kind": "task", "id": "api"},
|
|
929
|
+
"checks": [{"index": 4, "command": "npm test", "kind": "test", "exit": 1, "failed": true, "running": false,
|
|
930
|
+
"started": 1760620100.0, "ended": 1760620232.0, "duration_s": 132.0,
|
|
931
|
+
"counts": {"passed": 41, "failed": 3, "skipped": 0}, "tail": "…last lines…"}],
|
|
932
|
+
"call": null,
|
|
933
|
+
"environment": [{"index": 2, "command": "npm run db:up", "problem": "docker-pools",
|
|
934
|
+
"label": "Docker ran out of network address pools", "line": "Error response from daemon: …"}],
|
|
935
|
+
"criteria": [{"command": "npm test", "kind": "test", "status": "ran", "by": {"index": 4}}],
|
|
936
|
+
"warnings": []}
|
|
937
|
+
```
|
|
938
|
+
|
|
939
|
+
- `index` is the event's place in the ExecutionTranscript (the conversation view's `ev-<index>`);
|
|
940
|
+
`command` keeps 1,000 characters. `failed` is a failed call or a non-zero exit; `duration_s` is
|
|
941
|
+
`ended` minus `started` when both are known. `counts` is what the output's summary says:
|
|
942
|
+
`{passed, failed, skipped}` (pytest, unittest, forge's `tests/run_tests.py`, `node --test`, jest,
|
|
943
|
+
vitest, mocha, Playwright, cargo, `go test -v`) or `{errors, warnings}` (tsc, mypy, eslint, ruff,
|
|
944
|
+
pyright), else `null`. `tail` is a failed check's last 6 non-empty output lines, else `null`.
|
|
945
|
+
- `call` is the call not answered yet (`{index, kind, command, tool, started, check}`; the newest
|
|
946
|
+
when several run at once), or `null`. `last_output_at` is the log's mtime while it runs, else `null`.
|
|
947
|
+
- `environment`: each problem a failed command met that is not only a reader (`rg`, `grep`, `cat`,
|
|
948
|
+
`git`, `ls`, …): `docker-daemon`, `docker-pools`, `container`, `port` (EADDRINUSE), `sandbox`
|
|
949
|
+
(EPERM, `Operation not permitted`), `refused` (ECONNREFUSED), `network` (DNS, unreachable), `disk`
|
|
950
|
+
(ENOSPC) and `missing-tool` (`command not found`), with `label` and the first line that shows it
|
|
951
|
+
(240 characters).
|
|
952
|
+
- `criteria`: the check commands the owner task's `prompt.md` names under an `## Acceptance
|
|
953
|
+
criteria` heading (in code spans, or a fenced block's lines), each once, against this execution's
|
|
954
|
+
checks: `status` is `ran` (a check had every word of it), `similar` (one by the same program, of
|
|
955
|
+
the same kind) or `missing`; `by` names the matching check. `[]` for a final review or a shadow.
|
|
956
|
+
|
|
957
|
+
TaskChecks:
|
|
958
|
+
|
|
959
|
+
```json
|
|
960
|
+
{"run": "3f9a0c1d2e4b", "task": "api",
|
|
961
|
+
"criteria": [{"command": "npm test", "kind": "test"}, {"command": "npx tsc --noEmit", "kind": "typecheck"}],
|
|
962
|
+
"attempts": [{"attempt": 1, "running": false, "executions": [ExecutionChecks without run/owner/criteria/warnings, ...],
|
|
963
|
+
"criteria": [{"command": "npm test", "kind": "test", "status": "ran",
|
|
964
|
+
"by": {"execution": "qa-…", "role": "qa", "index": 1}},
|
|
965
|
+
{"command": "npx tsc --noEmit", "kind": "typecheck", "status": "missing", "by": null}]}],
|
|
966
|
+
"truncated": [], "warnings": []}
|
|
967
|
+
```
|
|
968
|
+
|
|
969
|
+
Every non-shadow `dwarf` and `qa` execution of the task, by attempt; an attempt's `criteria` hold
|
|
970
|
+
against the checks of all its agents, and `running` is whether one of them runs.
|
|
971
|
+
|
|
972
|
+
RunEnvironment: the environment problems of every task's agents, each once, in the order above:
|
|
973
|
+
|
|
974
|
+
```json
|
|
975
|
+
{"run": "3f9a0c1d2e4b",
|
|
976
|
+
"problems": [{"problem": "docker-pools", "label": "Docker ran out of network address pools",
|
|
977
|
+
"tasks": ["schema", "api"], "count": 2,
|
|
978
|
+
"hits": [{"task": "schema", "attempt": 1, "role": "dwarf", "execution": "dwarf-…", "index": 0,
|
|
979
|
+
"command": "npm run db:up", "line": "Error response from daemon: …"}]}],
|
|
980
|
+
"warnings": []}
|
|
981
|
+
```
|
|
982
|
+
|
|
983
|
+
`tasks` in plan order, `count` every failed command that met it, `hits` the first 50. A finished
|
|
984
|
+
execution's problems are kept by its log's and clock's signature.
|
|
838
985
|
|
|
839
986
|
## VerificationLog
|
|
840
987
|
|
|
@@ -902,7 +1049,7 @@ lines follow, a line was cut, or reaching them took more than 64 MB of reading.
|
|
|
902
1049
|
"created": 1760619000.0, "explored": true, "propensity": 0.125, "final_status": "MERGED",
|
|
903
1050
|
"accepted": true,
|
|
904
1051
|
"attempts": [{"n": 1, "alias": "luna", "spec": "luna", "source": "execution", "outcome": "fail",
|
|
905
|
-
"reason": null, "gate": false, "model_s": 297.0, "duration_s": 300.0,
|
|
1052
|
+
"reason": null, "gate": false, "gate_fail": false, "model_s": 297.0, "duration_s": 300.0,
|
|
906
1053
|
"tokens": {"input": 120000, "cached": 90000, "output": 8000}, "timed_out": false}],
|
|
907
1054
|
"escalations": [{"n": 1, "from": "luna", "to": "sol:xhigh"}]}],
|
|
908
1055
|
"reviews": [{"run": "3f9a0c1d2e4b", "task": "reader", "n": 1, "kind": "primary", "alias": "opus", "spec": "opus",
|
|
@@ -926,7 +1073,7 @@ lines follow, a line was cut, or reaching them took more than 64 MB of reading.
|
|
|
926
1073
|
- `alias`/`spec`/`source`: the last dwarf execution's model (`execution`), else the fifth
|
|
927
1074
|
`attempts.tsv` column (`attempts.tsv`), else for attempt 1 only the `tasks.tsv` dwarf (a solo
|
|
928
1075
|
run's `dwarf.spec`/`dwarf.resolved`) (`plan`), else all `null`.
|
|
929
|
-
- `gate`: the attempt passed although its (last) primary review said FAIL. `model_s`,
|
|
1076
|
+
- `gate`: the attempt passed although its (last) primary review said FAIL. `gate_fail`: the attempt failed although that review said PASS (forge turned it into FAIL). `model_s`,
|
|
930
1077
|
`duration_s`, `tokens`, `timed_out`: that dwarf execution's `phases.model`, `duration_s`,
|
|
931
1078
|
`tokens`, `timed_out`, else `null`/`false`.
|
|
932
1079
|
- `reviews[]`: every finished primary qa execution (`n` its attempt); every shadow whose
|
|
@@ -1019,8 +1166,8 @@ difficulty paths deps model` each), `decomposition_history` (its newest 20, each
|
|
|
1019
1166
|
|
|
1020
1167
|
- It holds `style.css` (with the labels' face, `D-DINCondensed-Bold.woff2`, inlined as a `data:`
|
|
1021
1168
|
URL) and the classic scripts the run view uses (`theme.js icons.js datatable.js shell.js
|
|
1022
|
-
runmodel.js cloudmodel.js graph.js gantt.js
|
|
1023
|
-
app.js`), inline; the import map; a `<script type="application/json" id="forge-snapshot">` with
|
|
1169
|
+
runmodel.js cloudmodel.js graph.js gantt.js verifyview.js checksview.js panel.js diffview.js convo.js files.js
|
|
1170
|
+
map3d.js search.js app.js`), inline; the import map; a `<script type="application/json" id="forge-snapshot">` with
|
|
1024
1171
|
`{meta, api}`; and a `<script type="text/plain" id="forge-stage">` holding `iso.js`,
|
|
1025
1172
|
`cloud3d.js`, `findings3d.js`, `stagectl.js` and `scene3d.js` bundled into one module (each
|
|
1026
1173
|
module in its own scope, relative imports bound to the earlier ones' exports, `createStage`
|
|
@@ -1029,13 +1176,14 @@ difficulty paths deps model` each), `decomposition_history` (its newest 20, each
|
|
|
1029
1176
|
it (server.api_get): `/api/runs` (this run only), the RunDetail, every TaskDetail, every
|
|
1030
1177
|
ExecutionDetail the RunDetail names, every FinalReviewDetail, Files, RunFindings, and the
|
|
1031
1178
|
Fractal trees and nodes. With `texts=1` also every diff the page can open (each task's diff and its `sources`,
|
|
1032
|
-
each final review's, each Fractal node's), every `dwarf` and `qa` ExecutionTranscript (at most 2 MB each)
|
|
1179
|
+
each final review's, each Fractal node's), every `dwarf` and `qa` ExecutionTranscript (at most 2 MB each)
|
|
1180
|
+
and ExecutionChecks, every TaskChecks, the RunEnvironment,
|
|
1033
1181
|
and the VerificationLog tail of `verification.log`, of each lane's log and of each lane run's log
|
|
1034
1182
|
(under their tail paths; line ranges are not stored, so the page shows the tail).
|
|
1035
1183
|
- `texts=0` (the default) nulls these keys wherever they hold a string, list or object: `prompt
|
|
1036
1184
|
last request log_tail dwarf_tail qa_tail qa_last qa_input tasks_summary known_issues texts text
|
|
1037
|
-
planning_last approach retry_findings dwarf_input error last_line message excerpt tail lines
|
|
1038
|
-
diff and no
|
|
1185
|
+
planning_last approach retry_findings needs_input dwarf_input error last_line message excerpt tail lines call split`,
|
|
1186
|
+
and stores no diff, no transcript, no checks and no environment problems (a command is a text). A finding keeps its `summary`, a failing test its `name`.
|
|
1039
1187
|
- `paths=0` (the default) makes every string that is a whole absolute path (but `/api/…`, `url`s
|
|
1040
1188
|
and `command`s) its last component, and replaces the run dir, the repo and the home dir inside other
|
|
1041
1189
|
strings with their last component (`~` for home).
|
|
@@ -1127,8 +1275,10 @@ routes, so their configuration matters too.
|
|
|
1127
1275
|
running is `409 {"error": "busy"}`, without reaching the CLI; other runs are not held up.
|
|
1128
1276
|
|
|
1129
1277
|
**Errors.** For a CLI that exits non-zero the answer is `{"error", "detail", "result"?}`: `detail`
|
|
1130
|
-
is the last line of its stderr (at most 300 characters; the rest of stderr is not echoed)
|
|
1131
|
-
|
|
1278
|
+
is the last line of its stderr (at most 300 characters; the rest of stderr is not echoed), except for
|
|
1279
|
+
a refusal (exit 3): forge's own message, kept whole (its non-blank lines, joined by `\n`, at most 2000
|
|
1280
|
+
characters), since it names what was refused and why, then what to run instead. `result` is the
|
|
1281
|
+
object its stdout holds, when that parses as one.
|
|
1132
1282
|
|
|
1133
1283
|
| CLI exit | Status | `error` |
|
|
1134
1284
|
|---|---|---|
|
|
@@ -1148,7 +1298,7 @@ for them only unknown keys and runs the catalog does not hold are `404`. Every w
|
|
|
1148
1298
|
### `GET /api/runs/<key>/controls`
|
|
1149
1299
|
|
|
1150
1300
|
`forge control show <plan dir> --json`: `200` with its object (`plan`, `run_id`, `live`, `fractal`,
|
|
1151
|
-
`run` (the plan-wide controls), `tasks` (per task: `status`, `dwarf`, `qa`, `qa_threshold`,
|
|
1301
|
+
`run` (the plan-wide controls; `qa_threshold` is the effective level and `qa_threshold_source` is `set` or `default`), `tasks` (per task: `status`, `dwarf`, `qa`, `qa_threshold`,
|
|
1152
1302
|
`retry_budget`, `retries_used`, `pin`, `escalation_stop`, `escalation_next`) and `log`). No token
|
|
1153
1303
|
is needed to read it. Of `run` the page also reads `max_parallel` (1–64 or `null`), `infra_backoff`
|
|
1154
1304
|
(the shape, `exp:60` when unset), `escalate_effort` (`on`/`off`), `drained` and `stopping`
|
|
@@ -1168,7 +1318,7 @@ known or a spec runs is for the CLI to say (its `400` or `409` comes back as abo
|
|
|
1168
1318
|
|
|
1169
1319
|
| Body | CLI call (after `forge`) |
|
|
1170
1320
|
|---|---|
|
|
1171
|
-
| `{"action": "set", "key": "qa-threshold", "value": "P2"}` | `control set <dir> qa-threshold P2 --actor ui --json` |
|
|
1321
|
+
| `{"action": "set", "key": "qa-threshold", "value": "P2"}` (`default` at run level removes the setting, `none` is P3; for a task `inherit` drops the override) | `control set <dir> qa-threshold P2 --actor ui --json` |
|
|
1172
1322
|
| `{"action": "set", "key": "retry-budget", "value": "inherit", "task": "reader"}` | `control set <dir> retry-budget inherit --task reader --actor ui --json` |
|
|
1173
1323
|
| `{"action": "pin", "task": "graph", "spec": "sol:high:codex"}` | `control pin <dir> graph sol:high:codex --actor ui --json` |
|
|
1174
1324
|
| `{"action": "unpin", "task": "graph"}` | `control unpin <dir> graph --actor ui --json` |
|
|
@@ -1238,12 +1388,29 @@ Reviewers table's Did not hold column and nothing else. Timeout 60 s.
|
|
|
1238
1388
|
|
|
1239
1389
|
The repository is the run's own `repo` file (first line, an existing absolute directory; else
|
|
1240
1390
|
`409`), never a client field. `GET` runs `config show --repo <repo> --json` and answers with its
|
|
1241
|
-
object. `
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1391
|
+
object. The `decide` block is the `forge decide status --json` object for that repo, plus `ready`
|
|
1392
|
+
on each gate (`true` when the gate is `shadow` or `on`, nothing skips it, and its provider is
|
|
1393
|
+
local or has a key on file), plus two fields from `forge decide status --json`: `forced` (bool: the
|
|
1394
|
+
gate is `on` and has no passing replay for its provider and model) and `replay` (`{"provider",
|
|
1395
|
+
"model", "passes", "at"}`, `at` in epoch seconds, or `null` when `forge decide replay` has recorded
|
|
1396
|
+
none). An older forge sends neither; the page reads that as `forced: false` and `replay: null`. The
|
|
1397
|
+
Settings page shows `forced` and `replayed <date>` or `replay failed` as tags on the gate. Provider objects keep the status fields except `key`, `key_source`,
|
|
1398
|
+
`key_file` and `key_env`: a key never reaches this response. `jev.enabled` is gone.
|
|
1399
|
+
|
|
1400
|
+
`POST` takes `{"run": <key>, "key": one of repo.verify, repo.setup, repo.verify-subset,
|
|
1401
|
+
decide.gate.<gate>, decide.gate.<gate>.provider, decide.gate.<gate>.model, "value": text | "unset": true}`
|
|
1402
|
+
(exactly one of the two; any other field, `repo` included, is a `400`) and runs
|
|
1403
|
+
`config set <key> <value> --repo <repo> --json` or `config unset <key> --repo <repo> --json`.
|
|
1404
|
+
The gates are `drift`, `forward`, `prompt`, `memory-curate`, `memory-slice`, `memory-stale` and
|
|
1405
|
+
`verify-discover`. `decide.gate.<gate>` takes `off`, `shadow` or `on`. Turning a gate `on` with no passing replay for
|
|
1406
|
+
its provider and model makes the CLI exit 3, which answers `409 {"error": "refused", "detail": <the
|
|
1407
|
+
CLI's message>}`; the message names `forge decide replay` and `--force` and the page shows it whole.
|
|
1408
|
+
A provider or model is a
|
|
1409
|
+
non-empty single line of at most 256 characters, with no control characters and no leading or
|
|
1410
|
+
trailing whitespace, and not starting with `-`. Those three keys write the user level through
|
|
1411
|
+
`forge decide gate` and cannot be unset (the answer says to set the mode to off). A repo file
|
|
1412
|
+
value is a non-empty text of at most 4096 characters without control characters (newline and tab
|
|
1413
|
+
are allowed), not starting with `-`; `repo.verify-subset` must contain `{files}`. `200` with the
|
|
1247
1414
|
CLI's object (`ok`, `key`, `previous`, `value`). Writes serialize on one server-wide config lock
|
|
1248
1415
|
(`409 busy`). Unknown run `404`. Timeout 60 s.
|
|
1249
1416
|
|
|
@@ -1292,8 +1459,9 @@ Plain scripts unless noted; each defines one global and none parses API text as
|
|
|
1292
1459
|
| `gantt.js` | `ForgeGantt` | `render(container, run, {now, onSelect, sel, replay, critical, ghosts})`: attempts on wall-clock time in lanes; `strip(container, run, {now, replay})`: busy attempts and model calls against `max_parallel`. Under the attempts, the finish rows: `verify` (single-command verifications; the newest split into its runs back to back from its start, dashed because that placement is approximate), a `verify · <lane>` row per lane of a lanes verification (each run and rerun at its own time; a run with no exit is UNKNOWN once it ended, never FAIL) and `final review`. A lane or run item opens the verification inspector |
|
|
1293
1460
|
| `panel.js` | `ForgePanel` | `render(host, ctx)`: the inspector for a run, task, execution, final review, verification, integration or Fractal node; fetches the lazy endpoints once per node; `ctx.diffHash(spec)` links into the diff viewer, `ctx.onFractal(task, TaskFractal)` hands a task's tree to the stage |
|
|
1294
1461
|
| `verifyview.js` | `ForgeVerify` | `render(host, {run, now, fetchJSON, rerender})`: the verification inspector panel.js delegates to: while it runs, the elapsed time, step, last line and a flag past 5 minutes without output, and a live tail of the followed lane's log (or the single log) read again each poll; when it failed, the failing tests first, grouped by lane with new or known, each opening its lane's log at its line (in an export, the tail); a lanes table (state, time, reruns, counts). Pure helpers (`model`, `laneRow`, `groupFailing`, `idleWarning`, `openStep`, `tailLane`, `logPath`, `linesPath`, `tailLines`) are a CommonJS module too |
|
|
1462
|
+
| `checksview.js` | `ForgeChecks` | where each task stands and the checks its agents ran: `cell(task, now, ctx)` (the task table's Now column: the running call and for how long, a `quiet N min` flag past 5 minutes without output, or why it waits), `nowSection`, `execSection` and the attempts' checks and acceptance-criteria lines (`taskChecks`, `underExecution`, `attemptCriteria`) for panel.js, `schedulerFields` (the run inspector), `banner(head, ctx)` (the run header: environment problems more than one task met, read again at most every 15 s while tasks run) and `tick(root, now)`, which app.js calls each refresh to move `data-since`, `data-until` and `data-quiet` times. Pure helpers (`nowModel`, `waitingModel`, `nowRank`, `checkRow`, `countsText`, `coverageModel`, `bannerProblems`, `schedulerModel`, `quietText`, `untilText`) are a CommonJS module too |
|
|
1295
1463
|
| `diffview.js` | `ForgeDiff` | `render(host, {run, spec, fetchJSON, rerender, href, closeHref})`: a DiffDetail with its findings under their lines; `spec` is `{kind: task, task, source, file}`, `{kind: final, name, file}` or `{kind: fractal, task, node, file}` |
|
|
1296
|
-
| `convo.js` | `ForgeConvo` | `render(host, {run, spec: {task, exec}, brief, live, fetchJSON, rerender, diffHash, closeHref})`: an ExecutionTranscript as a timeline, with search, the errors and, while the execution runs, a read of its log every 2.5 s |
|
|
1464
|
+
| `convo.js` | `ForgeConvo` | `render(host, {run, spec: {task, exec}, brief, live, fetchJSON, rerender, diffHash, closeHref, focus})`: an ExecutionTranscript as a timeline, with search, the errors and, while the execution runs, a read of its log every 2.5 s; `focus` (an event index) opens it at that event once and stops following the end |
|
|
1297
1465
|
| `files.js` | `ForgeFiles` | `matrix(data, run, opts)` (pure: Files as rows of dirs and files against task columns by wave) and `render(host, data, {run, sel, onSelectTask, diffHref, prefs, savePrefs})`: the run's Files mode. Also a CommonJS module |
|
|
1298
1466
|
| `cloudmodel.js` | `ForgeCloudModel` | pure: projects, per-run facts, the cloud's filters, its five layouts (anchors from every run, dragged runs kept), label picking, layout files. Also a CommonJS module |
|
|
1299
1467
|
| `cloudui.js` | `ForgeCloudUI` | `create(root, ctx)`: the cloud's filter panel, layout and shape switches, position tools, legend and run card; a list of the same runs without 3D |
|
|
@@ -1310,7 +1478,7 @@ Routes (the URL hash): `#/` the map of every run; `#/cloud`, `#/cloud/runs/<key>
|
|
|
1310
1478
|
selected), `#/cloud/projects/<id>` (a project in focus), `#/cloud/models/<alias>` (the cloud
|
|
1311
1479
|
filtered to that model); `#/models` the leaderboard; `#/runs/<key>`; `…/tasks/<id>`;
|
|
1312
1480
|
`…/tasks/<id>/executions/<name>`; `…/executions/<name>` (an execution that belongs to no
|
|
1313
|
-
task); `…/final-review[/<name>]`; `…/verification`; `…/integration`; `…/tasks/<id>/fractal/<node>`;
|
|
1481
|
+
task); an agent's conversation, `…/executions/<name>/conversation[/event/<n>]` after either; `…/final-review[/<name>]`; `…/verification`; `…/integration`; `…/tasks/<id>/fractal/<node>`;
|
|
1314
1482
|
and the diff viewer: `…/tasks/<id>/diff[/<source>][/file/<path>]` (`source` is `current`, `prev`,
|
|
1315
1483
|
`committed`, `existing` or an execution), `…/final-review/<name>/diff[/file/<path>]`,
|
|
1316
1484
|
`…/tasks/<id>/fractal/<node>/diff[/file/<path>]` (`path` percent-encoded whole).
|