@tablation/crew 0.151.1 → 0.151.2
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/cli.js +61 -61
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -10324,14 +10324,14 @@ async function replayPendingHandoffs(i) {
|
|
|
10324
10324
|
const t = await i.writer.ticket(rec.ticketRecordId);
|
|
10325
10325
|
const st = i.contract.statuses;
|
|
10326
10326
|
if (!seatId || t.status !== st.building || rec.patch.status !== st.handoff) {
|
|
10327
|
-
i.log.emit(`${t
|
|
10327
|
+
i.log.emit(`${displayKey(t)}: pending hand-off no longer applies (ticket is at ${t.status}) \u2014 dropped`, at);
|
|
10328
10328
|
removePendingHandoff(i.stateDir, rec.ticketRecordId);
|
|
10329
10329
|
continue;
|
|
10330
10330
|
}
|
|
10331
10331
|
const co = i.checkout(t);
|
|
10332
10332
|
const v = co ? inspectHandoff(co.dir, co.cfg, t, rec.role) : null;
|
|
10333
10333
|
if (!v || v.kind === "bounce") {
|
|
10334
|
-
i.log.warn(`${t
|
|
10334
|
+
i.log.warn(`${displayKey(t)}: pending hand-off dropped \u2014 ${v ? v.reason : "this ship has no checkout of the ticket's repo"}`, at);
|
|
10335
10335
|
removePendingHandoff(i.stateDir, rec.ticketRecordId);
|
|
10336
10336
|
continue;
|
|
10337
10337
|
}
|
|
@@ -10349,7 +10349,7 @@ async function replayPendingHandoffs(i) {
|
|
|
10349
10349
|
await i.writer.postEvent(t.id, pushedEventBody(v.sha, v.remote, v.branch), seatId, "pushed");
|
|
10350
10350
|
await i.writer.updateTicket(t.id, rec.patch);
|
|
10351
10351
|
removePendingHandoff(i.stateDir, rec.ticketRecordId);
|
|
10352
|
-
i.log.emit(`${t
|
|
10352
|
+
i.log.emit(`${displayKey(t)}: replayed a pending hand-off at ${v.sha.slice(0, 7)} \u2014 handed on to QA`, at);
|
|
10353
10353
|
landed.push(t.id);
|
|
10354
10354
|
} catch (e) {
|
|
10355
10355
|
const attempts = rec.attempts + 1;
|
|
@@ -10469,9 +10469,9 @@ function holdWarnings(tickets, ships, contract, humanHolds, now = Date.now()) {
|
|
|
10469
10469
|
if (t.assignee_id && humanHolds.has(t.assignee_id)) continue;
|
|
10470
10470
|
const holder = ticketHolderShipId(t, contract);
|
|
10471
10471
|
if (!holder) {
|
|
10472
|
-
out.push(`${t
|
|
10472
|
+
out.push(`${displayKey(t)} (${t.status}) has no ${contract.columns.heldBy} \u2014 any ship may take it`);
|
|
10473
10473
|
} else if (!shipIsAlive(ships.find((s) => s.id === holder), now)) {
|
|
10474
|
-
out.push(`${t
|
|
10474
|
+
out.push(`${displayKey(t)} (${t.status}) is held by ${shipName(ships, holder)}, which has not been seen for ${SHIP_DEAD_AFTER_CYCLES}+ cycles`);
|
|
10475
10475
|
}
|
|
10476
10476
|
}
|
|
10477
10477
|
return out;
|
|
@@ -10794,12 +10794,12 @@ async function enforceHandoff(i) {
|
|
|
10794
10794
|
const log = { ticket: t.issue_id, step: "handoff" };
|
|
10795
10795
|
const claimed = [st.verifying, st.verified, st.deployed].some((s) => s && t.status === s);
|
|
10796
10796
|
if (t.status !== st.handoff && !claimed) {
|
|
10797
|
-
i.log.emit(`${t
|
|
10797
|
+
i.log.emit(`${displayKey(t)} is at ${t.status}, not handed off \u2014 nothing to check`, log);
|
|
10798
10798
|
return { kind: "not-handed-off" };
|
|
10799
10799
|
}
|
|
10800
10800
|
const v = i.origin ? inspectRemoteHandoff(i.origin, i.cfg, t, i.role) : inspectHandoff(i.dir, i.cfg, t, i.role);
|
|
10801
10801
|
if (v.kind === "unverified") {
|
|
10802
|
-
i.log.warn(`${t
|
|
10802
|
+
i.log.warn(`${displayKey(t)} is at ${t.status} but the push was not checked: ${v.why}`, log);
|
|
10803
10803
|
return { kind: "unverified", why: v.why };
|
|
10804
10804
|
}
|
|
10805
10805
|
if (v.kind === "pushed" && !claimed) {
|
|
@@ -10807,7 +10807,7 @@ async function enforceHandoff(i) {
|
|
|
10807
10807
|
if (gap) {
|
|
10808
10808
|
const heldNow = i.hold ? t[i.hold.column] : void 0;
|
|
10809
10809
|
if (i.hold && heldNow && heldNow !== i.hold.shipId || await takenOverSince(i, t.id)) {
|
|
10810
|
-
i.log.warn(`${t
|
|
10810
|
+
i.log.warn(`${displayKey(t)} is held by another ship now \u2014 the acceptance check is stale, left alone`, log);
|
|
10811
10811
|
return { kind: "unverified", why: "ticket is held by another ship" };
|
|
10812
10812
|
}
|
|
10813
10813
|
await i.writer.updateTicket(t.id, {
|
|
@@ -10819,30 +10819,30 @@ async function enforceHandoff(i) {
|
|
|
10819
10819
|
await i.writer.postEvent(t.id, acceptanceBounceComment(gap.missing, i.shipName, gap.judged, gap.all), i.seatId, "bounced").catch(() => {
|
|
10820
10820
|
i.log.warn("bounced, but the note failed to post", log);
|
|
10821
10821
|
});
|
|
10822
|
-
i.log.warn(`${t
|
|
10822
|
+
i.log.warn(`${displayKey(t)} bounced back to ${i.contract.statuses.building}: hand-off comment lacks the acceptance checklist`, log);
|
|
10823
10823
|
return { kind: "bounced" };
|
|
10824
10824
|
}
|
|
10825
10825
|
}
|
|
10826
10826
|
if (v.kind === "pushed") {
|
|
10827
10827
|
await postPushed(i, t.id, v.sha, v.remote, v.branch, log);
|
|
10828
|
-
i.log.emit(`${t
|
|
10828
|
+
i.log.emit(`${displayKey(t)} pushed at ${v.sha.slice(0, 7)} \u2014 handed on to QA`, log);
|
|
10829
10829
|
return { kind: "pushed", sha: v.sha };
|
|
10830
10830
|
}
|
|
10831
10831
|
if (claimed) {
|
|
10832
|
-
i.log.warn(`${t
|
|
10832
|
+
i.log.warn(`${displayKey(t)} is at ${t.status} but its branch is not on the remote at HEAD: ${v.reason}`, log);
|
|
10833
10833
|
return { kind: "failed", why: v.reason };
|
|
10834
10834
|
}
|
|
10835
10835
|
const heldBy = i.hold ? t[i.hold.column] : void 0;
|
|
10836
10836
|
if (i.hold && heldBy && heldBy !== i.hold.shipId) {
|
|
10837
|
-
i.log.warn(`${t
|
|
10837
|
+
i.log.warn(`${displayKey(t)} is held by another ship now \u2014 this run's hand-off check is stale, left alone`, log);
|
|
10838
10838
|
return { kind: "unverified", why: "ticket is held by another ship" };
|
|
10839
10839
|
}
|
|
10840
10840
|
if (await takenOverSince(i, t.id)) {
|
|
10841
|
-
i.log.warn(`${t
|
|
10841
|
+
i.log.warn(`${displayKey(t)} was taken over by another ship during this run \u2014 left alone`, log);
|
|
10842
10842
|
return { kind: "unverified", why: "ticket was taken over during this run" };
|
|
10843
10843
|
}
|
|
10844
10844
|
if (!v.local && !i.origin) {
|
|
10845
|
-
i.log.warn(`${t
|
|
10845
|
+
i.log.warn(`${displayKey(t)} has no local branch on this ship, so it is not this ship's hand-off to bounce: ${v.reason}`, log);
|
|
10846
10846
|
return { kind: "unverified", why: "no local branch on this ship" };
|
|
10847
10847
|
}
|
|
10848
10848
|
let pushError;
|
|
@@ -10859,14 +10859,14 @@ async function enforceHandoff(i) {
|
|
|
10859
10859
|
i.seatId,
|
|
10860
10860
|
"pushed_by_runner"
|
|
10861
10861
|
).catch(() => i.log.warn("pushed, but the note failed to post", log));
|
|
10862
|
-
i.log.emit(`${t
|
|
10862
|
+
i.log.emit(`${displayKey(t)}: pushed ${again.branch} to ${again.remote} on the seat's behalf at ${again.sha.slice(0, 7)} \u2014 handed on to QA`, log);
|
|
10863
10863
|
return { kind: "pushed", sha: again.sha };
|
|
10864
10864
|
}
|
|
10865
10865
|
pushError = `the push succeeded but ${again.kind === "bounce" ? again.reason : again.why}`;
|
|
10866
10866
|
} catch (e) {
|
|
10867
10867
|
pushError = e.message;
|
|
10868
10868
|
}
|
|
10869
|
-
i.log.warn(`${t
|
|
10869
|
+
i.log.warn(`${displayKey(t)}: the runner's own push failed: ${pushError}`, log);
|
|
10870
10870
|
}
|
|
10871
10871
|
await i.writer.updateTicket(t.id, {
|
|
10872
10872
|
status: i.contract.statuses.building,
|
|
@@ -10876,7 +10876,7 @@ async function enforceHandoff(i) {
|
|
|
10876
10876
|
await i.writer.postEvent(t.id, bounceComment(v, i.shipName, pushError), i.seatId, "bounced").catch(() => {
|
|
10877
10877
|
i.log.warn("bounced, but the note failed to post", log);
|
|
10878
10878
|
});
|
|
10879
|
-
i.log.warn(`${t
|
|
10879
|
+
i.log.warn(`${displayKey(t)} bounced back to ${i.contract.statuses.building}: ${v.reason}`, log);
|
|
10880
10880
|
return { kind: "bounced" };
|
|
10881
10881
|
} catch (e) {
|
|
10882
10882
|
const why = describeGuardError(e, i.dir);
|
|
@@ -10907,7 +10907,7 @@ async function guardRunHandoff(route2, ship, tracker, role, workingId, log, sinc
|
|
|
10907
10907
|
checkoutDir = target.dir;
|
|
10908
10908
|
const lost = lostTicketReason(t, tracker.contract, (await tracker.claimAffinity())?.shipId);
|
|
10909
10909
|
if (lost && role !== "qa") {
|
|
10910
|
-
log.warn(`${t
|
|
10910
|
+
log.warn(`${displayKey(t)}: run ended without a push \u2014 ${lost}`, { ticket: t.issue_id, step: "handoff" });
|
|
10911
10911
|
return { kind: "unverified", why: lost };
|
|
10912
10912
|
}
|
|
10913
10913
|
if (role === "qa") {
|
|
@@ -10917,7 +10917,7 @@ async function guardRunHandoff(route2, ship, tracker, role, workingId, log, sinc
|
|
|
10917
10917
|
const affinity = await tracker.claimAffinity();
|
|
10918
10918
|
const origin = ship.runner === "sandbox" ? sandboxOriginFor(route2, target.name) : void 0;
|
|
10919
10919
|
if (ship.runner === "sandbox" && !origin) {
|
|
10920
|
-
log.warn(`${t
|
|
10920
|
+
log.warn(`${displayKey(t)}: the push was not checked: this ship cannot place the remote of ${target.name}`, { ticket: t.issue_id, step: "handoff" });
|
|
10921
10921
|
return null;
|
|
10922
10922
|
}
|
|
10923
10923
|
const outcome = replayed.includes(workingId) ? { kind: "pushed", sha: "" } : await enforceHandoff({
|
|
@@ -10943,7 +10943,7 @@ async function guardRunHandoff(route2, ship, tracker, role, workingId, log, sinc
|
|
|
10943
10943
|
else {
|
|
10944
10944
|
const branch = existingBranchForTicket(target.dir, cfg, t, role);
|
|
10945
10945
|
if (branch && dropEmptyRunBranch(target.dir, cfg, branch)) {
|
|
10946
|
-
log.emit(`${t
|
|
10946
|
+
log.emit(`${displayKey(t)}: dropped ${branch} \u2014 the run made no commits beyond ${cfg.branch.base}`, { ticket: t.issue_id, step: "handoff" });
|
|
10947
10947
|
}
|
|
10948
10948
|
}
|
|
10949
10949
|
if (since2 && !origin) await guardRunStrays(route2, ship, tracker, role, workingId, since2, log);
|
|
@@ -10967,12 +10967,12 @@ async function retireRunWorktree(tracker, dir, cfg, t, role, seatId, shipName2,
|
|
|
10967
10967
|
if (!branch) return;
|
|
10968
10968
|
const o = await finishRunWorktree(dir, cfg, branch);
|
|
10969
10969
|
const at = { ticket: t.issue_id, step: "handoff" };
|
|
10970
|
-
if (o.kind === "removed") log.emit(`${t
|
|
10970
|
+
if (o.kind === "removed") log.emit(`${displayKey(t)}: removed the run's worktree ${o.path} \u2014 the branch is on ${cfg.branch.remote}`, at);
|
|
10971
10971
|
else if (o.kind === "kept-handoff") {
|
|
10972
|
-
log.emit(`${t
|
|
10972
|
+
log.emit(`${displayKey(t)}: kept worktree ${o.path} \u2014 this repo's handoff hook serves from it`, at);
|
|
10973
10973
|
await tracker.postEvent(t.id, `worktree kept on ship ${shipName2} at \`${o.path}\`: the repo's \`handoff\` hook serves from it. QA on another ship cuts its own from \`${cfg.branch.remote}/${branch}\` instead.`, seatId, "worktree_kept");
|
|
10974
|
-
} else if (o.kind === "kept-dirty") log.warn(`${t
|
|
10975
|
-
else if (o.kind === "kept-unpushed") log.warn(`${t
|
|
10974
|
+
} else if (o.kind === "kept-dirty") log.warn(`${displayKey(t)}: left worktree ${o.path} \u2014 it has uncommitted changes`, at);
|
|
10975
|
+
else if (o.kind === "kept-unpushed") log.warn(`${displayKey(t)}: left worktree ${o.path} \u2014 its branch has commits that are not on ${cfg.branch.remote}`, at);
|
|
10976
10976
|
} catch (e) {
|
|
10977
10977
|
log.warn(`could not retire the run's worktree: ${e.message}`, { step: "handoff" });
|
|
10978
10978
|
}
|
|
@@ -11029,21 +11029,21 @@ ${i.shipName ? `${i.shipName}'s ` : "A "}${i.role} run set it to \`${st.handoff}
|
|
|
11029
11029
|
i.seatId,
|
|
11030
11030
|
"bounced"
|
|
11031
11031
|
).catch(() => i.log.warn("bounced, but the note failed to post", at));
|
|
11032
|
-
i.log.warn(`${t
|
|
11032
|
+
i.log.warn(`${displayKey(t)} was handed off by a run that did not claim it, while held by another ship \u2014 bounced to ${st.building}`, at);
|
|
11033
11033
|
continue;
|
|
11034
11034
|
}
|
|
11035
11035
|
const co = i.checkout(t);
|
|
11036
11036
|
if (!co || !existingBranchForTicket(co.dir, co.cfg, t, i.role)) {
|
|
11037
|
-
i.log.warn(`${t
|
|
11037
|
+
i.log.warn(`${displayKey(t)} moved to ${st.handoff} during a run that did not claim it; no local branch to verify, left alone`, at);
|
|
11038
11038
|
continue;
|
|
11039
11039
|
}
|
|
11040
11040
|
const v = inspectHandoff(co.dir, co.cfg, t, i.role);
|
|
11041
|
-
i.log.warn(`${t
|
|
11041
|
+
i.log.warn(`${displayKey(t)} was handed off by a run that did not claim it`, at);
|
|
11042
11042
|
if (v.kind === "pushed") {
|
|
11043
11043
|
await i.writer.postEvent(t.id, pushedEventBody(v.sha, v.remote, v.branch), i.seatId, "pushed");
|
|
11044
11044
|
} else if (v.kind === "bounce") {
|
|
11045
11045
|
if (v.origin && v.local && !isAncestor(co.dir, v.origin, v.local)) {
|
|
11046
|
-
i.log.warn(`${t
|
|
11046
|
+
i.log.warn(`${displayKey(t)}: \`${v.remote}/${v.branch}\` is at ${v.origin.slice(0, 7)}, not a tip this checkout built \u2014 left alone`, at);
|
|
11047
11047
|
continue;
|
|
11048
11048
|
}
|
|
11049
11049
|
await i.writer.updateTicket(t.id, { status: st.building, assignee_id: i.seatId });
|
|
@@ -17930,13 +17930,13 @@ function sweepDiagnostics(tickets, info) {
|
|
|
17930
17930
|
const selfBlocked = [];
|
|
17931
17931
|
for (const t of tickets) {
|
|
17932
17932
|
for (const id of t.blocked_by ?? []) {
|
|
17933
|
-
if (info[id] === void 0) dangling.push(`${t
|
|
17934
|
-
if (id === t.id) selfBlocked.push(t
|
|
17933
|
+
if (info[id] === void 0) dangling.push(`${displayKey(t)} -> ${id}`);
|
|
17934
|
+
if (id === t.id) selfBlocked.push(displayKey(t));
|
|
17935
17935
|
}
|
|
17936
17936
|
}
|
|
17937
17937
|
return { dangling, selfBlocked: [...new Set(selfBlocked)] };
|
|
17938
17938
|
}
|
|
17939
|
-
var describeBlockers = (t, info) => (t.blocked_by ?? []).map((id) => `${info[id]?.issue_id ?? "?"} (${info[id]?.status ?? "unknown"})`).join(", ");
|
|
17939
|
+
var describeBlockers = (t, info) => (t.blocked_by ?? []).map((id) => `${info[id]?.issue_tag ?? info[id]?.issue_id ?? "?"} (${info[id]?.status ?? "unknown"})`).join(", ");
|
|
17940
17940
|
function planSweep(tickets, info, blocked, wm) {
|
|
17941
17941
|
const steps = [];
|
|
17942
17942
|
for (const t of withinWorkMode(tickets, wm)) {
|
|
@@ -18858,7 +18858,7 @@ function stalledComment(s, ships, now = Date.now()) {
|
|
|
18858
18858
|
const who2 = s.holderShipId ? `Held by ${shipName(ships, s.holderShipId)}, which is not engaged on it. That ship has an attention item open; the ticket is otherwise left as it is, and resumes the moment the ship picks it back up.` : `No ship holds it and none is engaged on it. It is waiting for the next ship that polls its lane; its status and assignee are left as they are.`;
|
|
18859
18859
|
return `${STALLED_MARKER}
|
|
18860
18860
|
|
|
18861
|
-
**Stalled \u2014 no activity on \`${s.ticket
|
|
18861
|
+
**Stalled \u2014 no activity on \`${displayKey(s.ticket)}\` for ${mins} minutes (\`${s.ticket.status}\`).**
|
|
18862
18862
|
|
|
18863
18863
|
${who2}`;
|
|
18864
18864
|
}
|
|
@@ -18870,7 +18870,7 @@ async function applyStalled(writer, stalled, ships, memberId, myShipId, log, dry
|
|
|
18870
18870
|
r.attention.push({
|
|
18871
18871
|
kind: "stalled",
|
|
18872
18872
|
key: stalledKey(s.ticket.issue_id),
|
|
18873
|
-
message: `${s.ticket
|
|
18873
|
+
message: `${displayKey(s.ticket)} is held by this ship but has been quiet for ${Math.round((now - s.lastActivityAt) / 6e4)} minutes with nothing engaged on it`,
|
|
18874
18874
|
since: new Date(s.lastActivityAt + STALLED_AFTER_MS).toISOString()
|
|
18875
18875
|
});
|
|
18876
18876
|
}
|
|
@@ -19330,9 +19330,9 @@ async function claimStillHeld(tracker, t, buildingStatus, affinity) {
|
|
|
19330
19330
|
}
|
|
19331
19331
|
const holder = affinity ? now[affinity.column] : null;
|
|
19332
19332
|
if (affinity && typeof holder === "string" && holder && holder !== affinity.shipId) {
|
|
19333
|
-
return `${t
|
|
19333
|
+
return `${displayKey(t)} is held by another ship now`;
|
|
19334
19334
|
}
|
|
19335
|
-
if (now.status !== buildingStatus) return `${t
|
|
19335
|
+
if (now.status !== buildingStatus) return `${displayKey(t)} is at ${now.status}, not ${buildingStatus}`;
|
|
19336
19336
|
return null;
|
|
19337
19337
|
}
|
|
19338
19338
|
|
|
@@ -19559,7 +19559,7 @@ async function applyConflictBounce(writer, b, contract, memberId, log, dryRun) {
|
|
|
19559
19559
|
const t = { ticket: b.ticket.issue_id, step: "merge" };
|
|
19560
19560
|
const absorbed = b.priorBounces > 0 && b.priorBounces < MAX_ABSORBED_HANDBACKS && !!b.priorBaseSha && isAncestor(b.worktree ?? b.cwd, b.priorBaseSha, b.branch);
|
|
19561
19561
|
if (absorbed) {
|
|
19562
|
-
log.emit(`${b.ticket
|
|
19562
|
+
log.emit(`${displayKey(b.ticket)} conflicts again, but ${b.base} moved since the hand-back was answered \u2014 handing back again`, t);
|
|
19563
19563
|
}
|
|
19564
19564
|
if (b.priorBounces > 0 && !absorbed) {
|
|
19565
19565
|
if (dryRun) {
|
|
@@ -19575,7 +19575,7 @@ async function applyConflictBounce(writer, b, contract, memberId, log, dryRun) {
|
|
|
19575
19575
|
return { kind: "escalated" };
|
|
19576
19576
|
} catch (e) {
|
|
19577
19577
|
if (e instanceof StaleWriteError7) {
|
|
19578
|
-
log.emit(`${b.ticket
|
|
19578
|
+
log.emit(`${displayKey(b.ticket)} changed on the board since this run read it \u2014 not escalating over it`, t);
|
|
19579
19579
|
return { kind: "stale" };
|
|
19580
19580
|
}
|
|
19581
19581
|
return { kind: "failed", why: e.message };
|
|
@@ -19596,7 +19596,7 @@ async function applyConflictBounce(writer, b, contract, memberId, log, dryRun) {
|
|
|
19596
19596
|
return { kind: "refreshed" };
|
|
19597
19597
|
}
|
|
19598
19598
|
if (r.behind) {
|
|
19599
|
-
log.warn(`not handing ${b.ticket
|
|
19599
|
+
log.warn(`not handing ${displayKey(b.ticket)} back: ${r.why}`, t);
|
|
19600
19600
|
return { kind: "failed", why: r.why ?? "branch behind its remote" };
|
|
19601
19601
|
}
|
|
19602
19602
|
merged = r.paths.length > 0;
|
|
@@ -19625,7 +19625,7 @@ async function applyConflictBounce(writer, b, contract, memberId, log, dryRun) {
|
|
|
19625
19625
|
return { kind: "handed-back" };
|
|
19626
19626
|
} catch (e) {
|
|
19627
19627
|
if (e instanceof StaleWriteError7) {
|
|
19628
|
-
log.emit(`${b.ticket
|
|
19628
|
+
log.emit(`${displayKey(b.ticket)} changed on the board since this run read it \u2014 not handing it back over it`, t);
|
|
19629
19629
|
return { kind: "stale" };
|
|
19630
19630
|
}
|
|
19631
19631
|
return { kind: "failed", why: e.message };
|
|
@@ -19750,7 +19750,7 @@ async function applyBuildFailureBounce(writer, b, contract, memberId, log, dryRu
|
|
|
19750
19750
|
}
|
|
19751
19751
|
}
|
|
19752
19752
|
if (dryRun) {
|
|
19753
|
-
log.emit(`would hand ${b.ticket
|
|
19753
|
+
log.emit(`would hand ${displayKey(b.ticket)} back to ${contract.statuses.building} \u2014 its branch breaks the ${b.hook} hook`, t);
|
|
19754
19754
|
return { kind: "handed-back" };
|
|
19755
19755
|
}
|
|
19756
19756
|
try {
|
|
@@ -19773,7 +19773,7 @@ async function applyBuildFailureBounce(writer, b, contract, memberId, log, dryRu
|
|
|
19773
19773
|
return { kind: "handed-back" };
|
|
19774
19774
|
} catch (e) {
|
|
19775
19775
|
if (e instanceof StaleWriteError8) {
|
|
19776
|
-
log.emit(`${b.ticket
|
|
19776
|
+
log.emit(`${displayKey(b.ticket)} changed on the board since this run read it \u2014 not handing it back over it`, t);
|
|
19777
19777
|
return { kind: "stale" };
|
|
19778
19778
|
}
|
|
19779
19779
|
return { kind: "failed", why: e.message };
|
|
@@ -21129,7 +21129,7 @@ Closes ${c.ticket.issue_id}.${trailer}`]);
|
|
|
21129
21129
|
void o.attention.raise({
|
|
21130
21130
|
kind: "release_merge_failed",
|
|
21131
21131
|
key: `release_merge_failed:${o.scope ?? "release"}`,
|
|
21132
|
-
message: `${o.scope ?? "release"}: could not merge ${c.branch} (${c.ticket
|
|
21132
|
+
message: `${o.scope ?? "release"}: could not merge ${c.branch} (${displayKey(c.ticket)}) \u2014 not a conflict, so the ticket stays verified and is retried: ${message.slice(0, 400)}`,
|
|
21133
21133
|
since: (/* @__PURE__ */ new Date()).toISOString()
|
|
21134
21134
|
});
|
|
21135
21135
|
}
|
|
@@ -21347,8 +21347,8 @@ async function runReleaseCycle(o, movedPast2, localRefSkips) {
|
|
|
21347
21347
|
materializeBranchForTicket(o.cwd, o.repo, t, void 0, (problem) => {
|
|
21348
21348
|
skipped.add(t.id);
|
|
21349
21349
|
localRefSkips.push({ ticket: t, problem });
|
|
21350
|
-
o.emit.error(`not releasing ${t
|
|
21351
|
-
}, (note) => o.emit.emit(`${t
|
|
21350
|
+
o.emit.error(`not releasing ${displayKey(t)} this cycle: ${problem}`, { ticket: t.issue_id });
|
|
21351
|
+
}, (note) => o.emit.emit(`${displayKey(t)}: ${note}`, { ticket: t.issue_id }));
|
|
21352
21352
|
}
|
|
21353
21353
|
if (skipped.size) releasable = o.tickets.filter((t) => !skipped.has(t.id));
|
|
21354
21354
|
}
|
|
@@ -21364,7 +21364,7 @@ async function runReleaseCycle(o, movedPast2, localRefSkips) {
|
|
|
21364
21364
|
const remoteTip2 = branch ? gitOk(o.cwd, ["rev-parse", "-q", "--verify", `refs/remotes/${o.repo.branch.remote}/${branch}^{commit}`]) : null;
|
|
21365
21365
|
if (remoteTip2 && remoteTip2 !== moved.tip) {
|
|
21366
21366
|
o.emit.error(
|
|
21367
|
-
`not releasing ${t
|
|
21367
|
+
`not releasing ${displayKey(t)}: local ${branch} at ${moved.tip.slice(0, 8)} is not on ${o.repo.branch.remote}/${branch} (${remoteTip2.slice(0, 8)}); not requeuing it`,
|
|
21368
21368
|
{ ticket: t.issue_id }
|
|
21369
21369
|
);
|
|
21370
21370
|
localRefSkips.push({
|
|
@@ -21375,7 +21375,7 @@ async function runReleaseCycle(o, movedPast2, localRefSkips) {
|
|
|
21375
21375
|
}
|
|
21376
21376
|
movedPast2.push({ ticket: t, verified: moved.verified, head: moved.tip, branch: pushedBranchForTicket(o.repo, t) });
|
|
21377
21377
|
o.emit.error(
|
|
21378
|
-
`not releasing ${t
|
|
21378
|
+
`not releasing ${displayKey(t)}: ${branch} is at ${moved.tip.slice(0, 8)}, past the ${moved.verified.slice(0, 8)} QA verified`,
|
|
21379
21379
|
{ ticket: t.issue_id }
|
|
21380
21380
|
);
|
|
21381
21381
|
}
|
|
@@ -24046,7 +24046,7 @@ async function runRoleAgentLocked(role, decision, ctx, hooks, held) {
|
|
|
24046
24046
|
}
|
|
24047
24047
|
} catch (e) {
|
|
24048
24048
|
emit.error(
|
|
24049
|
-
`could not check out ${target?.name ?? "(unknown repo)"} for ${result.ticket
|
|
24049
|
+
`could not check out ${target?.name ?? "(unknown repo)"} for ${displayKey(result.ticket)}: ${e.message}`
|
|
24050
24050
|
);
|
|
24051
24051
|
return;
|
|
24052
24052
|
}
|
|
@@ -26967,7 +26967,7 @@ async function applyWorktreeSweep(cwd, actions, dryRun, log, remote = "origin",
|
|
|
26967
26967
|
const when = held ? noteHeldWorktree(held.state, { repo: held.repo, path: a.path, ticket: a.ticket.issue_id, status: a.ticket.status, reason }) : "first";
|
|
26968
26968
|
if (when) {
|
|
26969
26969
|
log.warn(
|
|
26970
|
-
`not removing worktree ${a.path} for ${a.ticket
|
|
26970
|
+
`not removing worktree ${a.path} for ${displayKey(a.ticket)} (${a.ticket.status}): ${detail}`,
|
|
26971
26971
|
{ ticket: a.ticket.issue_id, step: "worktree" }
|
|
26972
26972
|
);
|
|
26973
26973
|
}
|
|
@@ -26978,7 +26978,7 @@ async function applyWorktreeSweep(cwd, actions, dryRun, log, remote = "origin",
|
|
|
26978
26978
|
if (!dryRun && base && !a.keepBranch && existsSync54(a.path) && isHandBackMerge(a.path, base)) {
|
|
26979
26979
|
if (gitOk(a.path, ["merge", "--abort"]) !== null) {
|
|
26980
26980
|
log.emit(
|
|
26981
|
-
`abandoned the hand-back merge of ${base} in ${a.path}: ${a.ticket
|
|
26981
|
+
`abandoned the hand-back merge of ${base} in ${a.path}: ${displayKey(a.ticket)} deployed without it`,
|
|
26982
26982
|
{ ticket: a.ticket.issue_id, step: "worktree" }
|
|
26983
26983
|
);
|
|
26984
26984
|
}
|
|
@@ -26988,7 +26988,7 @@ async function applyWorktreeSweep(cwd, actions, dryRun, log, remote = "origin",
|
|
|
26988
26988
|
const liveRun = !!held && liveRuns(held.state.dir).some((r) => (r.ticket ?? "").replace(/^\D+/, "") === String(n));
|
|
26989
26989
|
const defer = () => {
|
|
26990
26990
|
log.emit(
|
|
26991
|
-
`leaving ${a.path} for the next cycle: ${liveRun ? `${a.ticket
|
|
26991
|
+
`leaving ${a.path} for the next cycle: ${liveRun ? `${displayKey(a.ticket)} has a run in progress on this ship` : `processes are still inside it (${pids.join(" ")})`}`,
|
|
26992
26992
|
{ ticket: a.ticket.issue_id, step: "worktree" }
|
|
26993
26993
|
);
|
|
26994
26994
|
};
|
|
@@ -27030,7 +27030,7 @@ async function applyWorktreeSweep(cwd, actions, dryRun, log, remote = "origin",
|
|
|
27030
27030
|
if (a.keepBranch) keptBranches++;
|
|
27031
27031
|
if (dryRun) {
|
|
27032
27032
|
log.emit(
|
|
27033
|
-
`would remove worktree ${a.path} for ${a.ticket
|
|
27033
|
+
`would remove worktree ${a.path} for ${displayKey(a.ticket)} (${a.ticket.status}); ${branchNote}`,
|
|
27034
27034
|
{ ticket: a.ticket.issue_id, step: "worktree" }
|
|
27035
27035
|
);
|
|
27036
27036
|
continue;
|
|
@@ -27053,7 +27053,7 @@ async function applyWorktreeSweep(cwd, actions, dryRun, log, remote = "origin",
|
|
|
27053
27053
|
}
|
|
27054
27054
|
}
|
|
27055
27055
|
log.emit(
|
|
27056
|
-
`removed worktree for ${a.ticket
|
|
27056
|
+
`removed worktree for ${displayKey(a.ticket)} (${a.ticket.status}); ${branchNote}`,
|
|
27057
27057
|
{ ticket: a.ticket.issue_id, step: "worktree" }
|
|
27058
27058
|
);
|
|
27059
27059
|
removed++;
|
|
@@ -27296,7 +27296,7 @@ import { dirname as dirOf2, resolve as resolvePath } from "path";
|
|
|
27296
27296
|
import { existsSync as existsSync56, readdirSync as readdirSync18, statSync as statSync17 } from "fs";
|
|
27297
27297
|
import { join as join58 } from "path";
|
|
27298
27298
|
function builtVersion() {
|
|
27299
|
-
return true ? "0.151.
|
|
27299
|
+
return true ? "0.151.2" : null;
|
|
27300
27300
|
}
|
|
27301
27301
|
var REBUILD_HINT = "rebuild with npm run build";
|
|
27302
27302
|
function newestMtime(path) {
|
|
@@ -31258,7 +31258,7 @@ ${changed2.map((c) => ` - ${c}
|
|
|
31258
31258
|
{ count: priorBuildFailures(cu.ticket, prior), operatorId: c.resolved?.operator, previousNote: priorFailureNote(cu.ticket, prior) }
|
|
31259
31259
|
);
|
|
31260
31260
|
if (r.kind === "failed") {
|
|
31261
|
-
remit.warn(`could not hand back ${cu.ticket
|
|
31261
|
+
remit.warn(`could not hand back ${displayKey(cu.ticket)}: ${r.why}`, { step: "release" });
|
|
31262
31262
|
}
|
|
31263
31263
|
if (r.kind === "escalated" && !dryRun) {
|
|
31264
31264
|
const key = cu.ticket.issue_tag ?? cu.ticket.issue_id;
|
|
@@ -31275,7 +31275,7 @@ ${cu.tail.trimEnd()}
|
|
|
31275
31275
|
});
|
|
31276
31276
|
}
|
|
31277
31277
|
} catch (e) {
|
|
31278
|
-
remit.warn(`could not hand back ${cu.ticket
|
|
31278
|
+
remit.warn(`could not hand back ${displayKey(cu.ticket)}: ${e.message}`, { step: "release" });
|
|
31279
31279
|
}
|
|
31280
31280
|
}
|
|
31281
31281
|
}
|
|
@@ -31313,11 +31313,11 @@ ${f.tail.trimEnd()}
|
|
|
31313
31313
|
);
|
|
31314
31314
|
const r = await applyConflictBounce(tracker, bounce, tracker.contract, seat, remit, dryRun);
|
|
31315
31315
|
if (r.kind === "failed") {
|
|
31316
|
-
remit.warn(`could not hand back ${f.candidate.ticket
|
|
31316
|
+
remit.warn(`could not hand back ${displayKey(f.candidate.ticket)}: ${r.why}`, { step: "merge" });
|
|
31317
31317
|
}
|
|
31318
31318
|
} catch (e) {
|
|
31319
31319
|
remit.warn(
|
|
31320
|
-
`could not hand back ${f.candidate.ticket
|
|
31320
|
+
`could not hand back ${displayKey(f.candidate.ticket)}: ${e.message}`,
|
|
31321
31321
|
{ step: "merge" }
|
|
31322
31322
|
);
|
|
31323
31323
|
}
|
|
@@ -31335,10 +31335,10 @@ ${f.tail.trimEnd()}
|
|
|
31335
31335
|
dryRun
|
|
31336
31336
|
);
|
|
31337
31337
|
if (r.kind === "failed") {
|
|
31338
|
-
remit.warn(`could not flag ${cand.ticket
|
|
31338
|
+
remit.warn(`could not flag ${displayKey(cand.ticket)}: ${r.why}`, { step: "merge" });
|
|
31339
31339
|
}
|
|
31340
31340
|
} catch (e) {
|
|
31341
|
-
remit.warn(`could not flag ${cand.ticket
|
|
31341
|
+
remit.warn(`could not flag ${displayKey(cand.ticket)}: ${e.message}`, { step: "merge" });
|
|
31342
31342
|
}
|
|
31343
31343
|
}
|
|
31344
31344
|
}
|
|
@@ -31576,7 +31576,7 @@ ${f.tail.trimEnd()}
|
|
|
31576
31576
|
wemit.note(`cloned ${target.name} into ${target.dir}`, { step: "select", role: w.role });
|
|
31577
31577
|
}
|
|
31578
31578
|
} catch (e) {
|
|
31579
|
-
wemit.error(`could not check out ${target?.name ?? "(unknown repo)"} for ${result.ticket
|
|
31579
|
+
wemit.error(`could not check out ${target?.name ?? "(unknown repo)"} for ${displayKey(result.ticket)}: ${e.message}`);
|
|
31580
31580
|
if (!skipInlineRelease) await releaseFleet();
|
|
31581
31581
|
break;
|
|
31582
31582
|
}
|
|
@@ -31798,7 +31798,7 @@ ${f.tail.trimEnd()}
|
|
|
31798
31798
|
emit.note(`cloned ${target.name} into ${target.dir}`, { step: "select", role: current });
|
|
31799
31799
|
}
|
|
31800
31800
|
} catch (e) {
|
|
31801
|
-
emit.error(`could not check out ${target?.name ?? "(unknown repo)"} for ${result.ticket
|
|
31801
|
+
emit.error(`could not check out ${target?.name ?? "(unknown repo)"} for ${displayKey(result.ticket)}: ${e.message}`);
|
|
31802
31802
|
dropLock();
|
|
31803
31803
|
if (explicitRole) {
|
|
31804
31804
|
current = void 0;
|
package/package.json
CHANGED