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
Isolate candidate attestation test setup from global Git settings #1266
Candidate attestation tests can error during fixture setup on contributors’ machines with commit signing enabled. The fixture creates a temporary repository but its private Git wrapper inherits the caller’s Git configuration. Setting a local name and email does not override signing. tests/test_candidate.py:209tests/test_candidate.py:214tests/conftest.py:28.
On e90262769, I ran pytest tests/test_candidate.py::test_vanished_squash_parent_passes_real_tree_attestation with a temporary HOME whose .gitconfig set commit.gpgsign=true and gpg.program=/bin/false. Setup errored on git commit -m base with exit 128. Adding GIT_CONFIG_GLOBAL=/dev/null made the same test pass. All Git repositories and the signing configuration in this reproduction were local and disposable.
Acceptance
Use the shared isolated Git helper in tests/conftest.py for the candidate fixture in tests/test_candidate.py. Preserve the constructed history and the assertions on the production fetch environment.
The candidate test above passes with the synthetic signing configuration and with an empty Git config. The fixture Git commands ignore inherited system, global and inline Git configuration.
Fixed by #1533 (ff44b5c5). Both candidate seed construction and per-test commits route through the shared helper in tests/conftest.py. The production fetch assertions are still in place.
Verified at 1ae8075e: the reported test passed with a temporary HOME containing commit.gpgsign=true and gpg.program=/bin/false, and passed again with a clean HOME. The full candidate module under the signing configuration had 80 passed and 9 skipped. A plain Git commit under the same signing settings failed with exit 128 as expected.
Activity
eowca commentedon Nov 26, 2026
Fixed by #1533 (
ff44b5c5). Both candidate seed construction and per-test commits route through the shared helper intests/conftest.py. The production fetch assertions are still in place.Verified at
1ae8075e: the reported test passed with a temporary HOME containingcommit.gpgsign=trueandgpg.program=/bin/false, and passed again with a clean HOME. The full candidate module under the signing configuration had 80 passed and 9 skipped. A plain Git commit under the same signing settings failed with exit 128 as expected.