next-issue 10.7.3 → 10.7.5
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/README.md +1 -1
- package/dist/run.mjs +9 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -137,7 +137,7 @@ No person checks a change before it lands. To replace those checks, [ADR 0004](h
|
|
|
137
137
|
|
|
138
138
|
Every run has an id, `<timestamp>`, and writes these under `.next-issue/runs/`:
|
|
139
139
|
|
|
140
|
-
- `<id>.jsonl` — one JSON object per event, with `ts`, `runId`, `kind`, and the `issue`, `role` or `round` in scope
|
|
140
|
+
- `<id>.jsonl` — one JSON object per event, with `ts`, `runId`, `kind`, and the `issue`, `role` or `round` in scope. A run whose fetch of the issues fails ends with an `issues.fail` event. A run that fails in any other way once this file is open, for example when `gh repo view` fails at the start or an issue crashes the run, ends with a `run.fail` event (after `run.end` when the run got that far). Both carry the `error`;
|
|
141
141
|
- `<id>.summary.json` — token totals per agent role, event counts, and one report per issue with the outcome, the reason and the budgets used (in a watch run, an issue skipped in several passes gets one report, and an issue handled in more than one pass keeps a report for each; when an issue crashes the run, the file still holds the reports of the issues that finished);
|
|
142
142
|
- `<id>/sessions/` — the full pi session of each agent call, with every message, tool call and tool result. The session id in a `usage` event is part of the file name.
|
|
143
143
|
|
package/dist/run.mjs
CHANGED
|
@@ -34,6 +34,10 @@ async function runWithConfig(root, args, controls, config) {
|
|
|
34
34
|
}
|
|
35
35
|
return await recordCommands(recorder, () => handle(args, config, repo, recorder, controls));
|
|
36
36
|
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
recorder.event('run.fail', { error: message(error) }, 'verbose');
|
|
39
|
+
throw error;
|
|
40
|
+
}
|
|
37
41
|
finally {
|
|
38
42
|
await recorder.close();
|
|
39
43
|
}
|
|
@@ -51,7 +55,7 @@ async function handle(args, config, repo, recorder, controls) {
|
|
|
51
55
|
const { reports, stoppedAt, error, crash } = args.watch || controls.watching !== undefined
|
|
52
56
|
? await watchRun(args, loop, context, controls, print)
|
|
53
57
|
: await runIssues(args, loop);
|
|
54
|
-
recordLoopEnd(recorder, stoppedAt, error);
|
|
58
|
+
recordLoopEnd(recorder, stoppedAt, interrupts.afterIssue(), error);
|
|
55
59
|
const summary = await endRun(recorder, reports);
|
|
56
60
|
if (crash !== undefined) {
|
|
57
61
|
throw crash.failure;
|
|
@@ -81,10 +85,13 @@ export function watchRun(args, loop, context, controls, print) {
|
|
|
81
85
|
refreshed: controls.refreshed,
|
|
82
86
|
});
|
|
83
87
|
}
|
|
84
|
-
function recordLoopEnd(recorder, stoppedAt, error) {
|
|
88
|
+
function recordLoopEnd(recorder, stoppedAt, stopped, error) {
|
|
85
89
|
if (stoppedAt !== undefined) {
|
|
86
90
|
recorder.event('run.stop', { issue: stoppedAt }, 'quiet');
|
|
87
91
|
}
|
|
92
|
+
else if (stopped) {
|
|
93
|
+
recorder.event('run.stop', {}, 'quiet');
|
|
94
|
+
}
|
|
88
95
|
if (error !== undefined) {
|
|
89
96
|
recorder.event('issues.fail', { error: message(error) }, 'quiet');
|
|
90
97
|
}
|