next-issue 6.6.115 → 6.6.116
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 +7 -8
- package/dist/fix.mjs +9 -13
- package/dist/review.mjs +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -285,14 +285,13 @@ and comments the reason on the issue, when:
|
|
|
285
285
|
`<n>` branch when the issue is done;
|
|
286
286
|
- a fixer disputes or settles the findings and leaves a change behind, either
|
|
287
287
|
in the worktree or in a commit of its own. A dispute carries a reason, not a
|
|
288
|
-
diff,
|
|
289
|
-
the
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
branches go away with the `<n>` branch when the issue is done;
|
|
288
|
+
diff, and a retry of the issue cleans the worktree before the next review,
|
|
289
|
+
so the change does not stay there: its edits are committed with no hooks on
|
|
290
|
+
top of any commit of its own, that commit moves to a new local
|
|
291
|
+
`<n>-dispute-<commit>` branch, and the hand-over comment names that branch.
|
|
292
|
+
The `<n>` branch keeps only what will land, and the reviewer of a retry sees
|
|
293
|
+
none of the change. Neither lands. The `<n>-dispute-<commit>` branches go
|
|
294
|
+
away with the `<n>` branch when the issue is done;
|
|
296
295
|
- the reviewer gives no verdict, or the checks do not finish in time;
|
|
297
296
|
- the push to the base branch fails three times;
|
|
298
297
|
- the checks on the base branch fail and the fixer cannot fix them, an error
|
package/dist/fix.mjs
CHANGED
|
@@ -15,7 +15,7 @@ export function escalateCheckFix(job, unrelated, checks, after = '', aside) {
|
|
|
15
15
|
}
|
|
16
16
|
return escalateAndFinish(job, `The ${checks} fail for a reason this change did not cause: ${unrelated}${savedIn(aside)}${after}`, 'unrelated failure');
|
|
17
17
|
}
|
|
18
|
-
function savedIn(aside) {
|
|
18
|
+
export function savedIn(aside) {
|
|
19
19
|
return aside === undefined
|
|
20
20
|
? ''
|
|
21
21
|
: ` The fixer left a change behind; it is saved in the branch \`${aside}\`.`;
|
|
@@ -62,20 +62,16 @@ function fixBudget(job, kind) {
|
|
|
62
62
|
async function disputedFix(job, before, reason, note, kind) {
|
|
63
63
|
const { context, issue, log, worktree, branch } = job;
|
|
64
64
|
const { ports } = context;
|
|
65
|
-
//
|
|
66
|
-
const saved = kind === 'checks'
|
|
67
|
-
(await ports.saveEdits(worktree, `fix: edits left by the check fixer\n\nRefs #${issue.number}`));
|
|
65
|
+
// A retry or the revert after a failed check cleans this worktree, so edits left there would be lost.
|
|
66
|
+
const saved = await ports.saveEdits(worktree, `fix: edits left by the ${kind === 'checks' ? 'check' : 'review'} fixer\n\nRefs #${issue.number}`);
|
|
68
67
|
const disputed = await ports.revision(worktree);
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
const aside = `${branch}-dispute-${disputed.slice(0, 7)}`;
|
|
72
|
-
await ports.setAside(worktree, before, aside);
|
|
73
|
-
log.event('fix.aside', { branch: aside, saved }, 'quiet');
|
|
74
|
-
if (kind === 'checks') {
|
|
75
|
-
return disputedNote(job, reason, note, { stray: true, aside });
|
|
76
|
-
}
|
|
68
|
+
if (disputed === before) {
|
|
69
|
+
return disputedNote(job, reason, note, { stray: false });
|
|
77
70
|
}
|
|
78
|
-
|
|
71
|
+
const aside = `${branch}-dispute-${disputed.slice(0, 7)}`;
|
|
72
|
+
await ports.setAside(worktree, before, aside);
|
|
73
|
+
log.event('fix.aside', { branch: aside, saved }, 'quiet');
|
|
74
|
+
return disputedNote(job, reason, note, { stray: true, aside });
|
|
79
75
|
}
|
|
80
76
|
function disputedNote(job, reason, note, left) {
|
|
81
77
|
const event = 'unrelated' in note ? 'fix.unrelated' : 'fix.resolved';
|
package/dist/review.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { REVIEWING } from './agents.mjs';
|
|
|
2
2
|
import { runStopped } from './children.mjs';
|
|
3
3
|
import { budgetUse, refundBudget, refundOnKill, spendBudget } from './budget.mjs';
|
|
4
4
|
import { message } from './errors.mjs';
|
|
5
|
-
import { fixRound } from './fix.mjs';
|
|
5
|
+
import { fixRound, savedIn } from './fix.mjs';
|
|
6
6
|
import { escalateAndFinish } from './handover.mjs';
|
|
7
7
|
import { ROUND_CONTINUE, runRole, setStatus } from './job.mjs';
|
|
8
8
|
import { landApproved } from './land.mjs';
|
|
@@ -119,7 +119,7 @@ async function unfixedRound(job, fix) {
|
|
|
119
119
|
return escalateAndFinish(job, 'The fixer added no commit for the review findings.', 'no fix commit');
|
|
120
120
|
}
|
|
121
121
|
if (fix.stray === true) {
|
|
122
|
-
return escalateAndFinish(job, `The fixer ${fix.unrelated === undefined ? 'settled' : 'disputed'} the findings
|
|
122
|
+
return escalateAndFinish(job, `The fixer ${fix.unrelated === undefined ? 'settled' : 'disputed'} the findings: ${note}${savedIn(fix.aside)}`, 'dispute with changes');
|
|
123
123
|
}
|
|
124
124
|
const round = state.reviewLog.at(-1);
|
|
125
125
|
if (fix.unrelated === undefined) {
|