Skip to content
Source
Sign inSign up
pingdotgg/t3code

test(server): a fork that stops its own PR watch keeps it as its ended watch #21309

Mergedjuliusmarmingemerged 1 commit intomain fromrefs/pull/21309/headmerged by juliusmarminge View on GitHub

Showing 1 changed file with 6 additions and 1 deletion.

x
0 of 1 viewed, 1 left
6 additions and 1 deletionapps/server/src/orchestration-v2/ThreadFork.execution.test.tsModified
View file
@@ -192,7 +192,12 @@
watching: false,
});
const stoppedFork = yield* orchestrator.getThreadShell(targetThreadId);
- assert.deepEqual(stoppedFork?.pullRequests, fork.pullRequests);
+ const [forkLink] = fork.pullRequests ?? [];
+ assert.isDefined(forkLink);
+ // The fork remembers its own watch, never the parent's, so watching again resumes from it.
+ assert.deepEqual(stoppedFork?.pullRequests, [
+ { ...forkLink, endedWatch: watchingFork.pullRequests[0].watch },
+ ]);
assert.deepEqual(stoppedFork?.pendingBackgroundTasks, []);
assert.deepEqual(yield* orchestrator.getThreadShell(sourceThreadId), parentBefore);
}).pipe(Effect.provide(forkCases[0]!.layer)),