From 6733615e1c7fc1915be3ca75d17f0c8c64e15dae Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 23 Oct 2026 05:09:15 +0200 Subject: [PATCH] =?UTF-8?q?Answer=20principles=20round=202:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=200=20=F0=9F=9F=A1;=20approved,=20file=20item=202?= =?UTF-8?q?21=20and=20fix=20two=20blank-line=20nits?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/claude_code/test_claude_code.py | 1 + bin/loop_claude/test_loop_claude.py | 1 - todo.md | 7 ++++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/claude_code/test_claude_code.py b/bin/claude_code/test_claude_code.py index 3b63cd77..53f26966 100644 --- a/bin/claude_code/test_claude_code.py +++ b/bin/claude_code/test_claude_code.py @@ -46,6 +46,7 @@ class Verbatim(unittest.TestCase): self.assertFalse(transcript.verbatim("Merge ... squash.", "Merge ff-only.\nNever squash.")) self.assertFalse(transcript.verbatim("", "Merge ff-only.")) + class FirstTimestampedLine(unittest.TestCase): def test_skips_the_lines_every_chunk_shares_and_else_takes_the_first(self): self.assertEqual(transcript.first_timestamped_line(b'{"type": "custom-title"}\nnot JSON\n{"timestamp": "t"}\n{"timestamp": "u"}\n'), b'{"timestamp": "t"}') diff --git a/bin/loop_claude/test_loop_claude.py b/bin/loop_claude/test_loop_claude.py index 1d8ffe62..89fc845e 100644 --- a/bin/loop_claude/test_loop_claude.py +++ b/bin/loop_claude/test_loop_claude.py @@ -1341,7 +1341,6 @@ class Grounded(unittest.TestCase): self.assertFalse(judge.grounded("... …", transcript)) - class Verdict(unittest.TestCase): def test_needs_every_field_the_schema_requires(self): self.assertEqual(verdict_from({"highest_likelihood_taken_in": 0, "highest_escape_and_impact_taken_in": 0, "escalation": "", "answer": "", "interrupt": False, "evidence": "e", "finished": True, "question": "", "release_ready": False}), Finished("e")) diff --git a/todo.md b/todo.md index 20af80d9..e677698b 100644 --- a/todo.md +++ b/todo.md @@ -6,7 +6,7 @@ `Bar = 0.1` -`Next ID = 221` +`Next ID = 222` ## Items @@ -34,6 +34,7 @@ | 175 | 0.5.0 | | | **Compare the first five chunks loop-claude starts with `chunk-preflight` against the five before them, and file an item where the preflight did not pay off.** | 1 | 2 | 1 | 2 | 2 | 1.4 by 3, 1.5 by 3 | 7.8 | | 183 | 0.5.0 | | | **Merge the two 2026-10-13 paragraphs of `docs/decisions.md` → `loop-claude: a judge decides each interrupt …` into one.** | 1 | 1 | 1 | 1 | 1 | code health by 1 | 7.2 | | 184 | 0.5.0 | | | **Rewrap the lines of `loop-claude --help` that run past the column the rest of it wraps at.** | 1 | 1 | 1 | 1 | 1 | code health by 1 | 7.2 | +| 221 | 0.5.0 | | | **Parse each transcript entry once, where `bin/claude_code/transcript.py` reads it, into a typed value naming its kind, so no consumer works out an entry's kind from a raw `dict`.** | 3 | 1 | 3 | 5 | 5 | code health by 4 | 7.2 | | 116 | 0.5.0 | | | **Report L by the share of chunks with a 🔴, once 10 chunks that each shipped one item record finding counts and most record no 🔴.** | 1 | 1 | 2 | 2 | 2 | 1.1 by 5 | 7.0 | | 203 | 0.5.0 | | | **Make `bin/repo_checks` fail on a `todo.md` citation of a `docs/decisions.md` title that no heading holds.** | 1 | 1 | 1 | 1 | 2 | 1.1 by 5 | 7.0 | | 113 | 0.5.0 | | | **Compute an item's S from the code it names, where it names any, and show it beside the finished items `score-outcomes` lists.** | 3 | 2 | 2 | 5 | 4 | 1.1 by 5, 1.4 by 5 | 6.8 | @@ -167,6 +168,10 @@ They say the same thing for `~/.claude/rules/` (item 95) and `~/.claude/skills/l In `bin/loop_claude/loop/main.py`'s docstring, the line holding "of one PR, is finished" and the one ending "Each of these opens with its UTC time." run to 107 and 159 columns. Raised by the prose review of PR #308. +### 221. Parse each transcript entry once, where `bin/claude_code/transcript.py` reads it, into a typed value naming its kind, so no consumer works out an entry's kind from a raw `dict`. + +"Validate data and build DTOs as early as possible", in `principles/technical-principles.md`, raised 🟢 by the principles audit of item 210's PR. `read_transcript` (`bin/claude_code/transcript.py:16`) returns raw `dict`s, and the helpers in `bin/claude_code/entries.py` (`human_text`, `loop_text`, `assistant_parts`, `tool_call`) work out an entry's kind each time a consumer asks, as `render` and `escalation_mark.since_step` (`bin/loop_claude/escalation_mark.py`) do. Parse each line once into types such as a human turn, a loop-claude prompt and an assistant turn, and have every consumer of `claude_code.entries` under `bin/` take those types. The change touches the escalation mark the comprehension seats found hard in `bin/loop_claude/cycle/judge.py` (`escalation_mark`, `Grounds.since_step`): make that place easier to read. + ### 116. Report L by the share of chunks with a 🔴, once 10 chunks that each shipped one item record finding counts and most record no 🔴. `score-outcomes` reports the median 🔴 count at each guessed R, and how well L orders chunks by 🔴 findings; the part of R a 🔴 tests is L. Where most chunks have no 🔴, every median reads 0 and the rank correlation rests on the few that have one, which tells a scorer little. No round title held counts before PR #254, so how often a chunk has a 🔴 is not yet known.