Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): tell the provider when a restart killed its background work #13895

Mergedjuliusmarmingemerged 8 commits intot3code/codex-turn-mapping fromrefs/pull/13895/headmerged by juliusmarminge View on GitHub

Showing 14 changed files with 214 additions and 0 deletions (loading 13).

x
0 of 14 viewed, 14 left
214 additions and 0 deletionsapps/server/src/orchestration-v2/testkit/OrchestratorReplayRestartBackgroundNote.integration.test.tsAdded
View file
@@ -0,0 +1,214 @@
+import * as NodeServices from "@effect/platform-node/NodeServices";
+import { assert, describe, it } from "@effect/vitest";
+import { ProviderDriverKind, type ProviderReplayEntry } from "@t3tools/contracts";
+import * as Effect from "effect/Effect";
+import * as FileSystem from "effect/FileSystem";
+import * as Layer from "effect/Layer";
+import * as Path from "effect/Path";
+​
+import {
+ ClaudeOrchestratorReplayHarness,
+ makeClaudeRestartReplayHarness,
+} from "../Adapters/ClaudeAdapterV2.testkit.ts";
+import { layer as idAllocatorLayer } from "../IdAllocator.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";
+import {
+ CLAUDE_MODEL_SELECTION,
+ materializeFixtureInput,
+ projectionFor,
+} from "./fixtures/shared.ts";
+import { runOrchestratorV2ProviderReplayScenario } from "./ProviderReplayHarness.ts";
+import { checkpointWorkspace } from "./ReplayFixtureWorkspace.ts";
+import { readProviderReplayTranscript } from "./ReplayTranscriptNdjson.ts";
+​
+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 = [