note: You are running `vp test` as a Vite+ built-in command. If you meant to run the test npm script, use `vpr test` instead. RUN v5.0.1 /home/ubuntu/wt/worktree-git-11/apps/server ✓ src/storageCleanup.test.ts > V2 storage cleanup eligibility > allows an idle worktree and rejects the project checkout 2ms ✓ src/storageCleanup.test.ts > V2 storage cleanup eligibility > retains a worktree while its thread is running 0ms ✓ src/storageCleanup.test.ts > V2 storage cleanup eligibility > retains a worktree while its thread is starting 0ms ✓ src/storageCleanup.test.ts > V2 storage cleanup eligibility > retains a worktree while its thread is preparing 0ms ✓ src/storageCleanup.test.ts > V2 storage cleanup eligibility > retains a worktree while its thread is waiting 0ms ✓ src/storageCleanup.test.ts > V2 storage cleanup eligibility > retains a worktree while its thread is queued 0ms ✓ src/storageCleanup.test.ts > V2 storage cleanup eligibility > allows cleanup once its thread is idle 0ms ✓ src/storageCleanup.test.ts > V2 storage cleanup eligibility > allows cleanup once its thread is completed 0ms ✓ src/storageCleanup.test.ts > V2 storage cleanup eligibility > allows cleanup once its thread is interrupted 0ms ✓ src/storageCleanup.test.ts > V2 storage cleanup eligibility > allows cleanup once its thread is failed 0ms ✓ src/storageCleanup.test.ts > V2 storage cleanup eligibility > allows cleanup once its thread is cancelled 0ms ✓ src/storageCleanup.test.ts > V2 storage cleanup eligibility > allows cleanup once its thread is rolled_back 0ms ✓ src/storageCleanup.test.ts > V2 storage cleanup eligibility > retains completed while background work is pending 0ms ✓ src/storageCleanup.test.ts > V2 storage cleanup eligibility > retains interrupted while background work is pending 0ms ✓ src/storageCleanup.test.ts > V2 storage cleanup eligibility > retains cancelled while background work is pending 0ms ✓ src/storageCleanup.test.ts > V2 storage cleanup eligibility > retains rolled_back while background work is pending 0ms ✓ src/storageCleanup.test.ts > V2 storage cleanup eligibility > retains completed while a runtime request is pending 0ms ✓ src/storageCleanup.test.ts > V2 storage cleanup eligibility > retains interrupted while a runtime request is pending 0ms ✓ src/storageCleanup.test.ts > V2 storage cleanup eligibility > retains cancelled while a runtime request is pending 0ms ✓ src/storageCleanup.test.ts > V2 storage cleanup eligibility > retains rolled_back while a runtime request is pending 0ms ✓ src/storageCleanup.test.ts > V2 storage cleanup eligibility > retains an active run even if the shell status is idle 0ms ✓ src/storageCleanup.test.ts > V2 storage cleanup eligibility > retains a queued prompt before the new run has been projected 0ms ✓ src/storageCleanup.test.ts > V2 storage cleanup eligibility > uses V2 run activity instead of metadata refreshes for retention 0ms ✓ src/storageCleanup.test.ts > merged pull request cleanup > removes a worktree whose head reached the default branch through a merged pull request 0ms ✓ src/storageCleanup.test.ts > merged pull request cleanup > removes a squash-merged worktree when the pull request names its exact head 0ms ✓ src/storageCleanup.test.ts > merged pull request cleanup > keeps a squash worktree whose pull request has a later commit than the merged head 0ms ✓ src/storageCleanup.test.ts > merged pull request cleanup > keeps a squash worktree whose pull request was merged into a release branch 0ms ✓ src/storageCleanup.test.ts > merged pull request cleanup > keeps a squash worktree whose pull request was merged into its stack parent 0ms ✓ src/storageCleanup.test.ts > merged pull request cleanup > keeps a squash worktree whose pull request was merged without a reported head commit 0ms ✓ src/storageCleanup.test.ts > merged pull request cleanup > keeps a squash worktree whose pull request belongs to a different branch 0ms ✓ src/storageCleanup.test.ts > merged pull request cleanup > keeps a squash worktree whose pull request is still open 0ms ✓ src/storageCleanup.test.ts > merged pull request cleanup > keeps a squash worktree whose pull request was closed without merging 0ms ✓ src/storageCleanup.test.ts > merged pull request cleanup > keeps a worktree with no pull request, or one that is not merged 0ms stdout | src/storageCleanup.test.ts > removes clean submodules recursively, including deinitialized repositories [09:20:13.931] INFO (#45): storage cleanup removed worktree { threadId: 'thread-1' } ✓ src/storageCleanup.test.ts > removes clean submodules recursively, including deinitialized repositories 897ms ✓ src/storageCleanup.test.ts > keeps nested submodule files protected by the current keep rule 1133ms ✓ src/storageCleanup.test.ts > keeps unpushed submodule history after checkout and deinitialization 1140ms ✓ src/storageCleanup.test.ts > keeps submodules when stored repository metadata is malformed 637ms stdout | src/storageCleanup.test.ts > preserves late tracked edits when submodules were never initialized [09:20:17.118] WARN (#1228): storage cleanup failed for worktree { threadId: 'thread-1', error: { _tag: 'GitCommandError', operation: 'StorageCleanup.cleanupGit', command: 'git worktree remove', cwd: '/tmp/cleanup-repo-E7tNmO', detail: "fatal: '/tmp/storage-cleanup-CJURrm/worktrees/feature' contains modified or untracked files, use --force to delete it" } } ✓ src/storageCleanup.test.ts > preserves late tracked edits when submodules were never initialized 272ms ✓ src/storageCleanup.test.ts > subagent worktree ownership > checks the whole owner group (idle) 183ms ✓ src/storageCleanup.test.ts > subagent worktree ownership > checks the whole owner group (grandchild) 186ms ✓ src/storageCleanup.test.ts > subagent worktree ownership > checks the whole owner group (null-branch) 78ms ✓ src/storageCleanup.test.ts > subagent worktree ownership > checks the whole owner group (stale-branch) 97ms ✓ src/storageCleanup.test.ts > subagent worktree ownership > checks the whole owner group (isolated-owner) 208ms ✓ src/storageCleanup.test.ts > subagent worktree ownership > checks the whole owner group (fork-owner) 186ms ✓ src/storageCleanup.test.ts > subagent worktree ownership > checks the whole owner group (missing-parent) 81ms ✓ src/storageCleanup.test.ts > subagent worktree ownership > checks the whole owner group (cycle) 89ms ✓ src/storageCleanup.test.ts > subagent worktree ownership > checks the whole owner group (two-tops) 85ms ✓ src/storageCleanup.test.ts > subagent worktree ownership > checks the whole owner group (wrong-root) 85ms ✓ src/storageCleanup.test.ts > subagent worktree ownership > checks the whole owner group (running) 95ms ✓ src/storageCleanup.test.ts > subagent worktree ownership > checks the whole owner group (pending) 86ms ✓ src/storageCleanup.test.ts > subagent worktree ownership > checks the whole owner group (unrelated) 82ms ✓ src/storageCleanup.test.ts > subagent worktree ownership > checks the whole owner group (fork) 83ms ✓ src/storageCleanup.test.ts > subagent worktree ownership > checks the whole owner group (recent-activity) 116ms ✓ src/storageCleanup.test.ts > subagent worktree ownership > checks the whole owner group (recent-inactive) 118ms ✓ src/storageCleanup.test.ts > subagent worktree ownership > checks the whole owner group (recent-grace) 115ms ✓ src/storageCleanup.test.ts > subagent worktree ownership > checks the whole owner group (recent-settle) 132ms ✓ src/storageCleanup.test.ts > subagent worktree ownership > checks the whole owner group (child-settled-now) 118ms ✓ src/storageCleanup.test.ts > subagent worktree ownership > checks the whole owner group (child-settled-only) 120ms ✓ src/storageCleanup.test.ts > subagent worktree ownership > cancels removal when a child changes during measurement (running) 121ms ✓ src/storageCleanup.test.ts > subagent worktree ownership > cancels removal when a child changes during measurement (pending) 130ms ✓ src/storageCleanup.test.ts > subagent worktree ownership > cancels removal when a child changes during measurement (activity) 108ms ✓ src/storageCleanup.test.ts > subagent worktree ownership > cancels removal when a child changes during measurement (unrelated) 135ms ✓ src/storageCleanup.test.ts > subagent worktree ownership > cancels removal when a child changes during measurement (settled) 141ms ✓ src/storageCleanup.test.ts > subagent worktree ownership > cancels removal when a child changes during measurement (resettled) 112ms ✓ src/storageCleanup.test.ts > subagent worktree ownership > cancels removal when a child changes during measurement (null-branch) 127ms ✓ src/storageCleanup.test.ts > subagent worktree ownership > cancels removal when a child changes during measurement (stale-branch) 129ms ✓ src/storageCleanup.test.ts > orphan worktree reports > keeps orphan results visible when thread results fill the report 204ms ✓ src/storageCleanup.test.ts > orphan worktree reports > skips an ancestor of a referenced thread worktree (canonical) 95ms ✓ src/storageCleanup.test.ts > orphan worktree reports > skips an ancestor of a referenced thread worktree (win32) 112ms ✓ src/storageCleanup.test.ts > orphan worktree reports > skips an ancestor of a referenced thread worktree (linux) 80ms ✓ src/storageCleanup.test.ts > orphan worktree reports > waits an hour before reporting a folder without a thread row 81ms ✓ src/storageCleanup.test.ts > orphan worktree reports > continues reporting when a project root cannot be probed 85ms ✓ src/storageCleanup.test.ts > orphan worktree reports > caches walk timeouts and retries budget-cut orphan sizes (walk-timeout) 81ms ✓ src/storageCleanup.test.ts > orphan worktree reports > caches walk timeouts and retries budget-cut orphan sizes (sweep-budget) 91ms ✓ src/storageCleanup.test.ts > orphan worktree reports > reports a linked orphan's size without removing its files (nested) 99ms ✓ src/storageCleanup.test.ts > orphan worktree reports > reports a linked orphan's size without removing its files (direct) 96ms ✓ src/storageCleanup.test.ts > orphan worktree reports > does not report a folder referenced by a thread (active) 110ms ✓ src/storageCleanup.test.ts > orphan worktree reports > does not report a folder referenced by a thread (outside-active-snapshot) 96ms ✓ src/storageCleanup.test.ts > orphan worktree reports > does not report a folder containing a project checkout (exact) 75ms ✓ src/storageCleanup.test.ts > orphan worktree reports > does not report a folder containing a project checkout (nested) 80ms ✓ src/storageCleanup.test.ts > orphan worktree reports > does not report a folder containing a project checkout (symlink) 72ms ✓ src/storageCleanup.test.ts > orphan worktree reports > does not report project internals under a custom managed root (exact) 90ms ✓ src/storageCleanup.test.ts > orphan worktree reports > does not report project internals under a custom managed root (contains) 109ms ✓ src/storageCleanup.test.ts > orphan worktree reports > does not report project internals under a custom managed root (symlink) 110ms ✓ src/storageCleanup.test.ts > orphan worktree reports > reports an orphan under a managed root inside a project (direct) 167ms ✓ src/storageCleanup.test.ts > orphan worktree reports > reports an orphan under a managed root inside a project (symlink) 139ms ✓ src/storageCleanup.test.ts > orphan worktree reports > reports an orphan containing a removed project checkout 94ms ✓ src/storageCleanup.test.ts > orphan worktree reports > skips project workspace internals while reporting a real orphan sibling 82ms ✓ src/storageCleanup.test.ts > orphan worktree reports > skips symbolic links at both directory levels and disabled cleanup 70ms ✓ src/storageCleanup.test.ts > orphan worktree reports > reports ordinary folders with an honest reason and keeps their files 81ms ✓ src/storageCleanup.test.ts > orphan worktree reports > continues after an inaccessible directory's git probe 87ms ✓ src/storageCleanup.test.ts > orphan worktree reports > compares thread paths with host casing rules and excludes existing projects (win32) 106ms ✓ src/storageCleanup.test.ts > orphan worktree reports > compares thread paths with host casing rules and excludes existing projects (linux) 84ms ✓ src/storageCleanup.test.ts > orphan worktree reports > caps orphan entries while preserving kept totals 479ms ✓ src/storageCleanup.test.ts > storage cleanup reports and local file policies > keeps a worktree protected by a missing project root (before-check) 86ms ✓ src/storageCleanup.test.ts > storage cleanup reports and local file policies > keeps a worktree protected by a missing project root (while-measuring) 106ms stdout | src/storageCleanup.test.ts > storage cleanup reports and local file policies > measures nested regular files without following symlinks [09:20:24.012] INFO (#5998): storage cleanup removed worktree { threadId: 'thread-1' } ✓ src/storageCleanup.test.ts > storage cleanup reports and local file policies > measures nested regular files without following symlinks 198ms stdout | src/storageCleanup.test.ts > storage cleanup reports and local file policies > still removes a worktree when measuring its size fails [09:20:24.232] INFO (#6108): storage cleanup removed worktree { threadId: 'thread-1' } ✓ src/storageCleanup.test.ts > storage cleanup reports and local file policies > still removes a worktree when measuring its size fails 223ms ✓ src/storageCleanup.test.ts > storage cleanup reports and local file policies > keeps a worktree when its owner's branch is cleared during size measurement 128ms ✓ src/storageCleanup.test.ts > storage cleanup reports and local file policies > keeps a worktree when its owner's branch changes during size measurement 119ms ✓ src/storageCleanup.test.ts > storage cleanup reports and local file policies > keeps a worktree when its thread starts during size measurement 126ms ✓ src/storageCleanup.test.ts > storage cleanup reports and local file policies > keeps a worktree when another thread starts using it during size measurement 108ms stdout | src/storageCleanup.test.ts > storage cleanup reports and local file policies > reads the thread snapshot once per sweep, not per worktree [09:20:24.876] INFO (#6517): storage cleanup removed worktree { threadId: 'thread-1' } ✓ src/storageCleanup.test.ts > storage cleanup reports and local file policies > reads the thread snapshot once per sweep, not per worktree 153ms stdout | src/storageCleanup.test.ts > storage cleanup reports and local file policies > session updates to running or ready during a sweep make 1 sweep(s) in total [09:20:25.026] INFO (#6622): storage cleanup removed worktree { threadId: 'thread-1' } ✓ src/storageCleanup.test.ts > storage cleanup reports and local file policies > session updates to running or ready during a sweep make 1 sweep(s) in total 152ms stdout | src/storageCleanup.test.ts > storage cleanup reports and local file policies > session updates to stopped or error during a sweep make 2 sweep(s) in total [09:20:25.217] INFO (#6727): storage cleanup removed worktree { threadId: 'thread-1' } ✓ src/storageCleanup.test.ts > storage cleanup reports and local file policies > session updates to stopped or error during a sweep make 2 sweep(s) in total 192ms stdout | src/storageCleanup.test.ts > storage cleanup reports and local file policies > does not measure a worktree kept for an open provider session [09:20:25.396] INFO (#6832): storage cleanup removed worktree { threadId: 'thread-1' } ✓ src/storageCleanup.test.ts > storage cleanup reports and local file policies > does not measure a worktree kept for an open provider session 178ms stdout | src/storageCleanup.test.ts > storage cleanup reports and local file policies > compares the checked-out branch without a full status [09:20:25.577] WARN (#6957): storage cleanup failed for worktree { threadId: 'thread-1', error: { _tag: 'GitCommandError', operation: 'StorageCleanup.branchChanged', command: 'git', cwd: '/tmp/storage-cleanup-aH4IUJ/worktrees/feature', detail: 'Git index is locked. Status will resume when the index lock is removed.' } } stdout | src/storageCleanup.test.ts > storage cleanup reports and local file policies > compares the checked-out branch without a full status [09:20:25.663] INFO (#6957): storage cleanup removed worktree { threadId: 'thread-1' } ✓ src/storageCleanup.test.ts > storage cleanup reports and local file policies > compares the checked-out branch without a full status 266ms ✓ src/storageCleanup.test.ts > storage cleanup reports and local file policies > decodes reports from servers without size fields 1ms ✓ src/storageCleanup.test.ts > storage cleanup reports and local file policies > applies "any-local-files" 104ms stdout | src/storageCleanup.test.ts > storage cleanup reports and local file policies > applies "uncommitted-changes" [09:20:25.932] INFO (#7210): storage cleanup removed worktree { threadId: 'thread-1' } ✓ src/storageCleanup.test.ts > storage cleanup reports and local file policies > applies "uncommitted-changes" 167ms stdout | src/storageCleanup.test.ts > storage cleanup reports and local file policies > applies "tracked-changes" [09:20:26.099] INFO (#7315): storage cleanup removed worktree { threadId: 'thread-1' } ✓ src/storageCleanup.test.ts > storage cleanup reports and local file policies > applies "tracked-changes" 165ms ✓ src/storageCleanup.test.ts > storage cleanup reports and local file policies > applies "any-local-files" 93ms ✓ src/storageCleanup.test.ts > storage cleanup reports and local file policies > applies "uncommitted-changes" 111ms stdout | src/storageCleanup.test.ts > storage cleanup reports and local file policies > applies "tracked-changes" [09:20:26.484] INFO (#7561): storage cleanup removed worktree { threadId: 'thread-1' } ✓ src/storageCleanup.test.ts > storage cleanup reports and local file policies > applies "tracked-changes" 181ms ✓ src/storageCleanup.test.ts > storage cleanup reports and local file policies > applies "any-local-files" 103ms ✓ src/storageCleanup.test.ts > storage cleanup reports and local file policies > applies "uncommitted-changes" 93ms ✓ src/storageCleanup.test.ts > storage cleanup reports and local file policies > applies "tracked-changes" 104ms stdout | src/storageCleanup.test.ts > storage cleanup reports and local file policies > preserves tracked edits written after the final status check [09:20:26.988] WARN (#7875): storage cleanup failed for worktree { threadId: 'thread-1', error: { _tag: 'GitCommandError', operation: 'StorageCleanup.cleanupGit', command: 'git worktree remove', cwd: '/tmp/cleanup-repo-fR5sXA', detail: "fatal: '/tmp/storage-cleanup-h4rLsE/worktrees/feature' contains modified or untracked files, use --force to delete it" } } ✓ src/storageCleanup.test.ts > storage cleanup reports and local file policies > preserves tracked edits written after the final status check 208ms stdout | src/storageCleanup.test.ts > storage cleanup reports and local file policies > streams the current report and subsequent runs [09:20:27.148] INFO (#7985): storage cleanup removed worktree { threadId: 'thread-1' } ✓ src/storageCleanup.test.ts > storage cleanup reports and local file policies > streams the current report and subsequent runs 156ms stdout | src/storageCleanup.test.ts > storage cleanup reports and local file policies > caps entries while preserving totals and prioritizing removals [09:20:27.361] INFO (#8090): storage cleanup removed worktree { threadId: 'thread-1' } ✓ src/storageCleanup.test.ts > storage cleanup reports and local file policies > caps entries while preserving totals and prioritizing removals 312ms ✓ src/storageCleanup.test.ts > storage cleanup reports and local file policies > keeps staged edits in tracked-only mode 97ms ✓ src/storageCleanup.test.ts > storage cleanup reports and local file policies > reports shared and running worktrees but omits disabled rules and missing directories 74ms stdout | src/storageCleanup.test.ts > storage cleanup reports and local file policies > serializes concurrent requests and returns each run's report [09:20:27.789] INFO (#8321): storage cleanup removed worktree { threadId: 'thread-1' } ✓ src/storageCleanup.test.ts > storage cleanup reports and local file policies > serializes concurrent requests and returns each run's report 159ms stdout | src/storageCleanup.test.ts > storage cleanup reports and local file policies > reports git failures without aborting the remaining categories [09:20:28.058] WARN (#8481): storage cleanup failed for worktree { threadId: 'thread-1', error: { _tag: 'GitCommandError', operation: 'StorageCleanup.cleanupGit', command: 'git worktree remove', cwd: '/tmp/cleanup-repo-37SRlB', detail: 'fatal: cannot remove a locked working tree;' } } ✓ src/storageCleanup.test.ts > storage cleanup reports and local file policies > aggregates expired artifacts and rotated logs while retaining current logs 88ms ✓ src/storageCleanup.test.ts > storage cleanup reports and local file policies > reports git failures without aborting the remaining categories 181ms ✓ src/storageCleanup.test.ts > settled worktree retention > applies retention and safety checks (immediate) 176ms ✓ src/storageCleanup.test.ts > settled worktree retention > applies retention and safety checks (settle-script) 102ms ✓ src/storageCleanup.test.ts > settled worktree retention > applies retention and safety checks (expired) 175ms ✓ src/storageCleanup.test.ts > settled worktree retention > applies retention and safety checks (boundary) 166ms ✓ src/storageCleanup.test.ts > settled worktree retention > applies retention and safety checks (wait) 120ms ✓ src/storageCleanup.test.ts > settled worktree retention > applies retention and safety checks (recent-update) 112ms ✓ src/storageCleanup.test.ts > settled worktree retention > applies retention and safety checks (active) 123ms ✓ src/storageCleanup.test.ts > settled worktree retention > applies retention and safety checks (dirty) 129ms ✓ src/storageCleanup.test.ts > settled worktree retention > applies retention and safety checks (project-off) 93ms ✓ src/storageCleanup.test.ts > settled worktree retention > applies retention and safety checks (project-custom) 186ms ✓ src/storageCleanup.test.ts > settled worktree retention > applies retention and safety checks (inactive-settling) 113ms ✓ src/storageCleanup.test.ts > settled worktree rechecks > keeps a checkout changed during measurement ({"settledAt":null}) 130ms ✓ src/storageCleanup.test.ts > settled worktree rechecks > keeps a checkout changed during measurement ({"settledAt":"2026-06-11T12:00:00.000Z"}) 130ms stdout | src/storageCleanup.test.ts > keeps saved usage data when removing a settled checkout [09:20:29.992] INFO (#9744): storage cleanup removed worktree { threadId: 'thread-1' } ✓ src/storageCleanup.test.ts > keeps saved usage data when removing a settled checkout 177ms stdout | src/storageCleanup.test.ts > leaves settled cleanup to the regular sweeps after thread.settled [09:20:30.163] INFO (#9849): storage cleanup removed worktree { threadId: 'thread-1' } ✓ src/storageCleanup.test.ts > leaves settled cleanup to the regular sweeps after thread.settled 173ms stdout | src/storageCleanup.test.ts > leaves settled cleanup to the regular sweeps after stopped [09:20:30.326] INFO (#9954): storage cleanup removed worktree { threadId: 'thread-1' } ✓ src/storageCleanup.test.ts > leaves settled cleanup to the regular sweeps after stopped 160ms stdout | src/storageCleanup.test.ts > leaves settled cleanup to the regular sweeps after ready [09:20:30.498] INFO (#10059): storage cleanup removed worktree { threadId: 'thread-1' } ✓ src/storageCleanup.test.ts > leaves settled cleanup to the regular sweeps after ready 171ms Test Files 1 passed (1) Tests 142 passed (142) Start at 09:20:02 Duration 27.70s (tests 63%, transform 25%, import 11%) Transform transforming modules took 6.98s · 25% of tracked time, re-done on every run persist transforms across runs with fsModuleCache: true learn more: https://vitest.dev/guide/improving-performance#caching-between-reruns JSON report written to /tmp/worktree-git-11/20368-parent-final-tests.json