You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
worktree-create tests leak fixture worktrees into the real worktree root #4472
/home/kyle/worktrees/ (the operator's real worktree root) holds 96 directories named repo<6 random chars>-feat-gate-<case> (cases basic, noroot, noroot2, order, token, fallback) plus 13 acme-widget-feat-* directories. The repoXXXXXX prefix matches the fixture repos plugins/source-control/scripts/worktree-create.test.sh creates with mktemp -d "$TEST_TMPDIR/repoXXXXXX". Each leaked directory's .git file points into a deleted /tmp/tmp.*/repo*/.git/worktrees/..., so every one is an orphan git can no longer resolve (e.g. git -C /home/kyle/worktrees/repo0HDyHq-feat-gate-noroot rev-parse → fatal: not a git repository).
Expected
Every worktree a test creates lands under the test's own temp tree and is removed with it. No test writes to the operator's configured worktree root.
Likely cause (unverified)
The feat-gate-* cases resolve the worktree root from the host's real configuration (a global git config value or an environment variable the suite does not isolate) rather than a root inside TEST_TMPDIR. The acme-widget-feat-* directories suggest a second suite with the same leak.
Fix
Isolate the root in every case: set whatever the resolver reads (config key or env var) to a path under TEST_TMPDIR, and point GIT_CONFIG_GLOBAL at a scratch file.
Add an assertion that the real root gained no entries during the run.
Find the suite that creates acme-widget-feat-* and apply the same isolation.
Cleanup
The 109 orphaned directories under /home/kyle/worktrees/ can be deleted once the leak is fixed; they hold no resolvable git state.
Activity
fix(tests): stop test suites and pr-linkage validator leaking files i…
feat(source-control): reap already-safe worktrees by age and scan the…
fix(tests): remove remaining temp-dir leaks from test suites (#5633)