Count the line outside the f-string so Python 3.11 still parses the script

This commit is contained in:
2026-09-26 15:07:32 +02:00
parent 9c797dea94
commit 186181a25a
3 changed files with 7 additions and 1 deletions
+1
View File
@@ -11,3 +11,4 @@ Decisions live in `docs/decisions.md`:
- comprehension floor: the 2026-09-25 four-seat score is the ratchet, and 0.1.0 waits on what caps it
- larv-review: a re-entered loop takes a fresh round cap
- vocabulary: the concept words are defined under `CLAUDE.md` → "Vocabulary" and cited by a bare link
- loop-claude: a CR-only README.md is reported at line 1
+2 -1
View File
@@ -166,7 +166,8 @@ def read_premises(root):
except OSError as failure:
sys.exit(f"README.md in {root}: {failure.strerror} - no premises.")
except UnicodeDecodeError as failure:
sys.exit(f"README.md is not UTF-8 on line {failure.object[:failure.start].count(b'\n') + 1} - no premises.")
line = failure.object.count(b"\n", 0, failure.start) + 1
sys.exit(f"README.md is not UTF-8 on line {line} - no premises.")
for name in ("Goals", "Audience"):
bodies = found.get(name, [])
if not bodies:
+4
View File
@@ -35,3 +35,7 @@
## loop-claude: a reload into an older file is unsupported
2026-09-26, lilleman. Serves goal 4. A running loop whose `bin/loop-claude` on disk is rolled back to a version with an older handover dies with a traceback in that older file, which this version cannot change; the human who rolled it back reruns `loop-claude <task>`. Valid while nobody but the developer runs it: other team members running it while it is still developed reopens this.
## loop-claude: a CR-only README.md is reported at line 1
2026-09-26, larv-review. Serves goal 4. The line of a non-UTF-8 byte counts `\n`, so a file with classic-Mac `\r` endings reports line 1 whatever line an editor shows; no machine the audience runs writes such a file. Valid while the audience is the author's own machines.