mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-03 20:17:07 +01:00
The pre-push hook runs the unit suite with git's hook environment, and from a linked worktree GIT_DIR is absolute; an absolute GIT_DIR overrides 'git -C <sandbox>'. lane-base.ts (new on main today) made its throwaway repo that way. Pushing from a worktree on 2026-11-12, its 'init' commit (author test) replaced every file of the branch being pushed, and its git init and git config set core.bare, core.hooksPath /dev/null and user.name test on the real repository. The push's hook failed, so nothing reached GitHub. worktree-workspace.ts and the shell fixtures each guarded themselves; a new test did not. The runner now strips git's own repository variables (git rev-parse --local-env-vars) from every test it spawns (scripts/test/lib/test-env.ts). scripts/test/test-runner-git-env.ts replays the hazard between two throwaway repositories and checks the guard; run against lane-base.ts, an inherited GIT_DIR got its commit unguarded and nothing guarded. Claude-Session: https://claude.ai/code/session_019MDtmtCjm3CvrFm3kYaTgy Co-authored-by: Claude <noreply@anthropic.com>