Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): settle cancelled worktree setup before rollback #12176

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

Showing 2 changed files with 39 additions and 3 deletions.

x
0 of 2 viewed, 2 left
36 additions and 3 deletionsapps/server/src/server.test.tsModified
View file
@@ -11614,9 +11614,22 @@
it.effect.each([
- { caseName: "async setup scripts let the turn start before the script exits", async: true },
- { caseName: "sync setup scripts hold the turn until the script exits", async: false },
- ])("$caseName", ({ async }) =>
+ caseName: "async setup scripts let the turn start before the script exits",
+ async: true,
+ cancel: false,
+ },
+ caseName: "sync setup scripts hold the turn until the script exits",
+ async: false,
+ cancel: false,
+ },
+ caseName: "cancelling worktree setup publishes its outcome and cleans up the thread",
+ async: false,
+ cancel: true,
+ },
+ ])("$caseName", ({ async, cancel }) =>
Effect.gen(function* () {
const dispatchedCommands: Array<OrchestrationCommand> = [];
const scriptExit = yield* Deferred.make<void>();
@@ -11750,6 +11763,26 @@
assert.equal(stageStatus(running, "agent"), "pending");
assert.isFalse(turnStarted());