next-issue 6.6.104 → 6.6.105

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
@@ -327,9 +327,11 @@ before the others, and a running one still resumes, so an older issue that
327
327
  reaches the landing first does not keep it from checking the base. Once a person answers or
328
328
  takes the label off, the issue resumes, checks the base and waits for the
329
329
  checks of its commit; when those are known (the issue is done, or its
330
- commits are reverted or found not on the base), the next run lands the
331
- held issues again. A person who gives such an issue up instead (the `skip`
332
- label, which **Give up** in pi adds) releases the block: the next run skips
330
+ commits are reverted or found not on the base), the issue drops the halt
331
+ from its state and the next run lands the held issues again. A later
332
+ landing of that issue blocks other runs only if it halts again. A
333
+ person who gives such an issue up instead (the `skip` label, which
334
+ **Give up** in pi adds) releases the block: the next run skips
333
335
  the issue, drops its halt from the state and logs a `land.released` event,
334
336
  so other issues land again on a base whose last checks nobody read. The state
335
337
  keeps the commits, so taking the `skip` label off later resumes the issue
@@ -3,7 +3,7 @@ import { ROUND_CONTINUE } from './job.mjs';
3
3
  import { landApproved, resumeLanding } from './land.mjs';
4
4
  import { reapplyMessage, restoreChange } from './revert.mjs';
5
5
  import { writeState } from './state.mjs';
6
- import { beforeBaseSettled } from './unsettled.mjs';
6
+ import { beforeBaseSettled, releaseSettled } from './unsettled.mjs';
7
7
  export async function enterReview(job) {
8
8
  const { context, state } = job;
9
9
  const reverted = await beforeBaseSettled(state, context.base, async () => {
@@ -44,6 +44,7 @@ async function settlePush(job) {
44
44
  state.landed = [...(state.landed ?? []), sha];
45
45
  }
46
46
  state.pushing = undefined;
47
+ releaseSettled(state);
47
48
  await writeState(repo, state);
48
49
  }
49
50
  async function settleSquash(job) {
@@ -75,6 +76,7 @@ async function settleRevert(job) {
75
76
  restoreChange(state);
76
77
  }
77
78
  state.reverting = undefined;
79
+ releaseSettled(state);
78
80
  await writeState(repo, state);
79
81
  return reverted;
80
82
  }
package/dist/gate.mjs CHANGED
@@ -20,6 +20,8 @@ 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
+ delete job.state.halted;
23
25
  if (checks === 'pass' || checks === 'none') {
24
26
  return GATE_PASSED;
25
27
  }
package/dist/land.mjs CHANGED
@@ -6,7 +6,7 @@ import { escalateAndFinish, finishDone, stop } from './handover.mjs';
6
6
  import { oneAtATime } from './lock.mjs';
7
7
  import { revertFailedFix } from './revert.mjs';
8
8
  import { readState, savedIssues, writeState } from './state.mjs';
9
- import { beforeBaseSettled, blocksLanding, HALT_NOTE } from './unsettled.mjs';
9
+ import { beforeBaseSettled, blocksLanding, HALT_NOTE, releaseSettled } from './unsettled.mjs';
10
10
  export function landApproved(job) {
11
11
  return landing(job, () => landLoop(job));
12
12
  }
@@ -112,6 +112,8 @@ async function pushChange(job) {
112
112
  return rebased;
113
113
  }
114
114
  const sha = await ports.revision(worktree);
115
+ // A halt saved before nothing of this issue was left on the base must not block once this push lands.
116
+ releaseSettled(state);
115
117
  state.pushing = sha;
116
118
  await writeState(repo, state);
117
119
  const pushed = await log.step('land', { base, sha }, async () => (await ports.pushToBase(worktree, config.remote, base)) ||
package/dist/revert.mjs CHANGED
@@ -1,6 +1,7 @@
1
1
  import { runStopped } from './children.mjs';
2
2
  import { message } from './errors.mjs';
3
3
  import { writeState } from './state.mjs';
4
+ import { releaseSettled } from './unsettled.mjs';
4
5
  export async function revertFailedFix(job) {
5
6
  if (!job.repairing || (job.state.landed ?? []).length === 0) {
6
7
  return '';
@@ -57,6 +58,7 @@ export async function revert(job) {
57
58
  return ` The revert of the change on ${base} failed, so the landed commits stay on ${base}.`;
58
59
  }
59
60
  restoreChange(state);
61
+ releaseSettled(state);
60
62
  await writeState(repo, state);
61
63
  return ` The harness reverted the change on ${base}.`;
62
64
  }
@@ -18,6 +18,12 @@ export const HALT_NOTE = 'The run halts, and no run lands another change until t
18
18
  export function blocksLanding(state, base) {
19
19
  return state.halted === true && state.closing !== true && heldOnBase(state, base) !== '';
20
20
  }
21
+ /** Drops a saved halt once nothing of this issue is, or may be, on the base with unknown checks. */
22
+ export function releaseSettled(state) {
23
+ if (heldOnBase(state, '') === '') {
24
+ delete state.halted;
25
+ }
26
+ }
21
27
  export function unsettledNote(held, step) {
22
28
  return ` ${step} before it checked the base: ${held}, and its checks were not awaited. ${HALT_NOTE}`;
23
29
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-issue",
3
- "version": "6.6.104",
3
+ "version": "6.6.105",
4
4
  "description": "Autonomous issue harness driven by the pi SDK",
5
5
  "keywords": [
6
6
  "github",