T7: question: strict direct-GTE and per-TU macro clauses unreachable as counted

This commit is contained in:
Drew T
2026-10-02 17:49:48 -06:00
parent 5c36fb0f26
commit 077e0fd35a
2 changed files with 36 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
# T7 log — GTE to one spelling (attempt 1, returned `question`)
- Start: HEAD 64ea93a7a4; no restruct_cycle running (pgrep).
- `lever_census --check --strict --residue config/lever_residue.tsv` (.run/logs/t7_strict0.log): pins 1868, asm 1409, gte-levers 434, direct GTE statements in bodies 6733, per-TU asm macro definitions 314 {gte 150, launder 154, instruction 9, barrier 1} (GTE variants 64); asm kinds gte/direct 207, gte/via-macro 6256, gte-unsigned/direct 270, gte-lever/direct 346, gte-lever/via-macro 88.
- `gte_consolidate --status` (.run/logs/t7_gte_status.log): 830 rows {CONSOLIDATED 638, REFUSED 53, UNCHANGED 6, SWEPT-all 133}.
- retriever-code (no report file), question: how strict computes direct_gte and pt. Answer:
- lever_census.py:1133 `direct_gte` = cls B, kind in (gte, gte-unsigned), tu != gte_header; no `via` filter → every call of an include/gte_inline.h macro in a .c body counts (6256 of 6733).
- pt (:954) = every asm-bearing #define outside the --gte-header path, any kind (launder/instruction/barrier included); residue TSV cannot cover pt (:1142-1143 synthetic fail).
- gte_consolidate render_header (:398) emits canonical only; variants recorded in JSON, never emitted (T7 must add that).
- Decision: done-when clauses 1-2 as gated are unreachable without a plan change → return `question` before any src edit.
- Clause "0 direct GTE statements" counts the canonical spelling itself (header-macro calls); zero would mean no GTE in bodies, contradicting "call vs inline left per site" and the header being the one spelling.
- Clause "0 per-TU asm macro definitions" includes 164 non-GTE launder/instruction/barrier macros, outside the task's GTE scope and files list.
- No coder spawned, no src/tools edit.
+23
View File
@@ -0,0 +1,23 @@
# T7 — GTE to one spelling
Status: question | expert: expert-opus55 | ctx-at-completion: n/a | commit: see COMMIT | coder runs: none
Done: baseline measured; returned `question`: two done-when clauses, as `lever_census --strict` counts them, are unreachable without a plan change.
Files:
- none (log and summary only)
Decisions:
- No src/tools edit until the done-when reading is settled.
Deviations:
- none
Findings:
- strict baseline (.run/logs/t7_strict0.log): direct GTE statements in bodies 6733 = gte/direct 207 + gte/via-macro 6256 + gte-unsigned 270; per-TU asm macro defs 314 = gte 150 + launder 154 + instruction 9 + barrier 1 (GTE variants 64); gte-levers 434 (346 direct, 88 via variant).
- lever_census.py:1133 direct_gte has no `via` filter: a call of an include/gte_inline.h macro in a body counts as "direct". So 0 means no GTE in any body, which contradicts the task's own "call vs inline left per site" and the header being the one spelling.
- pt (:954) counts every asm-bearing #define outside include/gte_inline.h, any kind; residue TSV cannot cover it (:1142-1143). The 164 non-GTE defs are outside T7's scope and files.
- gte_consolidate render_header (:398) emits canonical definitions only; `variants` (`_m`, `_v<sha4>`) are JSON-only; header-level variants need new code.
- gte_consolidate --status: 830 rows {CONSOLIDATED 638, REFUSED 53, UNCHANGED 6, SWEPT-all 133}.
Gotchas:
- harness: the expert hook denies `sed -n` ranges on tools/*.py; a gate's predicate had to come from retriever-code because `lever_census --help` does not say what "direct GTE statements" counts.
- generalizable: a census that labels sites "via-macro" in its breakdown but counts them in a "direct" gate total makes a done-when written from the total unreachable; read the predicate before planning to zero it.
Research: none (retriever answer inline)
Next task needs: the respawn after the decision: the inline/variant work (207 gte direct, 270 gte-unsigned, 346+88 gte-lever, 150 per-TU GTE defs incl. 64 variants) is needed under any reading.
Verified: not run (status question); baseline `PY tools/lever_census.py --check --strict --residue config/lever_residue.tsv` → FAIL rc 1, counts above (.run/logs/t7_strict0.log)
Full log: phase-ends/current/logs/T7.md