Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): keep settled threads asleep after restarts #15604

Mergedmaria-rcksmerged 1 commit intomain fromrefs/pull/15604/headmerged by maria-rcks View on GitHub

Showing 6 changed files with 67 additions and 107 deletions (loading 3).

x
0 of 6 viewed, 6 left
63 additions and 71 deletionsapps/server/src/orchestration-v2/testkit/OrchestratorReplayRestartBackgroundNote.integration.test.tsModified
View file
@@ -11,6 +11,7 @@
makeClaudeRestartReplayHarness,
} from "../Adapters/ClaudeAdapterV2.testkit.ts";
import * as IdAllocator from "../IdAllocator.ts";
+import * as EffectWorker from "../EffectWorker.ts";
import { makeSqlitePersistenceLive } from "../../persistence/Layers/Sqlite.ts";
import { provideDeterministicTestRuntime } from "./DeterministicRuntime.ts";
import { CLAUDE_BACKGROUND_SUBAGENT_AFTER_ROOT_PROMPT } from "./fixtures/claude_background_subagent_after_root/input.ts";
@@ -19,7 +20,11 @@
materializeFixtureInput,
projectionFor,
} from "./fixtures/shared.ts";
-import { runOrchestratorV2ProviderReplayScenario } from "./ProviderReplayHarness.ts";
+import {
+ makeOrchestratorV2ProviderReplayLayer,
+ runOrchestratorV2ProviderReplayScenario,
+} from "./ProviderReplayHarness.ts";
+import { runOrchestratorV2Scenario } from "./OrchestratorScenario.ts";
import { checkpointWorkspace } from "./ReplayFixtureWorkspace.ts";
import { readProviderReplayTranscript } from "./ReplayTranscriptNdjson.ts";
​
@@ -155,21 +160,7 @@
// Phase 1 ends once the root run settles; the subagent is still open.
const firstIdle = materialized.steps.findIndex((step) => step.type === "await_thread_idle");
const phase1Steps = materialized.steps.slice(0, firstIdle + 1);
- const threadId = materialized.projectionThreadIds[0]!;
- const phase2Steps = [
- // Let recovery's continuation (run 2) finish before the next user message.