next-issue 7.8.1 → 7.8.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 CHANGED
@@ -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
@@ -995,23 +998,30 @@ previous tag, grouped by type, and end with the compare link from that tag.
995
998
  The release is the `release` job of the `ci` workflow, and it runs only after
996
999
  the `check` job of the same commit passes. A commit that fails the typecheck,
997
1000
  lint, format check, tests or build releases nothing. As the release is part of
998
- the `push` run, the harness waits for it like any other check.
1001
+ the `push` run, the harness waits for it like any other check. Release jobs run
1002
+ one at a time, in the order their `check` jobs finish, which is not always push
1003
+ order. When a later commit releases first, its tag holds the earlier commit and
1004
+ its version counts the commits of both, so the release job of the earlier commit
1005
+ only repairs and does nothing else.
999
1006
 
1000
1007
  The workflow then gives `next-issue` and `@ravshansbox/pi-next-issue` the same
1001
1008
  new version and publishes both packages to npm with a
1002
1009
  [trusted publish](https://docs.npmjs.com/trusted-publishers), so no token is
1003
1010
  stored. It pushes the tag before the publish and makes the GitHub release after
1004
1011
  it, so the next release always counts from the new tag and never tries to
1005
- publish a version that npm already holds. npm makes a new version live a few
1012
+ publish a version that npm already holds, and no release job counts from a tag
1013
+ before one that already holds its commit. npm makes a new version live a few
1006
1014
  minutes after the publish, and not always in the order it got them, so before
1007
1015
  it publishes, the job waits until npm serves both packages at the version of the
1008
1016
  last tag, for up to 10 minutes. Thus a new version never goes live before the
1009
- one that came before it. Every run first repairs the last tag: from a checkout
1010
- of that tag it publishes each package that npm does not serve at the tag
1017
+ one that came before it. Every run first repairs the last tag before its own
1018
+ commit: from a checkout of that tag it publishes each package that npm does not serve at the tag
1011
1019
  version, and makes the GitHub release if it is missing. A package that npm
1012
1020
  refuses as a version it already holds, but does not serve yet, counts as
1013
- published. So when a step fails after the tag push, the next run finishes that
1014
- release before it makes a new one. To repair a release without a new commit,
1021
+ published. So when a step fails after the tag push, the next run of a later
1022
+ commit finishes that release before it makes a new one. The release job of an
1023
+ earlier commit that runs after it does not, as it repairs the tag before its
1024
+ own commit. To repair a release without a new commit,
1015
1025
  run the `ci` workflow by hand; after the checks pass, the release job only
1016
1026
  repairs and does nothing else.
1017
1027
  The job uses the npm that comes with Node 24 and never installs another one.
@@ -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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-issue",
3
- "version": "7.8.1",
3
+ "version": "7.8.3",
4
4
  "description": "Autonomous issue harness driven by the pi SDK",
5
5
  "keywords": [
6
6
  "github",