next-issue 6.6.1 → 6.6.3
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/agents.mjs +0 -2
- package/dist/gate.mjs +15 -2
- package/dist/pipeline.mjs +2 -1
- package/dist/run.mjs +1 -1
- package/dist/watch.mjs +1 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -278,7 +278,7 @@ Recorded for each step: `claim`, `comments`, `reply`, `worktree`, `setup`,
|
|
|
278
278
|
`.start`, `.end` or `.error` event and a duration in `ms`. Every `git` and `gh`
|
|
279
279
|
command is recorded with its exit code and duration. A `tool` event holds the
|
|
280
280
|
tool name, and for a `bash` tool the command too. Each agent call adds a `usage`
|
|
281
|
-
event with the tokens, the
|
|
281
|
+
event with the tokens, the turn count, the
|
|
282
282
|
tool-call count, the model and the session id.
|
|
283
283
|
|
|
284
284
|
```bash
|
package/dist/agents.mjs
CHANGED
|
@@ -57,7 +57,6 @@ function sessionResult(recorder, request, session, started) {
|
|
|
57
57
|
toolCalls: stats.toolCalls,
|
|
58
58
|
model: name,
|
|
59
59
|
session: stats.sessionId,
|
|
60
|
-
costUsd: stats.cost,
|
|
61
60
|
});
|
|
62
61
|
return {
|
|
63
62
|
text: (session.getLastAssistantText() ?? '').trim(),
|
|
@@ -65,7 +64,6 @@ function sessionResult(recorder, request, session, started) {
|
|
|
65
64
|
turns: stats.assistantMessages,
|
|
66
65
|
toolCalls: stats.toolCalls,
|
|
67
66
|
ms,
|
|
68
|
-
costUsd: stats.cost,
|
|
69
67
|
model: name,
|
|
70
68
|
sessionId: stats.sessionId,
|
|
71
69
|
};
|
package/dist/gate.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { budgetUse } from './budget.mjs';
|
|
2
2
|
import { checkWaiting } from './check-poll.mjs';
|
|
3
|
-
import {
|
|
3
|
+
import { runStopped } from './children.mjs';
|
|
4
|
+
import { asError, message } from './errors.mjs';
|
|
4
5
|
import { escalateCheckFix, fixRound } from './fix.mjs';
|
|
5
6
|
import { escalateAndFinish } from './handover.mjs';
|
|
6
7
|
import { GATE_FIXED, GATE_PASSED } from './job.mjs';
|
|
@@ -54,7 +55,19 @@ async function failedChecksFix(job, sha) {
|
|
|
54
55
|
await writeState(repo, state);
|
|
55
56
|
const logs = await ports.failedBaseLogs(repo, sha, config.logMaxChars);
|
|
56
57
|
log.event('main-checks.logs', { chars: logs.length });
|
|
57
|
-
|
|
58
|
+
let fix;
|
|
59
|
+
try {
|
|
60
|
+
fix = await fixRound(job, `The checks on ${base} failed after the change landed there.`, logs, [], 'checks');
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
if (runStopped()) {
|
|
64
|
+
throw error;
|
|
65
|
+
}
|
|
66
|
+
const reverted = await revert(job);
|
|
67
|
+
const detail = message(error);
|
|
68
|
+
const stop = detail.endsWith('.') ? '' : '.';
|
|
69
|
+
return escalateAndFinish(job, `The fixer for the failed checks on ${base} failed: ${detail}${stop}${reverted}`, 'fixer error');
|
|
70
|
+
}
|
|
58
71
|
if (!fix.committed) {
|
|
59
72
|
const reverted = await revert(job);
|
|
60
73
|
return escalateCheckFix(job, fix.unrelated, `checks on ${base}`, reverted);
|
package/dist/pipeline.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { reviewRound } from './review.mjs';
|
|
|
8
8
|
import { skipReport, unclaimedError } from './skip.mjs';
|
|
9
9
|
import { newState, readState, resetState } from './state.mjs';
|
|
10
10
|
import { setUp } from './worktree-setup.mjs';
|
|
11
|
-
export async function processIssue(context, issue) {
|
|
11
|
+
export async function processIssue(context, issue, claimed = () => undefined) {
|
|
12
12
|
const { repo } = context;
|
|
13
13
|
const started = Date.now();
|
|
14
14
|
const log = context.recorder.scope({ issue: issue.number });
|
|
@@ -23,6 +23,7 @@ export async function processIssue(context, issue) {
|
|
|
23
23
|
if (skip !== undefined) {
|
|
24
24
|
return skip;
|
|
25
25
|
}
|
|
26
|
+
claimed();
|
|
26
27
|
log.event('issue.start', { title: issue.title, createdAt: issue.createdAt }, 'quiet');
|
|
27
28
|
const state = startState(context, issue, saved);
|
|
28
29
|
let report;
|
package/dist/run.mjs
CHANGED
|
@@ -40,7 +40,7 @@ async function handle(args, config, repo, recorder, controls) {
|
|
|
40
40
|
const context = await startRun(args, config, repo, recorder, interrupts);
|
|
41
41
|
const loop = {
|
|
42
42
|
issues: () => pendingIssues(context),
|
|
43
|
-
process: (issue) => processIssue(context, issue),
|
|
43
|
+
process: (issue, claimed) => processIssue(context, issue, claimed),
|
|
44
44
|
stop: interrupts.afterIssue,
|
|
45
45
|
concurrency: config.concurrency,
|
|
46
46
|
};
|
package/dist/watch.mjs
CHANGED
|
@@ -12,9 +12,8 @@ export async function watchIssues(args, watch) {
|
|
|
12
12
|
...watch,
|
|
13
13
|
process: async (issue) => {
|
|
14
14
|
running.add(issue.number);
|
|
15
|
-
claims.ring();
|
|
16
15
|
try {
|
|
17
|
-
return await watch.process(issue);
|
|
16
|
+
return await watch.process(issue, claims.ring);
|
|
18
17
|
}
|
|
19
18
|
finally {
|
|
20
19
|
running.delete(issue.number);
|