next-issue 8.5.0 → 8.5.1

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
@@ -819,7 +819,11 @@ that says so.
819
819
  A hand-over marks the state file as handed over once its label and comment
820
820
  reach GitHub. When either fails, or the run stops during it, the state keeps its
821
821
  budgets and findings, and a later hand-over of the issue keeps the first
822
- reason. To give the issue another try,
822
+ reason. A handed-over issue carries the `status:needs-human` and `status:todo`
823
+ labels, and the hand-over takes `status:in-progress` and `status:in-review`
824
+ off. With an empty `labels.ready`, it carries only `status:needs-human`. The
825
+ ready label lets a run find the issue again even when its state file is lost.
826
+ To give the issue another try,
823
827
  take the `status:needs-human` label off, or answer the hand-over. The next run
824
828
  that claims the issue puts the budgets and the findings back to zero, clears
825
829
  the mark and keeps the branch and the step that the last run reached, so the
package/dist/handover.mjs CHANGED
@@ -165,7 +165,10 @@ async function handOver(context, log, issue, state, reason, earlier) {
165
165
  const since = earlier?.since ?? (await threadEnd(context, issue));
166
166
  pending = { ...earlier, reason, ...(since === undefined ? {} : { since }) };
167
167
  await writeState(repo, { ...rest, pendingHandOver: pending });
168
- await setStatus(context, issue, config.labels.needsHuman);
168
+ if (config.labels.ready.length > 0) {
169
+ await ports.setLabel(repo, 'issue', issue, config.labels.ready, []);
170
+ }
171
+ await setStatus(context, issue, config.labels.needsHuman, [config.labels.ready]);
169
172
  pending = { ...pending, labelled: true };
170
173
  await writeState(repo, { ...taken, pendingHandOver: pending });
171
174
  await ports.commentOnIssue(repo, issue, handOverComment(reason));
package/dist/job.mjs CHANGED
@@ -33,7 +33,8 @@ export async function runRole(job, role, prompt, profile) {
33
33
  export function fallbackTitle(issue) {
34
34
  return `fix: resolve issue #${issue.number}`;
35
35
  }
36
- export async function setStatus(context, issue, label) {
36
+ export async function setStatus(context, issue, label, keep = []) {
37
37
  const { repo, config, ports } = context;
38
- await ports.setLabel(repo, 'issue', issue, label, managedLabels(config));
38
+ const remove = managedLabels(config).filter((name) => !keep.includes(name));
39
+ await ports.setLabel(repo, 'issue', issue, label, remove);
39
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-issue",
3
- "version": "8.5.0",
3
+ "version": "8.5.1",
4
4
  "description": "Autonomous issue harness driven by the pi SDK",
5
5
  "keywords": [
6
6
  "github",