Answer architecture round 4: count a repeated round number, move larv-review's record commands to record.py, give the UTC stamp and the blockquote one home each, check the history's sample entry, and state why a split and a fall call more seats

This commit is contained in:
2026-10-09 15:01:29 +02:00
parent 8f02d11096
commit b2a277b642
21 changed files with 233 additions and 209 deletions
+3 -4
View File
@@ -1,10 +1,10 @@
import dataclasses
import decimal
import re
import time
from failure import Failure
from markdown_sections import sections
from markdown_text import sections
from utc_stamp import utc
ARCHITECT = "Inherited architect"
DECIDED_BY = "decided by"
@@ -22,7 +22,6 @@ RULING = re.compile(r"^Ruling: (better|same|worse)$", re.M)
RULED_PLACES = re.compile(rf"^.+, {DECIDED_BY}:$")
SCORED_PLACES = re.compile(rf"^.+, ({HARDEST_FIRST}|{RESTRUCTURE_FIRST}):$")
SENIOR = "Maintainability senior"
STAMP = "%Y-%m-%dT%H:%M:%SZ"
TITLE = "# Comprehension history\n"
@@ -135,7 +134,7 @@ def bullet_places(bullet: str) -> list[Place]:
def heading(at: float, read: str, paired: bool) -> Heading | Failure:
"""An entry's heading, matched by HEADING: when the seats finished, in UTC, and what they read."""
title = f"{time.strftime(STAMP, time.gmtime(at))}, {read}"
title = f"{utc(at)}, {read}"
if (named := HEADING.match(title)) and bool(named.group(4)) == paired:
return Heading(title, named.group(2), named.group(3), named.group(4))
return Failure(f"the seats file's first line is not `<PR or branch> at <commit>{', against <base>' if paired else ''}`: {read}")