next-issue 6.6.16 → 6.6.18

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 CHANGED
@@ -114,10 +114,11 @@ the run handles one issue. For each issue:
114
114
  fetches the base first, and treats the push as landed when the base holds
115
115
  the commit, for example after a timeout. When that fetch fails too, the
116
116
  harness hands the issue to a person with the reason `push unknown` and
117
- halts. The state file holds the commit during the push, so a run stopped
118
- meanwhile, or the next run after that hand-over, checks the base on resume
119
- and waits for the checks of the commit when it landed. The harness then
120
- waits for the checks of the pushed commit on the base branch. A repository
117
+ halts, even when the hand-over fails. The state file holds the commit
118
+ during the push, so a run stopped meanwhile, or the next run after that
119
+ hand-over, checks the base on resume and waits for the checks of the
120
+ commit when it landed. The harness then waits for the checks of the
121
+ pushed commit on the base branch. A repository
121
122
  that reports no check keeps asking for `checkGraceSeconds`. A pending state
122
123
  waits again, up to `checkTimeoutMinutes`. A read that fails is tried three
123
124
  times. When the checks pass, the harness closes the issue and sets
@@ -195,7 +196,8 @@ and comments the reason on the issue, when:
195
196
  - the checks on the base branch fail and the fixer cannot fix them, an error
196
197
  stops the fix, or they do not finish in time. The base branch is then
197
198
  broken, so the run claims no new issue and ends once the running issues
198
- end;
199
+ end. It halts this way even when the hand-over fails; the issue then ends
200
+ in error with both the reason and the hand-over error;
199
201
  - an agent does not finish in `agentTimeoutMinutes`;
200
202
  - the setup command fails, or does not finish in `setupTimeoutMinutes`;
201
203
  - a step of the run fails with an error. A `gh` call that is safe to repeat,
@@ -8,7 +8,7 @@ export function parseUnrelated(text) {
8
8
  }
9
9
  export function parseResolved(text) {
10
10
  const note = lastMatch(text, /^resolved:[^\S\r\n]*(.+)$/gim);
11
- return note === '' ? undefined : note;
11
+ return note === undefined || PLACEHOLDERS.has(note.toLowerCase()) ? undefined : note;
12
12
  }
13
13
  export function parseCommitSubject(text, fallback) {
14
14
  const subject = lastMatch(text, /^commit:\s*(.+)$/gim)
package/dist/handover.mjs CHANGED
@@ -1,3 +1,4 @@
1
+ import { runStopped } from './children.mjs';
1
2
  import { elapsedMs } from './durations.mjs';
2
3
  import { message } from './errors.mjs';
3
4
  import { HAND_OVER } from './hand-over-comments.mjs';
@@ -8,7 +9,20 @@ import { logIssueError } from './skip.mjs';
8
9
  import { dropState, writeState } from './state.mjs';
9
10
  export async function escalateAndFinish(job, note, reason) {
10
11
  const reverted = await revertFailedFix(job);
11
- await handOver(job.context, job.log, job.issue.number, job.state, `${note}${reverted}`);
12
+ try {
13
+ await handOver(job.context, job.log, job.issue.number, job.state, `${note}${reverted}`);
14
+ }
15
+ catch (error) {
16
+ if (!job.mainBroken || runStopped()) {
17
+ throw error;
18
+ }
19
+ const failure = message(error);
20
+ job.log.event('hand-over.error', { reason, error: failure }, 'quiet');
21
+ return {
22
+ done: true,
23
+ report: await finish(job, 'error', `${reason}; the hand-over failed: ${failure}`),
24
+ };
25
+ }
12
26
  return { done: true, report: await finish(job, 'needs-human', reason) };
13
27
  }
14
28
  export async function finishDone(job) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-issue",
3
- "version": "6.6.16",
3
+ "version": "6.6.18",
4
4
  "description": "Autonomous issue harness driven by the pi SDK",
5
5
  "keywords": [
6
6
  "github",