Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): storage cleanup reaches archived threads' worktrees #16473

MergedInfo-Cado(GitHub profile, opens in a new tab)merged 3 commits intomain fromrefs/pull/16473/headmerged by juliusmarminge View on GitHub

Showing 4 changed files with 93 additions and 15 deletions (loading 1).

x
0 of 4 viewed, 4 left
11 additions and 5 deletionsapps/server/src/orchestration-v2/ProjectionStore.test.tsModified
View file
@@ -512,7 +512,7 @@
assert.deepEqual(updated?.restartCancelledBackgroundWork, work);
});
​
-const threadWorktreePathsReadActiveThreads = Effect.gen(function* () {
+const threadWorktreePathsIncludeArchivedOnRequest = Effect.gen(function* () {
const store = yield* ProjectionStore.ProjectionStoreV2;
const now = yield* DateTime.now;
const create = (id: string, input: { worktreePath: string | null; archived?: boolean }) => {
@@ -565,6 +565,10 @@
assert.deepEqual(yield* store.getThreadWorktreePaths(), [
{ threadId: ThreadId.make("thread:active"), worktreePath: "/worktrees/active" },
]);
+ assert.deepEqual(yield* store.getThreadWorktreePaths({ includeArchived: true }), [
+ { threadId: ThreadId.make("thread:active"), worktreePath: "/worktrees/active" },
+ { threadId: ThreadId.make("thread:archived"), worktreePath: "/worktrees/archived" },
+ ]);
});
​
const commandReadsSkipSettledLeafNodes = Effect.gen(function* () {
@@ -650,8 +654,10 @@
commandReadsSkipSettledLeafNodes.pipe(Effect.provide(ProjectionStore.layerMemory)),
​
-it.effect("memory worktree path lookup reads only active threads", () =>
- threadWorktreePathsReadActiveThreads.pipe(Effect.provide(ProjectionStore.layerMemory)),
+it.effect(
+ "memory worktree path lookup defaults to active threads and can include archived threads",