Answer architecture round 7: decide a fall inside record-ruling with the scoring seats' scores, give the history format one owner in comprehension_history, drop the moved Mean path, and plan the archive and judge restructures in items 83 and 62

This commit is contained in:
2026-10-09 12:22:13 +02:00
parent b02bdd0bf4
commit e694e4154e
17 changed files with 238 additions and 363 deletions
+5 -6
View File
@@ -1,16 +1,15 @@
from larv_review.history import entries, Entry, HistoryChange
from comprehension_history import entries, Entry
from larv_review.git import HistoryChange
def measured_commit(changes: list[HistoryChange]) -> str | None:
"""The newest change, of changes given newest first, whose last added paired ruling is better, or that adds a scoring run and whose last added paired ruling names no fall."""
"""The newest change, of changes given newest first, that adds a scoring run to the history, or whose last added paired ruling is better."""
for change in changes:
held = {entry.heading for entry in entries(change.before)}
added = [entry for entry in entries(change.after) if entry.heading not in held]
rulings = sorted((entry for entry in added if entry.paired), key=lambda entry: entry.time)
last = rulings[-1] if rulings else None
ruled_better = last is not None and last.ruling == "better"
scored_without_fall = any(not entry.paired for entry in added) and not (last and last.fell)
if ruled_better or scored_without_fall:
ruled_better = bool(rulings) and rulings[-1].ruling == "better"
if ruled_better or any(not entry.paired for entry in added):
return change.commit
return None