From a2a1665f652177d7a151191985a03d40ee483c9f Mon Sep 17 00:00:00 2001 From: Daniel McCoy Stephenson Date: Wed, 29 Jul 2026 02:50:33 -0600 Subject: [PATCH] Bound Step 4 substitution-table scan by heading, not a fixed byte window MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit check_docs.py read the table through a hardcoded 8000-byte window with only ~230 bytes of headroom against the current template. A row falling outside the window silently drops from `declared`, so CI reports a placeholder as missing a row even though the row exists — the wrong failure message pointing at the wrong problem. Scan to the next `### ` heading instead so the section boundary tracks the template's actual structure as it grows. Closes #80 Co-Authored-By: Claude Sonnet 5 --- scripts/check_docs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/check_docs.py b/scripts/check_docs.py index e574c97..70896cb 100755 --- a/scripts/check_docs.py +++ b/scripts/check_docs.py @@ -60,7 +60,8 @@ def check_placeholders(text: str, template_body: str) -> None: if table_start == -1: errors.append("Could not find the '### 4 — Fill in the placeholders' section.") return - table_section = text[table_start:table_start + 8000] + next_heading = text.find("\n### ", table_start + 1) + table_section = text[table_start:next_heading if next_heading != -1 else len(text)] declared = set() for line in table_section.splitlines():