next-issue 6.6.2 → 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/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 { asError } from './errors.mjs';
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
- const fix = await fixRound(job, `The checks on ${base} failed after the change landed there.`, logs, [], 'checks');
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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-issue",
3
- "version": "6.6.2",
3
+ "version": "6.6.3",
4
4
  "description": "Autonomous issue harness driven by the pi SDK",
5
5
  "keywords": [
6
6
  "github",