Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): threads waiting on background work wake after a restart #15438

ClosedSunkenInTime(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/15438/headopened View on GitHub

Showing 8 changed files with 45 additions and 74 deletions (loading 5).

x
0 of 8 viewed, 8 left
35 additions and 66 deletionsapps/server/src/orchestration-v2/testkit/OrchestratorReplayRestartBackgroundNote.integration.test.tsModified
View file
@@ -26,7 +26,6 @@
const SCENARIO = "claude_background_subagent_after_root";
const SESSION_ID = "cca274e4-25ae-4171-b972-bbb31118517e";
const FIRST_AFTER_RESTART = "Is the background subagent done yet?";
-const SECOND_AFTER_RESTART = "Thanks. Anything else?";
const NOTE = [
"Note: the T3 server restarted, and this background work was cancelled before it finished. It will not report back:",
"- subagent: Background subagent test",
@@ -158,16 +157,12 @@
const threadId = materialized.projectionThreadIds[0]!;
const phase2Steps = [
// Let recovery's continuation (run 2) finish before the next user message.
- ...(input.continueThreadsAfterServerUpdate
- ? [
- {
- type: "await_run_status" as const,
- threadId,
- runId: (yield* IdAllocator.IdAllocatorV2).derive.run({ threadId, ordinal: 2 }),
- status: "completed" as const,
- },
- ]
- : []),
+ {
+ type: "await_run_status" as const,
+ threadId,
+ runId: (yield* IdAllocator.IdAllocatorV2).derive.run({ threadId, ordinal: 2 }),
+ status: "completed" as const,
+ },
...materialized.steps.slice(firstIdle + 1),