Answer stability round 1: 0 🔴, 1 🟡; pin an old-format ruling and a bullet before any label, start places at the newest scoring run, and word the empty result plainly

This commit is contained in:
2026-10-13 12:44:53 +02:00
parent 7701b0917a
commit fa0b91c260
4 changed files with 12 additions and 9 deletions
+3 -3
View File
@@ -40,7 +40,7 @@ class Place:
@dataclasses.dataclass(frozen=True)
class Entry:
"""One paired ruling, which names the commit it was against and its ruling, or one scoring run, which names neither. The places under a scoring seat's label are scored_places; a ruling recorded before PR #255 holds them too where a fallen dimension called the scoring seats."""
"""One paired ruling, which names the commit it was against and its ruling, or one scoring run, which names neither. The places under a scoring seat's label are scored_places; a ruling recorded before PR #255 may hold them too, under a scoring seat's label."""
heading: str
time: str
commit: str
@@ -104,9 +104,9 @@ def entries(history: str) -> list[Entry]:
def latest_places(history: str) -> str | None:
"""The places seats found hard from the newest entry, by time, that holds scoring seats' places: in it and each later entry, each ruled place opening with a dimension its seat's vote counted as worse, and every scoring seat's place. Each entry's places come under its heading, oldest first; with no such entry, every ruling's count. None when no place counts."""
"""The places seats found hard from the newest entry, by time, that is a scoring run or holds scoring seats' places: in it and each later entry, each ruled place opening with a dimension its seat's vote counted as worse, and every scoring seat's place. Each entry's places come under its heading, oldest first; with no such entry, every ruling's count. None when no place counts."""
found = sorted(entries(history), key=lambda entry: entry.time)
newest = max((index for index, entry in enumerate(found) if entry.scored_places), default=0)
newest = max((index for index, entry in enumerate(found) if not entry.paired or entry.scored_places), default=0)
parts = [placed(entry, worse_places(entry) + labelled_bullets(entry.body, SCORED_PLACES)) for entry in found[newest:]]
return "\n".join(part for part in parts if part) or None