Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): restarts continue every Codex thread, not just the first #15820

ClosedMnigos(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/15820/headopened View on GitHub

Showing 2 changed files with 73 additions and 13 deletions.

x
0 of 2 viewed, 2 left
53 additions and 11 deletionsapps/server/src/orchestration-v2/ProviderRuntimeRecoveryPerformance.test.tsModified
View file
@@ -69,6 +69,11 @@
interface Scenario {
readonly settled: number;
readonly active: number;
+ /**
+ * Bind every active thread, plus an older idle thread, to one session the
+ * way Codex shares a session per provider instance.
+ */
+ readonly sharedSessionStatus?: "ready" | "stopped";
​
interface Seeded {
@@ -203,16 +208,8 @@
return false;
});
​
- const activeThread = Effect.fn(function* (index: number) {
- const threadId = ThreadId.make(`thread:bench:active:${index}`);
- const providerSessionId = ProviderSessionId.make(`session:bench:${index}`);
- const providerThreadId = ProviderThreadId.make(`provider-thread:bench:${index}`);
- const runId = RunId.make(`run:${threadId}:1`);
- const attemptId = RunAttemptId.make(`attempt:bench:${index}`);
- const nodeId = NodeId.make(`node:bench:${index}`);
- const providerTurnId = ProviderTurnId.make(`provider-turn:bench:${index}`);
- yield* thread(threadId, { activeProviderThreadId: providerThreadId });
- yield* apply({
+ const attachSession = (threadId: ThreadId, providerSessionId: ProviderSessionId) =>
+ apply({
type: "provider-session.attached",