next-issue 6.6.66 → 6.6.67
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 +6 -1
- package/dist/worktree-setup.mjs +20 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -257,7 +257,12 @@ and comments the reason on the issue, when:
|
|
|
257
257
|
end. It halts this way even when the hand-over fails; the issue then ends
|
|
258
258
|
in error with both the reason and the hand-over error;
|
|
259
259
|
- an agent does not finish in `agentTimeoutMinutes`;
|
|
260
|
-
- the setup command fails, or does not finish in `setupTimeoutMinutes
|
|
260
|
+
- the setup command fails, or does not finish in `setupTimeoutMinutes`. On a
|
|
261
|
+
resume whose state holds a landed commit, or a push or revert that may have
|
|
262
|
+
reached the base, the setup runs before the harness checks the base, so it
|
|
263
|
+
then also halts the run, with the commits and state kept for the next run.
|
|
264
|
+
The comment says what may be on the base and that its checks were not
|
|
265
|
+
awaited;
|
|
261
266
|
- a step of the run fails with an error. A `gh` call that is safe to repeat,
|
|
262
267
|
such as a read or a label edit, is tried up to three times first when the
|
|
263
268
|
network fails. A `gh issue comment` is
|
package/dist/worktree-setup.mjs
CHANGED
|
@@ -21,7 +21,25 @@ export async function setUp(job) {
|
|
|
21
21
|
async function setupFailed(job, setup) {
|
|
22
22
|
const late = setup.timedOut === true;
|
|
23
23
|
job.log.event('setup.fail', { code: setup.code, timedOut: late, stderr: keepTail(setup.stderr.trim(), 2000) }, 'quiet');
|
|
24
|
-
|
|
24
|
+
const unsettled = unsettledBase(job);
|
|
25
|
+
if (unsettled !== '') {
|
|
26
|
+
job.mainBroken = true;
|
|
27
|
+
}
|
|
28
|
+
const note = late
|
|
25
29
|
? `The setup command did not finish in ${job.context.config.setupTimeoutMinutes} minutes.`
|
|
26
|
-
: 'The setup command failed in the worktree.'
|
|
30
|
+
: 'The setup command failed in the worktree.';
|
|
31
|
+
return escalateAndFinish(job, `${note}${unsettled}`, late ? 'setup timeout' : 'setup failed');
|
|
32
|
+
}
|
|
33
|
+
function unsettledBase(job) {
|
|
34
|
+
const { landed, pushing, reverting } = job.state;
|
|
35
|
+
const base = `\`${job.context.base}\``;
|
|
36
|
+
const held = [
|
|
37
|
+
(landed ?? []).length > 0 ? `a landed commit is on ${base}` : '',
|
|
38
|
+
pushing === undefined ? '' : `a push may be on ${base}`,
|
|
39
|
+
reverting === undefined ? '' : `a revert may be on ${base}`,
|
|
40
|
+
].filter((part) => part !== '');
|
|
41
|
+
if (held.length === 0) {
|
|
42
|
+
return '';
|
|
43
|
+
}
|
|
44
|
+
return ` This resume ran the setup before it checked the base: ${held.join(', ')}, and its checks were not awaited. The run halts, and the next run checks the base again.`;
|
|
27
45
|
}
|