| id | 90 |
|---|---|
| title | Isolate corpus test git config from host signing |
| status | ✅ |
| summary | Pin commit.gpgsign, tag.gpgsign, and gpg.format off for the temporary repositories built by corpus clone tests so host-level commit signing cannot make git commit fail inside CI and sandboxed development environments. |
Make go test ./internal/corpus/... pass on developer
machines and sandboxed CI where the host git config
forces commit signing through a program that cannot
run unattended.
Two tests in
clone_test.go
call makeBareRepo, which runs git commit -m seed.
The commit reads the host git config. A global
gpg.program or gpg.x509.program fires a signing
helper that may fail unattended, and the commit
then aborts with exit status 128 before the test
body runs. The Claude Code sandbox hits this path:
environment-runner code-sign cannot sign without
prompting.
The other two tests in the file
(TestResolveSource_InvalidRepository,
TestResolveSource_LocalPathOverrideSkipsGit) do not
create commits and are unaffected.
- Disable all commit and tag signing on the local
test repository inside
makeBareRepobefore thegit commitcall. The minimum set iscommit.gpgsign=false,tag.gpgsign=false, andgpg.format=openpgp(so a host-levelgpg.format=x509pointing at an x509 signing helper is not inherited). - Confirm no other test in
internal/corpuscreates commits that would hit the same path; today onlyclone_test.godoes, but a regression here would reproduce this bug. - Run
go test ./internal/corpus/...and verify both tests pass on a machine whose global git config hascommit.gpgsign=true.
-
go test ./internal/corpus/...passes on a host withcommit.gpgsign=trueglobally set. -
makeBareReponever readsgpg.programorgpg.x509.programfrom the global git config. - All tests pass:
go test ./... -
go tool golangci-lint runreports no issues