tools(phase-37): restruct defs_visible indexes the shared headers a sibling TU includes — t4_D21's 10,495 'external' DECL-NONE rows were the binary's own shared-header functions (func_80147514-shaped); the killed t4_D22 erased (6 files reverted, 197 orphan rows dropped); cycle relaunched with REDRAW=DECL-NONE | 🛑 T4 in progress (S108)

This commit is contained in:
Drew T
2026-09-12 14:57:23 -06:00
parent a6ea4252fd
commit e031245825
5 changed files with 39 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
delever_oracle --calibrate main md_SC07_004 ov_SC03_015 ov_SC04_011: 146/146 objects byte-identical untouched; twin checks 32 (0 mismatch); positive control DIFFERS on build/src/800.o; 2.7 s — OK
main 85/85 identical, mean 0.103 s per object
md_SC07_004 1/1 identical, mean 0.548 s per object
ov_SC03_015 32/32 identical, mean 0.155 s per object
ov_SC04_011 28/28 identical, mean 0.145 s per object
+7
View File
@@ -1,2 +1,9 @@
cycle: batch t4_D21 wrote no file — restruct: batch t4_D21 rung D — 300 files (TUs; 3877 drawable) · 0 declaration units: 0 canonical / 0 promoted / 0 K&R marked / 0 aliases typed / 0 __builtin_abs → abs / 0 kept · compiles 0 in 259 s wall · final 300/300 identical · written 0 files
log: t4_D21
cycle: batch t4_D21 committed a6ea4252f — restruct: batch t4_D21 rung D — 300 files (TUs; 3877 drawable) · 0 declaration units: 0 canonical / 0 promoted / 0 K&R marked / 0 aliases typed / 0 __builtin_abs → abs / 0 kept · compiles 0 in 259 s wall · final 300/300 identical · written 0 files | check-all: 218 passed, 0 failed of 218
cycle: batch t4_D22 — restruct exited non-zero
KeyboardInterrupt
Command terminated by signal 2
t4_D22 wall=133.02 s
exit=130
cycle exit=1
+1
View File
@@ -0,0 +1 @@
delever_oracle --snapshot-baseline: 7428 object(s) under .run/P36/delever/baseline at a6ea4252f; link inputs for 218/218 binaries under .run/P36/delever/baseline/_link (links.json)
+18
View File
@@ -460,6 +460,24 @@ bucketed by what each bucket needs before any plan is proposed. **Candidates for
- **2026-09-12 — T4 batch `t4_D21`** (`.run/P37/restruct/run_t4_D21.log`, `batch_t4_D21.json`): `restruct: batch t4_D21 rung D — 300 files (TUs; 3877 drawable) · 0 declaration units: 0 canonical / 0 promoted / 0 K&R marked / 0 aliases typed / 0 __builtin_abs → abs / 0 kept · compiles 0 in 259 s wall · final 300/300 identical · written 0 files` → R22 (`.run/P37/baseline/r22_t4_D21.log`) **`check-all: 218 passed, 0 failed of 218`** (`wall=87.91 s`) → census `(census skipped)`.
- **S108 — T4 batch `t4_D21` = the DECL-NONE test: FAILED the test, and the failure was the INSTRUMENT (R40).** `restruct: batch t4_D21 rung D —
300 files (TUs; 3877 drawable) · 0 declaration units … compiles 0 in 259 s wall · final 300/300 identical · written 0 files` → R22 `check-all:
218 passed, 0 failed of 218` → committed `a6ea4252f` by the cycle (0 files; 11,885 `DECL-NONE` rows: 10,495 "no visible definition (external
to this TU's binary…)", 1,387 "already canonical", 3 K&R). Read against the tree (R14): `func_80147514` — DECL-NONE in all 300 TUs — is
defined in `src/shared/ov/func_80147514.h`, included by the binary's own `ov_SC05_000_after.c`. **`defs_visible` indexed the sibling TUs'
bodies but not the shared headers the siblings include — and since P35 every shared body IS such a header, so a binary's own shared
functions read as external.** The class was invisible to D1–D20 too (before the DECL-NONE settling those callees were silently not units,
never touched — the lying declarations of shared-header-defined functions across the fleet are still owed). Fixed at the cause: a sibling
TU's headers join the index (`defs_visible`); known-true: the three sample callees now resolve to their `src/shared/ov/*.h` definitions
with units, `skipped {}`. **My own race on the way (recorded, not repeated):** I sent `kill -INT` to the D22 judge and ran `--restore`
8 s later while the judge was still unwinding (it honours the SIGINT only after its in-flight units — ~2 min); the restore consumed
`inflight.json` and dropped 1,321 rows, the judge then wrote 6 more files and 197 rows with no tool-side restore left. Recovery: the 6
files (declaration rewrites only, IDENTICAL-judged, but a killed batch's unbanked candidate text) reverted to HEAD by an operator
`git checkout` — stated here (R102 governs tools; R42's banked work is not at issue) — and the 197 orphan rows dropped (`ledger.jsonl` 48,114
→ 47,917; `--check-ledger` 0 violations; `git diff src` empty). **Gotcha for the checkpoint: after `kill -INT`, WAIT for the judge's exit
(`ps`) before `--restore`.** Because `DECL-NONE` is a DONE verdict, D21's 300 TUs are settled on the blindness: the cycle relaunched with
`REDRAW="DECL-NONE"` (batches 22–40) so every such pair is drawn again — the genuinely external ones re-settle at zero compiles.
## 🛑 SESSION CHECKPOINT — S107 (2026-09-12, FINAL — written for a FRESH session at 84 % context; the session's last commit follows this): gate 1 APPROVED, **T0 ☑ T1 ☑ T2 ☑ T3 ☑ — T4 IN PROGRESS (☐)** — 🛑 **T4 NEXT: resume the declaration layer where the cycle stopped (below, §1 "T4 — where it stands and the exact next commands"); xHigh** | R22 `check-all: 218 passed, 0 failed of 218` at `f2b58011e` (every one of the 21 T4 commits carries its own) | HEAD after this commit is the checkpoint's commit; tree clean; nothing pushed after `79b2f6f15` (Drew pushes, R6) | last batch `t4_D21` on 5cbf06f84: 300 files (TUs; 3877 drawable) · 0 declaration units: 0 canonical / 0 promoted / 0 K&R marked / 0 aliases typed / 0 __builtin_abs → abs / 0 kept · compiles 0 in
**Replay this block into the chat at the next session start (R64); it is the ONLY in-phase context the next session inherits. Everything below
+8 -1
View File
@@ -1321,7 +1321,14 @@ def defs_visible(tu):
pass
files = [tu] + sorted(h for h in headers_of(tu) if h in results)
for d_ in sorted(dirs):
files += [rel for rel in _files_in_dir(d_) if rel != tu]
for rel in _files_in_dir(d_):
if rel == tu:
continue
# the sibling TU AND the shared headers it includes: since P35 every shared body is a header included by ONE member TU of
# the binary, so a definition visible to a sibling is a definition this binary links (t4_D21: 10,495 "external" rows were
# func_80147514-shaped — defined in src/shared/ov/, included by the binary's *_after.c, invisible here)
files.append(rel)
files += sorted(h for h in headers_of(rel) if h in results)
out = collections.defaultdict(list)
seen = set()
for rel in files: