next-issue 7.8.2 → 7.8.4

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
@@ -53,7 +53,7 @@ the run handles one issue. For each issue:
53
53
  `status:in-progress` or `status:in-review` label. A `status:done`,
54
54
  `status:needs-human` or `status:blocked` label always stops the claim, a
55
55
  resume too, except a `status:needs-human` issue with an answer to its
56
- hand-over, and except an issue whose finish a stop cut short and that
56
+ hand-over that the run made, and except an issue whose finish a stop cut short and that
57
57
  was not handed over (see step 7 below). An issue that GitHub lists as
58
58
  blocked by an open issue waits,
59
59
  because its blocker closes only when the change of the blocker lands.
@@ -105,6 +105,9 @@ the run handles one issue. For each issue:
105
105
  questions in order, numbered by the harness. The harness reads the issue
106
106
  again and adds the questions after any text under its `Open questions`
107
107
  heading, or adds that heading at the end of the body when it has none.
108
+ When that body edit fails, the harness records a `questions.body-failed`
109
+ event in the run log and still hands the issue over with the questions in
110
+ the comment.
108
111
  5. Let the reviewer agent judge the diff, at most `diffMaxChars` of it. The
109
112
  reviewer reads files and runs commands in the worktree, so it can prove a
110
113
  finding with the tests or the type check. The harness then throws away every
@@ -744,7 +747,9 @@ the mark and keeps the branch and the step that the last run reached, so the
744
747
  work carries on where it stopped. After a revert, the branch holds the change
745
748
  again on top of the revert, so the change goes back to the review. An issue
746
749
  that still has the label is not claimed, unless it has an answer to the
747
- hand-over: then the run claims it and takes the label off. When the label of a
750
+ hand-over: then the run claims it and takes the label off. A label that a
751
+ person adds to a stopped issue that is not handed over holds the issue, even
752
+ when an earlier hand-over has an answer. When the label of a
748
753
  hand-over reaches GitHub but its comment does not, an answer to an earlier
749
754
  hand-over does not count: the issue waits, and the worker lists it, until a
750
755
  person takes the label off or a writer comments after that hand-over. Either
@@ -1,5 +1,6 @@
1
1
  import { parseCommitSubject, parseQuestions } from './agent-reply.mjs';
2
2
  import { CODING } from './agents.mjs';
3
+ import { message } from './errors.mjs';
3
4
  import { commitWork } from './fix.mjs';
4
5
  import { escalateAndFinish } from './handover.mjs';
5
6
  import { numbered, withOpenQuestions } from './issue-format.mjs';
@@ -27,11 +28,16 @@ export async function implement(job) {
27
28
  return ROUND_CONTINUE;
28
29
  }
29
30
  async function askQuestions(job, before, questions) {
30
- const { context, issue, worktree, branch } = job;
31
+ const { context, issue, log, worktree, branch } = job;
31
32
  const { repo, ports } = context;
32
33
  await ports.discardChanges(worktree, before, branch);
33
34
  const fresh = await ports.viewIssue(repo, issue.number);
34
- await ports.editIssueBody(repo, issue.number, withOpenQuestions(fresh.body, questions));
35
+ try {
36
+ await ports.editIssueBody(repo, issue.number, withOpenQuestions(fresh.body, questions));
37
+ }
38
+ catch (error) {
39
+ log.event('questions.body-failed', { error: message(error) }, 'quiet');
40
+ }
35
41
  return escalateAndFinish(job, `The implementer has questions about the issue.\n\n${numbered(questions)}`, 'questions');
36
42
  }
37
43
  async function useEarlierCommit(job) {
package/dist/skip.mjs CHANGED
@@ -74,6 +74,9 @@ async function hasAnswer(context, issue, saved) {
74
74
  if (!hasLabel(issue.labels, context.config.labels.needsHuman)) {
75
75
  return false;
76
76
  }
77
+ if (saved !== undefined && saved.handedOver !== true && saved.pendingHandOver === undefined) {
78
+ return false;
79
+ }
77
80
  return (await handOverReply(context, issue.number, saved?.pendingHandOver)).length > 0;
78
81
  }
79
82
  function readError(log, issue, saved, error, started) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-issue",
3
- "version": "7.8.2",
3
+ "version": "7.8.4",
4
4
  "description": "Autonomous issue harness driven by the pi SDK",
5
5
  "keywords": [
6
6
  "github",