next-issue 6.6.94 → 6.6.96

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/dist/conflict.mjs CHANGED
@@ -1,5 +1,6 @@
1
1
  import { parseCommitSubject } from './agent-reply.mjs';
2
- import { spendBudget } from './budget.mjs';
2
+ import { refundBudget, spendBudget } from './budget.mjs';
3
+ import { runStopped } from './children.mjs';
3
4
  import { commitWork, runFixer } from './fix.mjs';
4
5
  import { escalateAndFinish } from './handover.mjs';
5
6
  import { fallbackTitle } from './job.mjs';
@@ -70,6 +71,9 @@ async function resolve(job, merge) {
70
71
  return await commitWork(job, before, subject, 'fixer', (cwd, message) => ports.commitMerge(cwd, merge, message));
71
72
  }
72
73
  catch (error) {
74
+ if (files.length > 0 && runStopped()) {
75
+ await refundBudget(job, 'ciFixes');
76
+ }
73
77
  await ports.abortMerge(worktree, before);
74
78
  throw error;
75
79
  }
package/dist/handover.mjs CHANGED
@@ -176,7 +176,7 @@ function handOverComment(reason) {
176
176
  return fitComment(`${HAND_OVER} ${reason}`, CUT);
177
177
  }
178
178
  export async function claimedError(context, log, issue, state, error, started) {
179
- const { reason } = logIssueError(log, error, started);
179
+ const reason = message(error);
180
180
  try {
181
181
  const earlier = error instanceof HandOverFailed ? error.pending : undefined;
182
182
  await handOver(context, log, issue.number, state, handOverReason(error, reason), earlier);
@@ -184,6 +184,8 @@ export async function claimedError(context, log, issue, state, error, started) {
184
184
  catch (failure) {
185
185
  log.event('hand-over.error', { error: message(failure) }, 'quiet');
186
186
  }
187
+ // The issue ends (and the waiting questions go out) only once the hand-over is done.
188
+ logIssueError(log, error, started);
187
189
  await cleanUp(context, log, state.branch);
188
190
  return issueReport(issue.number, 'error', state, started, reason);
189
191
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-issue",
3
- "version": "6.6.94",
3
+ "version": "6.6.96",
4
4
  "description": "Autonomous issue harness driven by the pi SDK",
5
5
  "keywords": [
6
6
  "github",