test_template_leaves_no_detached_git_maintenance_writing_into_the_copies
(tests/test_conftest.py) grades behavior rather than the config key: it commits
into a real copy under GIT_TRACE2_EVENT and asserts no child_start event names
a maintenance or gc child. Its ablation — deleting
tests/conftest.py:458 — reddens that row alone, verified.
The channel
_isolate_ambient_git_ignores (tests/conftest.py:366) deliberately leaves
GIT_CONFIG_NOSYSTEM unset, documented at :382. So the probe subprocess still
reads the host's system gitconfig. On a host whose system config already sets
maintenance.auto=false or gc.auto=0, the spawn is suppressed for a reason that
has nothing to do with the fixture, and the row stays green even with the fixture
line deleted — the ablation would not redden there.
This does not affect CI (neither the ubuntu-24.04 nor the windows-2025 runner
image ships such a system config) and it does not weaken the fix itself, only the
guard's ability to prove the fix is what is doing the work on an arbitrary
contributor's box.
Options
- Set
GIT_CONFIG_NOSYSTEM=1 on that one probe subprocess.run env, scoping the
hardening to the assertion that needs it rather than to the whole suite. The
existing env dict already passes {**os.environ, "GIT_TRACE2_EVENT": ...}, so
this is one key.
- Or record the channel in the docstring so a contributor who ablates and sees
green knows to check their system config first.
The narrow env-var scoping is preferred over touching
_isolate_ambient_git_ignores, whose choice not to set GIT_CONFIG_NOSYSTEM
globally is deliberate and load-bearing for other rows.
test_template_leaves_no_detached_git_maintenance_writing_into_the_copies(
tests/test_conftest.py) grades behavior rather than the config key: it commitsinto a real copy under
GIT_TRACE2_EVENTand asserts nochild_startevent namesa
maintenanceorgcchild. Its ablation — deletingtests/conftest.py:458— reddens that row alone, verified.The channel
_isolate_ambient_git_ignores(tests/conftest.py:366) deliberately leavesGIT_CONFIG_NOSYSTEMunset, documented at:382. So the probe subprocess stillreads the host's system gitconfig. On a host whose system config already sets
maintenance.auto=falseorgc.auto=0, the spawn is suppressed for a reason thathas nothing to do with the fixture, and the row stays green even with the fixture
line deleted — the ablation would not redden there.
This does not affect CI (neither the
ubuntu-24.04nor thewindows-2025runnerimage ships such a system config) and it does not weaken the fix itself, only the
guard's ability to prove the fix is what is doing the work on an arbitrary
contributor's box.
Options
GIT_CONFIG_NOSYSTEM=1on that one probesubprocess.runenv, scoping thehardening to the assertion that needs it rather than to the whole suite. The
existing env dict already passes
{**os.environ, "GIT_TRACE2_EVENT": ...}, sothis is one key.
green knows to check their system config first.
The narrow env-var scoping is preferred over touching
_isolate_ambient_git_ignores, whose choice not to setGIT_CONFIG_NOSYSTEMglobally is deliberate and load-bearing for other rows.