Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): limit restart loops within a five-minute window #20306

Mergedspencermorris04(GitHub profile, opens in a new tab)merged 7 commits intomain fromrefs/pull/20306/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 27 additions and 2 deletions.

x
0 of 2 viewed, 2 left
22 additions and 2 deletionsapps/server/src/orchestration-v2/RestartContinuation.test.tsModified
View file
@@ -56,6 +56,8 @@
providerThreadId,
activeAttemptId: attemptId,
status: "running",
+ requestedAt: now,
+ completedAt: null,
},
],
providerThreads: [
@@ -945,6 +947,7 @@
...base.runs[0]!,
status: "cancelled",
+ completedAt: now,
userMessageId: MessageId.make("message:user"),
...extra,
@@ -1142,7 +1145,7 @@
-it.effect("stops continuing after three automatic restart continuations in a row", () =>
+it.effect("stops rapid restart loops but allows repeated restarts after normal work", () =>
Effect.gen(function* () {
const first = RunId.make("run:first-continuation");
const second = RunId.make("run:second-continuation");
@@ -1163,7 +1166,24 @@