Skip to content

growth-guards: nine of ten suites inherit the caller's git config (only install-git-hooks.test.sh neutralizes HOME/XDG_CONFIG_HOME/GIT_CONFIG_NOSYSTEM) #1500

Description

@bmethod

Summary

Nine of the ten growth-guards/tests/*.test.sh suites run git init / git commit against
fixture repos while INHERITING the caller's global and system git configuration. Only
install-git-hooks.test.sh neutralizes it.

Evidence

install-git-hooks.test.sh sets HOME, XDG_CONFIG_HOME and GIT_CONFIG_NOSYSTEM before
touching a fixture. The other nine do not, so on a machine carrying any of:

  • core.hooksPath — the caller's own hooks run against the fixture repos;
  • init.templateDir — fixture repos are seeded with the caller's template, including hooks;
  • commit.gpgsign = true — fixture commits block or fail on a missing/locked key;
  • commit.template, core.autocrlf, core.safecrlf — commit bodies and line endings shift;

…the suites produce spurious reds, or worse, silently execute the developer's hooks against
generated fixtures.

This is not theoretical for consumers that WIRE these suites into CI (drovr now does, via
tools/vendored-skill-tests growth-guards): a hosted runner is clean, but a developer machine
or a self-hosted runner need not be.

Suggested fix

Hoist the neutralization install-git-hooks.test.sh already does into the shared setup every
suite sources, so all ten get HOME / XDG_CONFIG_HOME pointed at the scratch dir and
GIT_CONFIG_NOSYSTEM=1 exported.

Repro

git config --global core.hooksPath /tmp/somewhere, then run any of the nine.

Metadata

Metadata

Labels

skillsskills/, agents/, skill-templates/, and base agent instructions

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions