From 1c36b81d2ed9881e42fdff292faf400d26246ff0 Mon Sep 17 00:00:00 2001 From: weichen Date: Thu, 15 Oct 2026 02:13:03 +0000 Subject: [PATCH] Disable fixture Git maintenance across task tests Why: Long-history task tests could finish while Git background maintenance still rewrote a disposable clone, racing TemporaryDirectory cleanup and failing CI with a non-empty .git directory. Evidence: The failing test passes 25/25 and all 344 governance tests pass locally. Impact: Test fixture only; product, governance commands, and runtime behavior are unchanged. Refs: Dev run 3237 jobs 4951 and 4965 --- tests/test_task.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_task.py b/tests/test_task.py index ccf7b388..da7465ef 100644 --- a/tests/test_task.py +++ b/tests/test_task.py @@ -24,7 +24,10 @@ class TaskLifecycleTests(unittest.TestCase): self.env.update({"GIT_CONFIG_NOSYSTEM": "1", "GIT_CONFIG_GLOBAL": "/dev/null", "GIT_ALLOW_PROTOCOL": "file", "GIT_TERMINAL_PROMPT": "0", "GIT_AUTHOR_NAME": "Lifecycle Test", "GIT_AUTHOR_EMAIL": "test@example.invalid", - "GIT_COMMITTER_NAME": "Lifecycle Test", "GIT_COMMITTER_EMAIL": "test@example.invalid"}) + "GIT_COMMITTER_NAME": "Lifecycle Test", "GIT_COMMITTER_EMAIL": "test@example.invalid", + "GIT_CONFIG_COUNT": "2", "GIT_CONFIG_KEY_0": "gc.auto", + "GIT_CONFIG_VALUE_0": "0", "GIT_CONFIG_KEY_1": "maintenance.auto", + "GIT_CONFIG_VALUE_1": "false"}) for key in ("GIT_DIR", "GIT_WORK_TREE", "GIT_INDEX_FILE", "GITEA_TOKEN", "PRECHECK_RECEIPT", "TASK_PARENT_BRANCH", "TASK_PARENT_PR", "FORCE_ABANDON", "TASK_TARGET_BRANCH", "TASK_WORK_MODE", "VALIDATE_RECEIPT_PURPOSE"):