Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): worktree cleanup no longer runs sweeps back to back #19418

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 3 commits intomain fromrefs/pull/19418/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 5 changed files with 103 additions and 0 deletions (loading 2).

x
0 of 5 viewed, 5 left
63 additions and 0 deletionsapps/server/src/orchestration-v2/ProjectionStore.test.tsModified
View file
@@ -327,6 +327,65 @@
assert.deepEqual(updated?.restartCancelledBackgroundWork, work);
});
​
+const threadWorktreePathsReadActiveThreads = Effect.gen(function* () {
+ const store = yield* ProjectionStore.ProjectionStoreV2;
+ const now = yield* DateTime.now;
+ const create = (id: string, input: { worktreePath: string | null; archived?: boolean }) => {
+ const threadId = ThreadId.make(id);
+ const thread = {
+ createdBy: "user" as const,
+ creationSource: "web" as const,
+ id: threadId,
+ projectId: ProjectId.make("project:worktree-paths"),
+ title: id,
+ providerInstanceId,
+ modelSelection,
+ runtimeMode: "full-access" as const,
+ interactionMode: "default" as const,
+ branch: input.worktreePath === null ? null : id,
+ worktreePath: input.worktreePath,
+ activeProviderThreadId: null,
+ lineage: { parentThreadId: null, relationshipToParent: null, rootThreadId: threadId },
+ forkedFrom: null,
+ createdAt: now,
+ updatedAt: now,
+ archivedAt: input.archived === true ? now : null,
+ settledOverride: null,
+ settledAt: null,
+ lastVisitedAt: null,