Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): clean up worktrees shared by subagents #19748

Mergedmaria-rcksmerged 5 commits intomain fromrefs/pull/19748/headmerged by maria-rcks View on GitHub

Showing 2 changed files with 201 additions and 0 deletions (loading 1).

x
0 of 2 viewed, 2 left
201 additions and 0 deletionsapps/server/src/storageCleanup.test.tsModified
View file
@@ -463,6 +463,199 @@
) => effect.pipe(Effect.provide(cleanupTestLayer), Effect.scoped);
​
+describe("subagent worktree ownership", () => {
+ it.effect.each([
+ "idle",
+ "grandchild",
+ "null-branch",
+ "stale-branch",
+ "isolated-owner",
+ "fork-owner",
+ "missing-parent",
+ "cycle",
+ "two-tops",
+ "wrong-root",
+ "running",
+ "pending",
+ "unrelated",
+ "fork",
+ "recent-activity",
+ "recent-inactive",
+ "recent-grace",
+ "recent-settle",
+ "child-settled-now",
+ "child-settled-only",
+ ] as const)("checks the whole owner group (%s)", (scenario) =>
+ Effect.gen(function* () {
+ yield* TestClock.setTime(NOW_MS);
+ const fixture = yield* cleanupFixture();