Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): forks no longer inherit pull request watches #16623

Mergedjakeleventhal(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/16623/headmerged by juliusmarminge View on GitHub

Showing 3 changed files with 144 additions and 0 deletions (loading 2).

x
0 of 3 viewed, 3 left
144 additions and 0 deletionsapps/server/src/orchestration-v2/ThreadFork.execution.test.tsModified
View file
@@ -16,6 +16,7 @@
} from "@t3tools/contracts";
import * as DateTime from "effect/DateTime";
import * as Effect from "effect/Effect";
+import * as TestClock from "effect/testing/TestClock";
​
import { CodexProviderCapabilitiesV2 } from "./Adapters/CodexAdapterV2.ts";
import { ClaudeProviderCapabilitiesV2 } from "./Adapters/ClaudeAdapterV2.ts";
@@ -54,6 +55,149 @@
}));
});
​
+it.effect("a persisted fork leaves PR watching with its parent until explicitly opted in", () =>
+ Effect.gen(function* () {
+ const orchestrator = yield* Orchestrator.OrchestratorV2;
+ const eventSink = yield* EventSink.EventSinkV2;
+ const now = yield* DateTime.now;
+ const { instanceId, modelSelection } = forkCases[0]!;
+ const sourceThreadId = ThreadId.make("fork-watch-source");
+ const targetThreadId = ThreadId.make("fork-watch-target");
+ const sourceRunId = RunId.make("fork-watch-source-run");
+ const key = { host: "github.com", repository: "example/repo", number: 1 };
+ const link = { url: "https://github.com/example/repo/pull/1", source: "agent" as const };
+​
+ yield* orchestrator.dispatch({
+ type: "thread.create",
+ commandId: CommandId.make("fork-watch-create"),
+ threadId: sourceThreadId,
+ projectId: ProjectId.make("fork-watch-project"),