From f04540dcfe68d59e444d1c49a6cc13b0709209a6 Mon Sep 17 00:00:00 2001 From: sergeyb Date: Thu, 3 Dec 2026 21:13:54 +0000 Subject: [PATCH] test(autoreview): isolate review-scope-test's git from host config On hosts whose system git config enables commit signing, test_branch_mode_uses_the_net_worktree_diff failed every run: its `git commit` exited 128 because the signing helper was unavailable in the test sandbox. The test's run_git helper ran host git with the inherited environment, so system and global config (signing, hooks) leaked into the temporary repository. run_git now sets GIT_CONFIG_NOSYSTEM=1 and GIT_CONFIG_GLOBAL=/dev/null, so only the repository's own config (the test's user.email and user.name) applies. The script invocations are unchanged. Co-Authored-By: Claude Sonnet 5.5 --- .agents/skills/autoreview/scripts/review_scope_test.py | 1 + 1 file changed, 1 insertion(+) diff --git a/.agents/skills/autoreview/scripts/review_scope_test.py b/.agents/skills/autoreview/scripts/review_scope_test.py index 67f4cd5e1..aa150d993 100644 --- a/.agents/skills/autoreview/scripts/review_scope_test.py +++ b/.agents/skills/autoreview/scripts/review_scope_test.py @@ -232,6 +232,7 @@ def run_git(repo: Path, *args: str) -> subprocess.CompletedProcess[str]: stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, + env={**os.environ, "GIT_CONFIG_NOSYSTEM": "1", "GIT_CONFIG_GLOBAL": os.devnull}, )