Keep configs in ~/.config/build-release/ and tool state in ~/.local/state/build-release/, under XDG_* where set
CI / tests (pull_request) Successful in 6m34s
CI / tests (pull_request) Successful in 6m34s
This commit is contained in:
@@ -104,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, functools.partial(git, env=self.env))
|
||||
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)
|
||||
@@ -112,7 +112,7 @@ class PrepareScoring(unittest.TestCase):
|
||||
def test_writes_each_seats_prompt_with_every_placeholder_filled_and_a_worktree_at_head(self):
|
||||
self.commit("# A\n\n## Scoring run\n\n- Language: Python\n- Kind: a CLI\n- Domain: parsing\n- Domain docs: the spec\n- 3am question: the parse hangs\n")
|
||||
ran = self.prepare()
|
||||
folder = self.root / ".local" / "state" / "larv-review" / "proj" / "scoring"
|
||||
folder = self.root / ".local" / "state" / "build-release" / "larv-review" / "proj" / "scoring"
|
||||
worktree = folder / "checkout"
|
||||
prompts = [folder / f"{seat}.md" for seat in ("junior-a", "mid-a", "maintainability-senior", "inherited-architect")]
|
||||
self.assertEqual(ran, f"Scoring worktree, at {self.git('rev-parse', '--short', 'HEAD').strip()}: {worktree}\nPrompts, each for one comprehension-seat agent:\n" + "\n".join(str(prompt) for prompt in prompts))
|
||||
@@ -137,9 +137,9 @@ class PrepareScoring(unittest.TestCase):
|
||||
|
||||
def test_says_it_could_not_remove_a_checkout_git_does_not_hold(self):
|
||||
self.commit()
|
||||
checkout = self.root / ".local" / "state" / "larv-review" / "proj" / "scoring" / "checkout"
|
||||
checkout = self.root / ".local" / "state" / "build-release" / "larv-review" / "proj" / "scoring" / "checkout"
|
||||
checkout.mkdir(parents=True)
|
||||
removed = removed_setup(str(self.checkout), self.root, functools.partial(git, env=self.env))
|
||||
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())
|
||||
@@ -176,7 +176,7 @@ class PrepareScoring(unittest.TestCase):
|
||||
ran = self.prepare()
|
||||
assert isinstance(ran, str), ran
|
||||
self.assertIn("Your background: ~2 years in Go, first codebase of this kind (a CLI)", pathlib.Path(ran.splitlines()[2]).read_text())
|
||||
self.assertIsNone(removed_setup(str(self.checkout), self.root, functools.partial(git, env=self.env)))
|
||||
self.assertIsNone(removed_setup(str(self.checkout), self.root, {}, functools.partial(git, env=self.env)))
|
||||
|
||||
def test_keeps_the_working_rules_values_where_the_checkout_has_seat_prompts_too(self):
|
||||
own = self.checkout / "skills" / "comprehension-panel" / "seat-prompts.md"
|
||||
@@ -192,7 +192,7 @@ class PrepareScoring(unittest.TestCase):
|
||||
ran = self.run_tool("prepare-scoring")
|
||||
self.assertEqual(ran.returncode, 1)
|
||||
self.assertIn("AGENTS.md has no \"Scoring run\" section", ran.stderr)
|
||||
self.assertFalse((self.root / ".local" / "state" / "larv-review" / "proj" / "scoring").exists())
|
||||
self.assertFalse((self.root / ".local" / "state" / "build-release" / "larv-review" / "proj" / "scoring").exists())
|
||||
self.assertEqual(len(self.git("worktree", "list").splitlines()), 1)
|
||||
|
||||
def test_fails_before_it_makes_the_worktree_where_a_file_it_reads_does_not_decode(self):
|
||||
|
||||
Reference in New Issue
Block a user