Bug
CreateWorkspace resolves .wave/workspaces/ relative to the process CWD instead of the git root. When tests run from internal/pipeline/, workspaces get created at internal/pipeline/.wave/workspaces/ instead of .wave/workspaces/.
Evidence
Found ~90+ misplaced .wave/workspaces/ directories across three categories:
- Source packages —
internal/pipeline/.wave/workspaces/, internal/webui/.wave/workspaces/, tests/integration/.wave/workspaces/
- Nested inside worktree workspaces — ~30 pipeline runs where sub-workspaces were created inside worktree CWD subdirectories
- Claude Code agent worktrees —
.claude/worktrees/agent-*/internal/pipeline/.wave/workspaces/
Each misplaced workspace is a full project worktree (git worktree with .git pointer), wasting disk and polluting the tree.
Root Cause
CreateWorkspace computes the workspace base path from os.Getwd() (or step CWD) rather than always resolving to the git root.
Fix (two parts)
- Code:
CreateWorkspace must resolve workspace paths against git root, never CWD
.gitignore: Add **/.wave/workspaces/ wildcard to catch any future strays
Verification
Check if the fix already landed — memory notes git init -q in mount/basic workspaces as a prior fix for path resolution. If git root resolution is already wired up, this may just need the .gitignore wildcard.
Bug
CreateWorkspaceresolves.wave/workspaces/relative to the process CWD instead of the git root. When tests run frominternal/pipeline/, workspaces get created atinternal/pipeline/.wave/workspaces/instead of.wave/workspaces/.Evidence
Found ~90+ misplaced
.wave/workspaces/directories across three categories:internal/pipeline/.wave/workspaces/,internal/webui/.wave/workspaces/,tests/integration/.wave/workspaces/.claude/worktrees/agent-*/internal/pipeline/.wave/workspaces/Each misplaced workspace is a full project worktree (git worktree with
.gitpointer), wasting disk and polluting the tree.Root Cause
CreateWorkspacecomputes the workspace base path fromos.Getwd()(or step CWD) rather than always resolving to the git root.Fix (two parts)
CreateWorkspacemust resolve workspace paths against git root, never CWD.gitignore: Add**/.wave/workspaces/wildcard to catch any future straysVerification
Check if the fix already landed — memory notes
git init -qin mount/basic workspaces as a prior fix for path resolution. If git root resolution is already wired up, this may just need the.gitignorewildcard.