Answer principles round 1: 0 🔴, 6 🟡; average the overall over the newest scored commit's runs, re-rank through rank_todo's functions and say not to record again, tie the help to UNDER_FLOOR and FLOOR, add code health to the working loop's premises, loop-claude's first prompt and two more agents, and fix items 114, 124 and 125's details

This commit is contained in:
2026-10-18 20:29:19 +02:00
parent 3081d50f0f
commit 390d1f1f83
15 changed files with 93 additions and 42 deletions
+12 -3
View File
@@ -130,6 +130,7 @@ class Rank(unittest.TestCase):
self.assertEqual((round(weights[0], 3), round(weights[-1], 3), round(sum(weights), 6)), (first, last, 1))
for figure in (rank_todo.GOAL_STEP, first, last):
self.assertIn(str(figure), rank_todo.__doc__)
self.assertIn(f"Code health then weighs {rank_todo.UNDER_FLOOR} times that while the overall is\n under {rank_todo.FLOOR},", rank_todo.__doc__)
def test_scores_an_item_by_the_weights_of_the_goals_it_moves(self):
readme = "## Goals\n\n" + VOID + "1. **Achieve:** A.\n 1. **Maintain:** B.\n 2. **Achieve:** C.\n2. **Achieve:** D.\n"
@@ -264,15 +265,23 @@ class CodeHealth(unittest.TestCase):
with self.subTest(history=history):
self.assertEqual(self.scores(history), {"| 1": "101.5", "| 2": "24.6"})
def test_weighs_by_the_newest_scoring_run_wherever_the_file_holds_it(self):
def test_weighs_by_the_newest_scored_commit_wherever_the_file_holds_it(self):
older = SCORED.format(overall="6.50").removeprefix("# Comprehension history\n\n")
newer = SCORED.format(overall="7.25").removeprefix("# Comprehension history\n\n").replace("2026-10-08", "2026-10-10")
newer = SCORED.format(overall="7.25").removeprefix("# Comprehension history\n\n").replace("2026-10-08", "2026-10-10").replace("aaaaaaa", "bbbbbbb")
for history in (f"{older}\n{newer}", f"{newer}\n{older}"):
with self.subTest(history=history):
self.assertEqual(self.scores(history)["| 1"], "25.4")
def test_weighs_by_the_mean_overall_of_every_run_on_the_newest_scored_commit(self):
first = SCORED.format(overall="7.13").removeprefix("# Comprehension history\n\n")
rerun = SCORED.format(overall="6.88").removeprefix("# Comprehension history\n\n").replace("2026-10-08T12", "2026-10-08T13").replace("PR #1 at", "PR #1 rerun at")
# 7.13 and 6.88 average 7.005, at the floor or above.
self.assertEqual(self.scores(f"{first}\n{rerun}")["| 1"], "25.4")
later = SCORED.format(overall="6.50").removeprefix("# Comprehension history\n\n").replace("2026-10-08", "2026-10-09").replace("aaaaaaa", "bbbbbbb")
self.assertEqual(self.scores(f"{first}\n{rerun}\n{later}")["| 1"], "101.5")
def test_refuses_a_newest_scoring_run_with_no_overall_mean(self):
self.assertEqual(self.scores(SCORED.format(overall="high")), Failure("docs/comprehension-history.md's newest scoring run, 2026-10-08T12:00:00Z, PR #1 at aaaaaaa, has no Mean row ending in its overall"))
self.assertEqual(self.scores(SCORED.format(overall="high")), Failure("docs/comprehension-history.md's scoring run 2026-10-08T12:00:00Z, PR #1 at aaaaaaa has no Mean row ending in its overall"))
def test_drops_code_health_where_readme_voids_it(self):
voided = "## Goals\n\n**Void:** code health, since it is a one-off script.\n\n1. **Achieve:** A.\n"