patchrelay 0.8.6 → 0.8.7
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/build-info.json
CHANGED
|
@@ -552,10 +552,27 @@ export class ServiceStageFinalizer {
|
|
|
552
552
|
}
|
|
553
553
|
async restartInterruptedRun(snapshot) {
|
|
554
554
|
const liveCodex = snapshot.input.live?.codex;
|
|
555
|
+
const liveLinear = snapshot.input.live?.linear;
|
|
555
556
|
const latestTurn = liveCodex?.status === "found" ? liveCodex.thread?.turns.at(-1) : undefined;
|
|
556
557
|
if (latestTurn?.status !== "interrupted") {
|
|
557
558
|
return false;
|
|
558
559
|
}
|
|
560
|
+
if (liveLinear?.status === "known") {
|
|
561
|
+
const authoritativeStopState = resolveAuthoritativeLinearStopState({
|
|
562
|
+
...(liveLinear.issue?.stateName ? { stateName: liveLinear.issue.stateName } : {}),
|
|
563
|
+
workflowStates: liveLinear.issue?.stateName
|
|
564
|
+
? [
|
|
565
|
+
{
|
|
566
|
+
name: liveLinear.issue.stateName,
|
|
567
|
+
...(liveLinear.issue.stateType ? { type: liveLinear.issue.stateType } : {}),
|
|
568
|
+
},
|
|
569
|
+
]
|
|
570
|
+
: [],
|
|
571
|
+
});
|
|
572
|
+
if (authoritativeStopState) {
|
|
573
|
+
return false;
|
|
574
|
+
}
|
|
575
|
+
}
|
|
559
576
|
if (snapshot.runLease.turnId && latestTurn.id !== snapshot.runLease.turnId) {
|
|
560
577
|
return true;
|
|
561
578
|
}
|