Answer stability round 1: 0 🔴, 4 🟡 (0 misread); a cycle's close takes the task from the cycle, a resolved thread is skipped unread, and tests run git in their own environment
CI / tests (pull_request) Successful in 3m56s

This commit is contained in:
2026-11-19 14:04:11 +01:00
parent aafe75e16f
commit 914b8dc2d4
19 changed files with 143 additions and 87 deletions
+4 -2
View File
@@ -1,3 +1,4 @@
import functools
import os
import pathlib
import re
@@ -10,6 +11,7 @@ sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
from larv_review.scoring_setup import bullets, file_globs, prepare_scoring, project_values, removed_setup, score_bullets
from failure import Failure
from git_cli.git_repo import git
from test_env import isolated_env
from project_config.doubles import write_config
@@ -102,7 +104,7 @@ class PrepareScoring(unittest.TestCase):
def prepare(self):
"""What prepare-scoring returns in the checkout, run in this process so mutation tests see the lines it runs."""
return prepare_scoring(str(self.checkout), self.root)
return prepare_scoring(str(self.checkout), self.root, functools.partial(git, env=self.env))
def run_tool(self, *args):
return subprocess.run([sys.executable, str(TOOL), *args], capture_output=True, cwd=self.checkout, env=self.env, text=True)
@@ -137,7 +139,7 @@ class PrepareScoring(unittest.TestCase):
self.commit()
checkout = self.root / ".local" / "state" / "larv-review" / "proj" / "scoring" / "checkout"
checkout.mkdir(parents=True)
removed = removed_setup(str(self.checkout), self.root)
removed = removed_setup(str(self.checkout), self.root, functools.partial(git, env=self.env))
self.assertIsInstance(removed, Failure)
self.assertTrue(removed.reason.startswith(f"could not remove the scoring worktree {checkout}: "), removed.reason)
self.assertTrue(checkout.exists())