From 2b1393dd9ac106fca4fb35078fa4fcc9d0fe12c8 Mon Sep 17 00:00:00 2001 From: Drew T <50529377+Druthulu@users.noreply.github.com> Date: Fri, 11 Sep 2026 03:17:48 -0600 Subject: [PATCH] =?UTF-8?q?phase-36:=20lever=5Ffree=5Fbody=20refuses=20a?= =?UTF-8?q?=20strip=20that=20unbalances=20block=20comments=20(R43)=20?= =?UTF-8?q?=E2=80=94=20e24=20found=20a=20start=20text=20left=20as=20invali?= =?UTF-8?q?d=20C;=207=20residue=20classes=20had=20been=20silently=20UNSCOR?= =?UTF-8?q?ED,=20now=20named?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/SETUP.md | 1 + tools/delever_search.py | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/SETUP.md b/docs/SETUP.md index 60ade14767..c69fac4b62 100644 --- a/docs/SETUP.md +++ b/docs/SETUP.md @@ -1820,6 +1820,7 @@ CLAIM, not a fact — two were refuted on bytes on 2026-09-10.** classes the pass has judged and not closed. An ALL-families pass (`--families R2 … R26`, `-j 26`) costs ~1.8 s per `--try` and 100–370 candidates per head class; it closed an R12 class in its first minute, so re-running the old families on a moved tree is not redundant. +- **`delever_search.lever_free_body` refuses a strip that unbalances block comments (S104, R43)** — a lever line that OPENS a `/* …` comment continuing onto the next line was deleted whole, leaving the comment's tail as code; the start text never compiled and every sweep read the class as UNSCORED. Known-true: e24's pre-bank func_80180E24 now refuses; negative control over the whole residue: 709 ok, 16 other refusals, 7 comment refusals — each checked to be a real `/* …` lever line. - **`tools/alloc_table.py` prints the INTEGER priority (S104)** — `global.c:594-603` stores it in a `register int` (truncated) and breaks ties by allocno number (`:607`); equal integers are flagged `TIE`. The float column hid e12/e14's closes (245.6 vs 245.2). Known-true: e14's `func_8017BEBC` lever-free dumps show the two `&g.sz` pseudos at 245 TIE. - **`delever_pack.related_bodies` for main (S104):** main's units are `src/800*.c`, not `src/main/` — the search now falls back to the target TU's directory; every main pack's `related.txt` had been empty (e3: the answers were same-TU siblings sharing a global). Known-true: `func_80036FB0`'s pack now lists 7 bodies sharing `D_8006AEE8`/`D_80078F10`. - **Marked ordinary-C fakes (S104, Drew's ruling (a)):** a `// !FAKE:` on a `do { … } while (0)` line or a `!FAKE: diff --git a/tools/delever_search.py b/tools/delever_search.py index 0579130b38..fd7455695e 100644 --- a/tools/delever_search.py +++ b/tools/delever_search.py @@ -308,9 +308,14 @@ def lever_free_body(tu, raw, fn, sites): if not edits: return raw try: - return dl.apply_edits(raw, edits) + out = dl.apply_edits(raw, edits) except dl.Refuse as ex: raise Unstrippable([("", 0, str(ex)[:120])]) + # R43 (S104 e24, func_80180E24): a deleted lever line that OPENED a multi-line comment left the comment's tail as code — the + # start text did not compile, and every sweep read the class as UNSCORED, never as refused. Refuse instead. + if out.count("/*") - out.count("*/") != raw.count("/*") - raw.count("*/"): + raise Unstrippable([("", 0, "a stripped lever line opened or closed a block comment")]) + return out def load_outcomes():