Answer product-owner round 1: 0 🔴, 2 🟡 (0 misread); let the planner compare Scores in the file, name finish --no-changelog for a dropped item, name the plan's path in every refusal and exit 2 on a bad --release
This commit is contained in:
@@ -107,8 +107,4 @@ def plan_reasons(ref: str, ids: list[int] | None, home: pathlib.Path) -> list[st
|
||||
def checkout_plan(plan: PlanStore) -> Plan | Failure:
|
||||
"""The project's plan as it stands."""
|
||||
read = plan.read()
|
||||
if isinstance(read, NoItemsTable):
|
||||
return Failure(f"the project's plan has no items table: {read.reason}")
|
||||
if isinstance(read, Failure):
|
||||
return Failure(f"the project's plan: {read.reason}")
|
||||
return read
|
||||
return Failure(f"the project's plan: {read.reason}") if isinstance(read, Failure) else read
|
||||
|
||||
@@ -154,7 +154,7 @@ class Seats(unittest.TestCase):
|
||||
path = pathlib.Path(checkout, "todo.md")
|
||||
plan = FilePlan(path, "todo.md", pathlib.Path(checkout, "README.md"), MemoryStore(), MemoryStore())
|
||||
with self.subTest("missing"):
|
||||
self.assertIn("no items table", checkout_plan(plan).reason)
|
||||
self.assertEqual(checkout_plan(plan).reason, f"the project's plan: {path}: not found; every project keeps a todo.md, and rank_todo.py --help shows one")
|
||||
with self.subTest("no items table"):
|
||||
path.write_text("# todo\n", encoding="utf-8")
|
||||
self.assertIn("no items table", checkout_plan(plan).reason)
|
||||
@@ -767,7 +767,7 @@ class LarvReviewTool(unittest.TestCase):
|
||||
(self.checkout / "todo.md").write_text("# todo\n")
|
||||
ran = self.run_tool("needs-scoring-run", "2")
|
||||
self.assertEqual(ran.returncode, 1)
|
||||
self.assertIn("the project's plan has no items table", ran.stderr)
|
||||
self.assertIn("the project's plan: ", ran.stderr)
|
||||
|
||||
def test_records_a_ruling_once_four_seats_settle_a_split(self):
|
||||
lines = """\
|
||||
|
||||
Reference in New Issue
Block a user