From 567ff471ecd7ac324f1e7e36f9066e4366ab013e Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 11 Nov 2026 00:05:20 +0100 Subject: [PATCH] =?UTF-8?q?Answer=20stability=20round=202:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=203=20=F0=9F=9F=A1=20(0=20misread);=20say=20the?= =?UTF-8?q?=20gate=20reads=20the=20checkout's=20todo.md,=20and=20test=20ma?= =?UTF-8?q?in's=20runs,=20and=20an=20unreadable=20plan?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/larv_review/main.py | 2 +- bin/larv_review/test_larv_review.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/larv_review/main.py b/bin/larv_review/main.py index 28f9ca98..bd41c576 100644 --- a/bin/larv_review/main.py +++ b/bin/larv_review/main.py @@ -42,7 +42,7 @@ docs/decisions.md opts out of the comprehension check is never due one. scoring-run-owed prints `No scoring run owed.` or exits 1 naming the runs the chunk owes and has not recorded. chunk-pr merge runs it and refuses to merge on exit 1, so a due line read earlier in -the chunk can't stand in for it. It applies needs-scoring-run's rule to the branch as committed, against the +the chunk can't stand in for it. It applies needs-scoring-run's rule to the checkout's todo.md and the committed history, against the merge base with the default branch, so a default branch that has moved on adds nothing: the items the merge base's todo.md holds and the checkout's does not count as shipped. A chunk that empties a release owes two runs, any other due chunk one. The chunk has recorded the scoring runs that its diff --git a/bin/larv_review/test_larv_review.py b/bin/larv_review/test_larv_review.py index cf6fa332..5315285b 100644 --- a/bin/larv_review/test_larv_review.py +++ b/bin/larv_review/test_larv_review.py @@ -577,6 +577,10 @@ class LarvReviewTool(unittest.TestCase): self.git("rm", "-q", "todo.md") self.commit("Drop the plan") self.assertEqual(self.run_tool("scoring-run-owed").stdout, "No scoring run owed.\n") + (self.checkout / "todo.md").write_bytes(b"\xff\xfe") + self.git("add", "todo.md") + self.commit("Break the plan") + self.assertEqual(self.run_tool("scoring-run-owed").returncode, 1, "a plan that can't be read is no plan the gate may skip") def test_a_default_branch_that_moved_on_since_the_branch_began_adds_no_owed_run(self): self.git("switch", "-q", "main") @@ -586,6 +590,9 @@ class LarvReviewTool(unittest.TestCase): self.commit("Do some work") self.assertEqual(self.run_tool("needs-scoring-run").stdout, "No scoring run due.\n") self.assertEqual(self.run_tool("scoring-run-owed").stdout, "No scoring run owed.\n") + self.ship_item_1() + self.commit("Ship item 1 and record a run", {"docs/comprehension-history.md": "# Comprehension history\n\n" + SCORING.replace("PR #1", "PR #7")}) + self.assertIn("owes 2 scoring runs and the branch's committed history records 1:", self.run_tool("scoring-run-owed").stderr, "main's own run is no credit to the branch") def release(self, tag, date, files=None): """Cut tag on the default branch at a commit dated date."""