Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): storage cleanup removes idle worktrees whose branch was renamed or switched #34984

Mergedahatzz11(GitHub profile, opens in a new tab)merged 5 commits intomain fromrefs/pull/34984/headmerged by juliusmarminge View on GitHub

Showing 3 changed files with 94 additions and 4 deletions.

x
0 of 3 viewed, 3 left
2 additions and 2 deletionsapps/server/src/orchestration-v2/WorktreeBranchSync.tsModified
View file
@@ -11,7 +11,7 @@
import * as ProjectionStore from "./ProjectionStore.ts";
import * as ThreadManagement from "./ThreadManagementService.ts";
​
-const make = Effect.gen(function* () {
+export const makeReconcile = Effect.gen(function* () {
const threads = yield* ThreadManagement.ThreadManagementService;
const git = yield* GitWorkflowService.GitWorkflowService;
const projections = yield* ProjectionStore.ProjectionStoreV2;
@@ -70,7 +70,7 @@
export const layer = Layer.effectDiscard(
Effect.gen(function* () {
const broadcaster = yield* VcsStatusBroadcaster.VcsStatusBroadcaster;
- const reconcile = yield* make;
+ const reconcile = yield* makeReconcile;
yield* forkParked(
Stream.runForEach(broadcaster.streamBranchChanges, (input) =>
reconcile(input).pipe(
69 additions and 1 deletionapps/server/src/storageCleanup.test.tsModified
View file
@@ -26,11 +26,13 @@
import * as StorageCleanup from "./storageCleanup.ts";
import * as GitVcsDriver from "./vcs/GitVcsDriver.ts";
import * as GitManager from "./git/GitManager.ts";
+import * as GitWorkflowService from "./git/GitWorkflowService.ts";
import * as Settings from "./serverSettings.ts";
import * as ProjectionStore from "./orchestration-v2/ProjectionStore.ts";