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
test: CIW fixture git commands inherit the host environment #384
The fixture helpers ciGit, ciGitHead, and initClassifyRepo in cmd/gaze/ci_workflow_test.go construct exec.Command values without setting cmd.Env, so every fixture git subprocess inherits the host environment. Exported GIT_DIR/GIT_WORK_TREE redirect fixture operations to the wrong repository, and a global core.hooksPath (machine-wide husky/pre-commit) runs host hooks during fixture commits — the only defended config is the per-command commit.gpgsign=false. The suite passes in CI yet can fail on developer hosts.
Severity: MEDIUM (test isolation — severity pack Tester row: shared state with no observed failure).
Location: cmd/gaze/ci_workflow_test.go:515 (helpers at :489 and :502).
Suggested fix: pass an explicit scrubbed cmd.Env for the fixture git commands — filter GIT_DIR, GIT_WORK_TREE, GIT_INDEX_FILE and other GIT_* variables, and neutralize global config such as core.hooksPath — restoring hermeticity.
Source: review feedback on PR #373 — #373 (comment) (divisor-testing, council review).
Activity