Pre-commit build clobbers dist/ under a running e2e suite: commit from a second worktree
A pre-commit hook ran vite build into dist/, and a long Playwright suite was serving that same dist/ through vite preview. Committing an unrelated one-line fix during the run emptied and rewrote dist/ (new chunk hashes), and one in-flight test case failed with missing assets; a subagent hit the same thing and misread it as a real failure. Options that worked: stop the suite, commit, restart it on the committed build; or, to keep working while it runs, git worktree add -b side ../side HEAD, symlink node_modules, commit there (its hook builds into its own dist/), and later git merge --ff-only side in the main checkout, which touches only tracked source and runs no hook. Docs-only commits were already exempt because the hook skips the build for them.