diff --git a/bin/repo_checks/test_reviewer_launches.py b/bin/repo_checks/test_reviewer_launches.py index ae94e804..aca0062f 100644 --- a/bin/repo_checks/test_reviewer_launches.py +++ b/bin/repo_checks/test_reviewer_launches.py @@ -10,6 +10,8 @@ from repo_checks.test_python_floor import ROOT from rule_hook.reviewer_rung import SEAT, SECURITY_OPENER OPENING = re.compile(r"^## Opening\n+```\n([^\n]+?\.)(?: |\n)", re.MULTILINE) +# An agent's name, as opposed to the skill or plugin that reviews a pass. +AGENT_NAME = re.compile(r"[a-z]+(?:-[a-z]+)*") # A row of the pass table: its pass and its reviewer cell. PASS_ROW = re.compile(r"^\| (?!Pass \|)([A-Z][a-z -]+?) \| ([^|]+?) \|", re.MULTILINE) LARV_REVIEW = (ROOT / "skills" / "larv-review" / "SKILL.md").read_text(encoding="utf-8") @@ -20,11 +22,8 @@ class ReviewerLaunches(unittest.TestCase): """rule-hook holds a review launch to its rung by recognising it, and `larv-review round-count` counts the passes by name; these fail when what they recognise drifts from what the skills launch.""" def test_the_passes_and_their_agents_are_the_ones_larv_review_s_pass_table_names_in_its_order(self): - rows = [(name.lower(), reviewer) for name, reviewer in PASS_ROW.findall(PASS_TABLE)] - self.assertEqual([name for name, _ in rows], list(PASSES)) - for name, reviewer in rows: - with self.subTest(name=name): - self.assertEqual(reviewer == PASS_AGENTS[name], PASS_AGENTS[name] is not None) + rows = [(name.lower(), reviewer if AGENT_NAME.fullmatch(reviewer) else None) for name, reviewer in PASS_ROW.findall(PASS_TABLE)] + self.assertEqual(rows, list(PASS_AGENTS.items())) def test_the_seat_opening_is_the_sentence_that_opens_every_seat_prompt(self): opening = OPENING.search((ROOT / "skills" / "comprehension-panel" / "seat-prompts.md").read_text(encoding="utf-8")) diff --git a/todo.md b/todo.md index e6635dc9..bd71a082 100644 --- a/todo.md +++ b/todo.md @@ -115,7 +115,7 @@ Found by the prose review of PR #312, which judged both entries to read as amend ### 216. Make larv-review's round count agree with itself on the auto-reviewer: either title its round commits so `round-count` counts them as a pass, or have SKILL.md say they carry no `Answer round` title. -`skills/larv-review/SKILL.md` §3 "Round cap" makes the external auto-reviewer a pass of its own and each review it posts a round, and says each round closes with a commit titled `Answer round : 🔴, 🟡; …`. It also says the auto-reviewer's count is the number of its reviews on the PR. `larv-review round-count` (`bin/larv_review/main.py` `round_count`) answers an `Answer auto-reviewer round :` commit with "auto-reviewer: , not a pass: check the commit title", because `bin/review_passes.py` `PASSES`, the list `bin/test_reviewer_launches` holds SKILL.md's table to, leaves it out on purpose. A worker who follows the skill therefore gets a warning. Found by round 2 of PR #354's principles pass (item 121). The comprehension seats named `PASSES` hard to read: the pass list lives in four places kept in sync by hand. Make `PASSES` easier to read where the change touches it. +`skills/larv-review/SKILL.md` §3 "Round cap" makes the external auto-reviewer a pass of its own and each review it posts a round, and says each round closes with a commit titled `Answer round : 🔴, 🟡; …`. It also says the auto-reviewer's count is the number of its reviews on the PR. `larv-review round-count` (`bin/larv_review/main.py` `round_count`) answers an `Answer auto-reviewer round :` commit with "auto-reviewer: , not a pass: check the commit title", because `bin/review_passes.py` `PASSES`, the list `bin/repo_checks/test_reviewer_launches.py` holds SKILL.md's table to, leaves it out on purpose. A worker who follows the skill therefore gets a warning. Found by round 2 of PR #354's principles pass (item 121). ### 170. Re-tune `WORKER_STEPS` and `REVIEW_STEPS` once 10 chunks have shipped under them, from how well L, E and I order their review rounds and 🔴 findings.