Fix the auditors' round-6 nits: list the fall's reason last in the help, as it prints, and name the fall tests for the Fall state

This commit is contained in:
2026-10-09 11:55:06 +02:00
parent 4cda8551b4
commit a83003980c
2 changed files with 11 additions and 11 deletions
+5 -5
View File
@@ -22,11 +22,11 @@ and each name in such a title that is not a pass.
needs-scoring-run takes the IDs of the todo.md items the chunk ships, none when it ships none, and
prints why the chunk is due a scoring run, or `No scoring run due.` The chunk's entries are those
the checkout's history holds and the default branch's lacks. It is due when the chunk ships an item
whose tagline names the comprehension floor, when the chunk's newest entry is a paired ruling with a
`Fell:` line, or when it leaves a release with no item in the checkout's todo.md, less the shipped
items, and work has landed towards that release. Work has landed when the chunk ships one of the
release's items, or when the release is the earliest the default branch's todo.md names and the
default branch has a commit after its newest v* tag, or has no v* tag.
whose tagline names the comprehension floor, when it leaves a release with no item in the
checkout's todo.md, less the shipped items, and work has landed towards that release, or when the
chunk's newest entry is a paired ruling with a `Fell:` line. Work has landed when the chunk ships
one of the release's items, or when the release is the earliest the default branch's todo.md names
and the default branch has a commit after its newest v* tag, or has no v* tag.
record-ruling and record-scoring read a seats file: a first line naming what the seats read, `<PR or
branch> at <commit>`, ending `, against <base>` for a paired ruling, then each seat's line, each
+6 -6
View File
@@ -131,7 +131,12 @@ class History(unittest.TestCase):
self.assertEqual([entry.paired for entry in found], [False, True])
class PendingFall(unittest.TestCase):
class FallState(unittest.TestCase):
def test_gives_the_fall_its_own_reason_outside_the_plans(self):
plan = [item(1, (0, 1, 0)), item(2, (0, 1, 0))]
self.assertEqual(scoring_run_due(plan, plan, [], True), [])
self.assertEqual(fall_reasons(fall(chunk_entries("", paired("2026-10-08T13:00:00Z", "same\n\nFell: Locality")))), ["has a paired ruling in which Locality fell"])
def test_finds_a_fall_in_the_newest_entry_when_it_is_a_better_ruling(self):
fell = paired("2026-10-08T13:00:00Z", "better\n\nFell: Locality,Shape")
self.assertEqual(fall(chunk_entries("", SCORING + fell)).pending, ["Locality", "Shape"])
@@ -211,11 +216,6 @@ class ScoringRunDue(unittest.TestCase):
self.assertEqual(scoring_run_due(before, emptied, [], True), ["leaves release 0.1.0 with no plan item"])
self.assertEqual(scoring_run_due(before, emptied, [], False), [])
def test_is_due_when_a_better_ruling_hides_a_fall(self):
plan = [item(1, (0, 1, 0)), item(2, (0, 1, 0))]
self.assertEqual(scoring_run_due(plan, plan, [], True), [])
self.assertEqual(fall_reasons(fall(chunk_entries("", paired("2026-10-08T13:00:00Z", "same\n\nFell: Locality")))), ["has a paired ruling in which Locality fell"])
def test_is_not_due_when_a_later_release_loses_its_last_item_unshipped(self):
before = [item(1, (0, 1, 0)), item(3, (0, 2, 0))]
self.assertEqual(scoring_run_due(before, before[:1], [], True), [])