next-issue 7.8.18 → 7.8.20
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 +8 -2
- package/dist/enter-review.mjs +5 -6
- package/dist/pipeline.mjs +2 -1
- package/dist/revert.mjs +1 -1
- package/dist/state.mjs +3 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -188,7 +188,11 @@ the run handles one issue. For each issue:
|
|
|
188
188
|
failure unrelated hands it over too, as for the checks on the base.
|
|
189
189
|
Nothing of the change reaches the base. A run that stops while a
|
|
190
190
|
command runs keeps the budget, and the next run merges and runs every
|
|
191
|
-
command again before any push. The
|
|
191
|
+
command again before any push. The state file keeps the merged commit
|
|
192
|
+
from the squash until the push, so the next run that resumes the issue
|
|
193
|
+
first puts the issue branch back at that commit, before the setup
|
|
194
|
+
command. A commit that a person adds to the branch after a hand-over
|
|
195
|
+
stays on it. The harness then pushes the commit to
|
|
192
196
|
the base branch, without force. A push that the remote refuses, for
|
|
193
197
|
example because the base moved, starts the rebase again, three times at
|
|
194
198
|
most. When the push fails, the harness fetches the base first, and
|
|
@@ -278,7 +282,9 @@ the run handles one issue. For each issue:
|
|
|
278
282
|
lands the same way. When the fixer cannot fix them, its fix cannot land,
|
|
279
283
|
an error stops the fix, or the budget runs out, the harness reverts every
|
|
280
284
|
commit of the change on the base branch, pushes the revert and hands the
|
|
281
|
-
issue to a person.
|
|
285
|
+
issue to a person. When the push of the fix ends as `push unknown`, the
|
|
286
|
+
harness does not revert: it hands the issue over and halts as for any
|
|
287
|
+
other `push unknown`. A revert
|
|
282
288
|
push that the remote refuses, for example because the base moved, makes
|
|
283
289
|
the revert again on the new base, three times at most. A failed revert
|
|
284
290
|
push that the base holds after a fetch counts as landed. When that fetch
|
package/dist/enter-review.mjs
CHANGED
|
@@ -16,13 +16,12 @@ export async function enterReview(job) {
|
|
|
16
16
|
return escalateAndFinish(job, `The run stopped during the revert of the change on ${base}. The harness reverted the change on ${base}.`, 'revert stopped');
|
|
17
17
|
}
|
|
18
18
|
const landed = state.landed?.at(-1);
|
|
19
|
-
|
|
20
|
-
await
|
|
21
|
-
if (landed !== undefined || state.phase === 'approved') {
|
|
19
|
+
if (landed !== undefined || state.phase === 'approved') {
|
|
20
|
+
await beforeBaseSettled(state, context.base, async () => {
|
|
22
21
|
const { ports } = context;
|
|
23
22
|
await ports.discardChanges(job.worktree, await ports.revision(job.worktree), job.branch);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
26
25
|
if (landed !== undefined) {
|
|
27
26
|
return resumeLanding(job, landed);
|
|
28
27
|
}
|
|
@@ -48,7 +47,7 @@ async function settlePush(job) {
|
|
|
48
47
|
releaseSettled(state);
|
|
49
48
|
await writeState(repo, state);
|
|
50
49
|
}
|
|
51
|
-
async function settleSquash(job) {
|
|
50
|
+
export async function settleSquash(job) {
|
|
52
51
|
const { context, state, worktree, branch } = job;
|
|
53
52
|
const sha = state.squashing;
|
|
54
53
|
if (sha === undefined) {
|
package/dist/pipeline.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { enterReview } from './enter-review.mjs';
|
|
1
|
+
import { enterReview, settleSquash } from './enter-review.mjs';
|
|
2
2
|
import { branchName } from './git.mjs';
|
|
3
3
|
import { runStopped } from './children.mjs';
|
|
4
4
|
import { claimedError, dropClosed, finishClosing, stop, stopNow } from './handover.mjs';
|
|
@@ -72,6 +72,7 @@ async function work(context, issue, log, state, start, handedOver, pending) {
|
|
|
72
72
|
const { job, setup } = await beforeBaseSettled(state, context.base, async () => {
|
|
73
73
|
const opened = await openJob(context, issue, log, state, start, handedOver, pending);
|
|
74
74
|
await settleReview(opened);
|
|
75
|
+
await settleSquash(opened);
|
|
75
76
|
return { job: opened, setup: await setUp(opened) };
|
|
76
77
|
});
|
|
77
78
|
if (setup.done) {
|
package/dist/revert.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { message } from './errors.mjs';
|
|
|
3
3
|
import { writeState } from './state.mjs';
|
|
4
4
|
import { HALT_NOTE, releaseSettled } from './unsettled.mjs';
|
|
5
5
|
export async function revertFailedFix(job) {
|
|
6
|
-
if (!job.repairing || (job.state.landed ?? []).length === 0) {
|
|
6
|
+
if (!job.repairing || job.state.pushing !== undefined || (job.state.landed ?? []).length === 0) {
|
|
7
7
|
return '';
|
|
8
8
|
}
|
|
9
9
|
job.repairing = false;
|
package/dist/state.mjs
CHANGED
|
@@ -87,15 +87,16 @@ export function newState(issue, branch) {
|
|
|
87
87
|
return { issue, phase: 'claimed', branch, ciFixes: 0, reviewRounds: 0, reviewLog: [] };
|
|
88
88
|
}
|
|
89
89
|
/**
|
|
90
|
-
* Drops the budgets and findings; a hand-over (`handedOver`) also cancels an approval, the closing mark and the
|
|
90
|
+
* Drops the budgets and findings; a hand-over (`handedOver`) also cancels an approval, the closing mark, the review start and the squash start,
|
|
91
91
|
* so a resume that stops before it finishes is resumed again rather than closed as done.
|
|
92
92
|
*/
|
|
93
93
|
export function resetState(state, handedOver = false) {
|
|
94
|
-
const { handedOver: _handedOver, pendingHandOver: _pending, closing, reviewing, ...rest } = state;
|
|
94
|
+
const { handedOver: _handedOver, pendingHandOver: _pending, closing, reviewing, squashing, ...rest } = state;
|
|
95
95
|
const phase = handedOver && rest.phase === 'approved' ? 'review' : rest.phase;
|
|
96
96
|
const kept = {
|
|
97
97
|
...(!handedOver && closing !== undefined ? { closing } : {}),
|
|
98
98
|
...(!handedOver && reviewing !== undefined ? { reviewing } : {}),
|
|
99
|
+
...(!handedOver && squashing !== undefined ? { squashing } : {}),
|
|
99
100
|
};
|
|
100
101
|
return { ...rest, ...kept, phase, ciFixes: 0, commitFixes: 0, reviewRounds: 0, reviewLog: [] };
|
|
101
102
|
}
|