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
+15 -3
View File
@@ -54,16 +54,28 @@ def record_scoring(default: str, scores_file: pathlib.Path, ids: list[int]) -> F
def rerank() -> Failure | None:
"""Rank the checkout's todo.md again, since the overall sets code health's weight."""
"""Rank the checkout's todo.md again, since the overall sets code health's weight. The run stays recorded whatever happens, so a failure says to rank todo.md, not to record the run again."""
checkout = top()
if isinstance(checkout, Failure):
return checkout
todo = pathlib.Path(checkout, "todo.md")
if rank_todo.main([str(todo)]):
return Failure(f"recorded the run, but rank_todo.py exited 1 on {todo}, saying why above; settle that before committing the run")
texts = rank_todo.read_all(todo)
if isinstance(texts, Failure):
return unranked(todo, texts)
ranked = rank_todo.rank(*texts)
if isinstance(ranked, Failure):
return unranked(todo, ranked)
if ranked.text != texts[0] and (unwritten := rank_todo.write(todo, ranked.text)):
return Failure(f"recorded the run, but {unwritten.reason}; run rank_todo.py on {todo}")
for line in ranked.notes + ranked.under_bar:
print(f"{todo}: {line}")
return None
def unranked(todo: pathlib.Path, why: Failure) -> Failure:
return Failure(f"recorded the run, but rank_todo.py cannot rank {todo}: {why.reason}. Repair it and run rank_todo.py on it, not record-scoring again")
def scored_seats(given: SeatsFile) -> ScoringRun | Failure:
found = scores(given.seats)
if isinstance(found, Failure):