From 1bf98f499d472e8723c8b00ca9d4fb873f11d739 Mon Sep 17 00:00:00 2001 From: Kyle Sexton <153232337+kyle-sexton@users.noreply.github.com> Date: Tue, 27 Oct 2026 21:12:48 -0400 Subject: [PATCH] fix(source-control): isolate the AffectedSuites git fixture from global config The fixture inherited the machine's global git config. With commit.gpgsign on and SSH signing through an interop script, parallel runs failed `git commit` with "failed to write commit object" (exit 128). Point GIT_CONFIG_GLOBAL at os.devnull and set GIT_CONFIG_NOSYSTEM for the class. Co-Authored-By: Claude Sonnet 5.5 --- .../fix-affected-suites-fixture-isolation-7b3e9d24.md | 5 +++++ .../scripts/tests/test_babysit_postmerge_quarantine.py | 7 +++++++ 2 files changed, 12 insertions(+) create mode 100644 .changes/source-control/fix-affected-suites-fixture-isolation-7b3e9d24.md diff --git a/.changes/source-control/fix-affected-suites-fixture-isolation-7b3e9d24.md b/.changes/source-control/fix-affected-suites-fixture-isolation-7b3e9d24.md new file mode 100644 index 0000000000..3ac3e60097 --- /dev/null +++ b/.changes/source-control/fix-affected-suites-fixture-isolation-7b3e9d24.md @@ -0,0 +1,5 @@ +--- +bump: none +--- + +Test-only: the `AffectedSuites` fixture ignores the machine's global and system git config, so its `git commit` no longer fails when `commit.gpgsign` is on and signing cannot reach its key; nothing a user runs changes. diff --git a/plugins/source-control/skills/babysit-prs/scripts/tests/test_babysit_postmerge_quarantine.py b/plugins/source-control/skills/babysit-prs/scripts/tests/test_babysit_postmerge_quarantine.py index 9001816324..4a9351d0aa 100644 --- a/plugins/source-control/skills/babysit-prs/scripts/tests/test_babysit_postmerge_quarantine.py +++ b/plugins/source-control/skills/babysit-prs/scripts/tests/test_babysit_postmerge_quarantine.py @@ -677,6 +677,13 @@ def commit(self, files: dict[str, str], message: str) -> str: return self.git(self.root, "rev-parse", "HEAD") def setUp(self) -> None: + # The machine's global config signs commits (commit.gpgsign) through a + # key the fixture cannot reach, which fails `git commit` under load. + env = mock.patch.dict( + os.environ, {"GIT_CONFIG_GLOBAL": os.devnull, "GIT_CONFIG_NOSYSTEM": "1"} + ) + env.start() + self.addCleanup(env.stop) tmp = tempfile.TemporaryDirectory() self.addCleanup(tmp.cleanup) self.root = pathlib.Path(tmp.name) / "clone"