diff --git a/bin/round_titles.py b/bin/round_titles.py index 0852e36a..b37c0dd2 100644 --- a/bin/round_titles.py +++ b/bin/round_titles.py @@ -32,7 +32,7 @@ def round_counts(titles: list[str]) -> dict[str, int]: def lacks_counts(title: str) -> bool: - """Whether title is a round title without all three counts after its colon.""" + """Whether title is a round title without all three counts after its colon, or with more misread findings than 🔴 and 🟡 findings.""" return ROUND.match(title) is not None and ((counts := title_counts(title)) is None or counts.misread is None) diff --git a/bin/rule_hook/rules.py b/bin/rule_hook/rules.py index 451c2043..56409dce 100644 --- a/bin/rule_hook/rules.py +++ b/bin/rule_hook/rules.py @@ -57,7 +57,7 @@ RULES: dict[RuleName, Rule] = { "a git commit whose message opens `Answer round :`", ), "round-title-counts": Rule( - "a larv-review round's commit title gives the counts of 🔴 and 🟡 findings the round reported, and how many of them a reviewer marked `[misread]`, such as `Answer stability round 1: 1 🔴, 2 🟡 (1 misread); flag a deleted test`, since score-outcomes counts them", + "a larv-review round's commit title gives the counts of 🔴 and 🟡 findings the round reported, and how many of them a reviewer marked `[misread]`, at most the two together, such as `Answer stability round 1: 1 🔴, 2 🟡 (1 misread); flag a deleted test`, since score-outcomes counts them", "a git commit whose message opens `Answer round :`", ), "todo-rank-check": Rule( @@ -132,7 +132,7 @@ def command_breaches(command: str, simples: list[Simple], home: str) -> list[Bre if any(past_cap(message) for message in commit.messages): breaches.append(Breach("round-cap", f"the pass has had its {CAP} rounds; ask the human, and quote the yes in the override", commit.directory)) if any(lacks_counts(message) for message in commit.messages): - breaches.append(Breach("round-title-counts", "open the summary after the round's colon with ` 🔴, 🟡 ( misread);`", commit.directory)) + breaches.append(Breach("round-title-counts", "open the summary after the round's colon with ` 🔴, 🟡 ( misread);`, where is at most + ", commit.directory)) return breaches diff --git a/bin/test_round_titles.py b/bin/test_round_titles.py index b4e22248..37769359 100644 --- a/bin/test_round_titles.py +++ b/bin/test_round_titles.py @@ -52,12 +52,12 @@ class RoundFindings(unittest.TestCase): self.assertTrue(lacks_counts("Answer stability round 1: 0 🔴, 1 🟡; fix")) self.assertFalse(lacks_counts("Answer stability round 1: 0 🔴, 1 🟡 (0 misread); fix")) self.assertFalse(lacks_counts("Answer prose round 2: 0 🔴, 0 🟡 (0 misread)")) + self.assertFalse(lacks_counts("Answer the question")) def test_takes_a_title_counting_more_misread_findings_than_findings_as_lacking_its_counts(self): self.assertTrue(lacks_counts("Answer stability round 1: 1 🔴, 2 🟡 (4 misread); fix")) self.assertFalse(lacks_counts("Answer stability round 1: 1 🔴, 2 🟡 (3 misread); fix")) self.assertIsNone(round_findings(["Answer stability round 1: 1 🔴, 2 🟡 (4 misread); fix"])) - self.assertFalse(lacks_counts("Answer the question")) if __name__ == "__main__":