Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): clean up child worktrees after their parent settles #30026

Mergedvoltcrash(GitHub profile, opens in a new tab)merged 2 commits intomain fromrefs/pull/30026/headmerged by maria-rcks View on GitHub

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

x
0 of 2 viewed, 2 left
156 additions and 0 deletionsapps/server/src/storageCleanup.test.tsModified
View file
@@ -778,6 +778,162 @@
​
describe("subagent worktree ownership", () => {
+ it.effect.each([
+ "child",
+ "grandchild",
+ "immediate",
+ "active-parent",
+ "recent-settle",
+ "settle-grace",
+ "recent-child-activity",
+ "running-child",
+ "pending-child",
+ "running-parent",
+ "pending-parent",
+ "unsettled-child",
+ "pinned-child",
+ "fork",
+ "missing-parent",
+ "cycle",
+ ] as const)("checks isolated subagent settlement (%s)", (scenario) =>
+ Effect.gen(function* () {
+ yield* TestClock.setTime(NOW_MS);
+ const fixture = yield* cleanupFixture({
+ ...DEFAULT_SERVER_SETTINGS.storageCleanup,
+ worktreeSettledAfterDays: scenario === "immediate" ? 0 : 8,
+ });
+ const root = shell({
+ settledAt: