next-issue 7.8.10 → 7.8.12

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
@@ -388,16 +388,16 @@ A halt that leaves a commit on the base, or a push or revert that may be on
388
388
  it, with checks nobody awaited (`checks error`, `push unknown`,
389
389
  `main checks timeout`, `main checks cancelled`, an error or a failed setup
390
390
  on such a resume before the base is checked, or a stop or kill while the run
391
- waits for the checks of a commit it landed) is saved in the state file of
392
- its issue. A stopped issue resumes in the next run; any other waits for a
393
- person, so later runs skip it. Either way, no later run lands another change
394
- meanwhile: an issue that reaches the landing ends `stopped` with the reason
395
- `base unchecked`, keeps its state, branch and labels, and the run claims no
396
- more issues; the log holds a `land.blocked` event with the waiting issues.
397
- Runs take such a halted issue before the others, and a running one still
398
- resumes, so an older issue that reaches the landing first does not keep it
399
- from checking the base. Once a person answers or
400
- takes the label off, the issue resumes, checks the base and waits for the
391
+ pushes a change to the base or waits for the checks of a commit it landed) is
392
+ saved in the state file of its issue. A stopped issue resumes in the next
393
+ run; any other waits for a person, so later runs skip it. Either way, no
394
+ later run lands another change meanwhile: an issue that reaches the landing
395
+ ends `stopped` with the reason `base unchecked`, keeps its state, branch and
396
+ labels, and the run claims no more issues; the log holds a `land.blocked`
397
+ event with the waiting issues. Runs take such a halted issue before the
398
+ others, and a running one still resumes, so an older issue that reaches the
399
+ landing first does not keep it from checking the base. Once a person answers
400
+ or takes the label off, the issue resumes, checks the base and waits for the
401
401
  checks of its commit; when those are known (the issue is done, or its
402
402
  commits are reverted or found not on the base), the issue drops the halt
403
403
  from its state and the next run lands the held issues again. A later
@@ -42,6 +42,7 @@ async function settlePush(job) {
42
42
  }
43
43
  if (await ports.isOnBase(worktree, base, config.remote, sha)) {
44
44
  state.landed = [...(state.landed ?? []), sha];
45
+ state.halted = true;
45
46
  }
46
47
  state.pushing = undefined;
47
48
  releaseSettled(state);
package/dist/gate.mjs CHANGED
@@ -20,8 +20,9 @@ export async function checkGate(job, sha) {
20
20
  }
21
21
  return unreadChecks(job, error);
22
22
  }
23
- // The checks are known now, so an earlier halt on this issue no longer holds back other landings.
24
- if (job.state.halted === true) {
23
+ // Checks that finished leave the base known, so an earlier halt on this issue no longer holds back other landings.
24
+ const finished = checks === 'pass' || checks === 'none' || checks === 'fail';
25
+ if (finished && job.state.halted === true) {
25
26
  delete job.state.halted;
26
27
  await writeState(job.context.repo, job.state);
27
28
  }
package/dist/land.mjs CHANGED
@@ -123,7 +123,9 @@ async function pushChange(job) {
123
123
  const sha = await ports.revision(worktree);
124
124
  // A halt saved before nothing of this issue was left on the base must not block once this push lands.
125
125
  releaseSettled(state);
126
+ const halted = state.halted;
126
127
  state.pushing = sha;
128
+ state.halted = true;
127
129
  await writeState(repo, state);
128
130
  const pushed = await log.step('land', { base, sha }, async () => (await ports.pushToBase(worktree, config.remote, base)) ||
129
131
  ports.isOnBase(worktree, base, config.remote, sha).catch((error) => {
@@ -134,13 +136,14 @@ async function pushChange(job) {
134
136
  }));
135
137
  if (pushed === undefined) {
136
138
  job.mainBroken = true;
137
- state.halted = true;
138
139
  return escalateAndFinish(job, `The push to ${base} failed and the fetch of ${base} failed too, so the harness cannot tell whether the commit landed. ${HALT_NOTE}`, 'push unknown');
139
140
  }
140
141
  state.pushing = undefined;
141
142
  if (pushed) {
142
143
  state.landed = [...(state.landed ?? []), sha];
143
- state.halted = true;
144
+ }
145
+ else if (halted !== true) {
146
+ delete state.halted;
144
147
  }
145
148
  await writeState(repo, state);
146
149
  if (pushed) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-issue",
3
- "version": "7.8.10",
3
+ "version": "7.8.12",
4
4
  "description": "Autonomous issue harness driven by the pi SDK",
5
5
  "keywords": [
6
6
  "github",