Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): retry failed thread bootstraps with a fresh id #7664

MergedSunkenInTime(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/7664/headmerged by shivamhwp(GitHub profile, opens in a new tab) View on GitHub

Showing 9 changed files with 121 additions and 3 deletions (loading 6).

x
0 of 9 viewed, 9 left
83 additions and 0 deletionsapps/server/src/server.test.tsModified
View file
@@ -7893,6 +7893,89 @@
assertTrue(result._tag === "Failure");
assertTrue(result.failure._tag === "OrchestrationDispatchCommandError");
assert.include(result.failure.message, "worktree exploded");
+ assert.strictEqual(result.failure.bootstrapThreadDisposition, "deleted");
+ assert.deepEqual(
+ dispatchedCommands.map((command) => command.type),
+ ["thread.create", "thread.delete"],
+ );
+ }).pipe(Effect.provide(NodeHttpServer.layerTest)),
+ );
+​
+ it.effect("does not report a deleted bootstrap thread when cleanup fails", () =>
+ Effect.gen(function* () {
+ const dispatchedCommands: Array<OrchestrationCommand> = [];
+ const createWorktree = vi.fn(
+ (_: Parameters<GitVcsDriver.GitVcsDriver["Service"]["createWorktree"]>[0]) =>
+ Effect.die(new Error("worktree exploded")),
+ );
+​
+ yield* buildAppUnderTest({
+ layers: {
+ gitVcsDriver: {
+ createWorktree,
+ },
+ orchestrationEngine: {
+ dispatch: (command) => {
+ dispatchedCommands.push(command);
+ if (command.type === "thread.delete") {
+ return Effect.fail(