mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-09-26 13:33:34 -04:00
phase-36: T4 CLOSE — the mechanical campaign over the whole population: 16,334 bodies judged in 13 gated batches (3,341 lever-free = 20.5 %; 21,063 of 56,445 sites removed or rewritten = 37.3 %; 8,239 replays, 1 disagreement; 49,487 compiles); the file-scope asm statements judged too (batch tus11: 6 barriers NEEDED, 7 .section blocks refused as asm-data and marked); THE NUMBER 53,234 → 33,625 sites (−36.8 %) in 12,501 bodies (1,728 distinct), 33,625 marked, 0 UNMARKED, 0 orphans — lever_census --check OK; the residue 12,967 bodies in 1,803 distinct classes (pins-only 6,018 · pins+asm 4,310 · asm-only 2,141 · C/D-only 498); published by make report (README line 30, progress.json counts.levers, the timeline); kit corpus; the 🛑 block rewritten for T5
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -232,9 +232,9 @@
|
||||
}
|
||||
},
|
||||
"coverage_ok": true,
|
||||
"elapsed_s": 36.8,
|
||||
"elapsed_s": 39.0,
|
||||
"generated": "2026-09-09",
|
||||
"head": "0cb78a6a7",
|
||||
"head": "f087282a3",
|
||||
"headers": 3181,
|
||||
"levers_AB": {
|
||||
"asm": 12979,
|
||||
|
||||
@@ -6,13 +6,13 @@ lever_census: 218 binaries · 4,121 TUs + 3,181 headers · coverage OK · unclas
|
||||
coverage attribute raw 76 = live 76 + macro-block 0 + comment/dead 0
|
||||
class sites in-bodies file-scope bodies distinct TUs marked unmarked kinds
|
||||
A pins 20646 20646 0 10329 1330 2580 20646 0 {'pin': 20646}
|
||||
B asm 22552 22539 13 9758 1054 2289 13155 9397 {'barrier': 4578, 'keepalive': 2000, 'instruction': 1712, 'launder': 4676, 'gte': 6891, 'asm-body': 13, 'verbatim-body': 2682}
|
||||
B asm 22552 22539 13 9758 1054 2289 13155 9397 {'gte': 6891, 'barrier': 4578, 'launder': 4676, 'instruction': 1712, 'keepalive': 2000, 'asm-body': 13, 'verbatim-body': 2682}
|
||||
C volatile 1722 1570 152 628 97 612 14 1708 {'decl-body': 58, 'decl-file': 152, 'cast': 1510, 'param': 2}
|
||||
D register 50 50 0 47 47 6 0 50 {'register': 50}
|
||||
E asm-label 7428 1005 6423 737 117 2080 0 7428 {'asm-label': 7428}
|
||||
F builtin 445 445 0 428 27 302 0 445 {'builtin': 445}
|
||||
G attribute 76 1 75 1 1 40 0 76 {'attribute': 76}
|
||||
UNION A–D: 15,955 bodies · 2,023 distinct (addresses normalized) · 394 multi-copy classes holding 14,326 bodies · by kind {'ov': 15258, 'main': 180, 'shared': 323, 'md': 182, 'resident': 12}
|
||||
UNION A–D: 15,955 bodies · 2,023 distinct (addresses normalized) · 394 multi-copy classes holding 14,326 bodies · by kind {'ov': 15258, 'resident': 12, 'main': 180, 'md': 182, 'shared': 323}
|
||||
THE PHASE'S NUMBER (pins + asm statements, GTE excluded): 33,625 sites in 12,501 bodies (1,728 distinct) · marked !FAKE 33,625 · UNMARKED 0
|
||||
orphan !FAKE markers (no pin/asm site on the line nor below): 0
|
||||
pins: 20,646 · $0 1,321 · $sp 13 · with initializer 2,776 · volatile-qualified 134 · bare-name 25 · spellings {'__asm__': 20544, 'asm': 102}
|
||||
@@ -26,4 +26,4 @@ lever_census: 218 binaries · 4,121 TUs + 3,181 headers · coverage OK · unclas
|
||||
src/shared/ov/func_80178004.h pins got 8 expected 26 N-A
|
||||
ov_SC03_006 func_80184034 bare-name pins got 0 expected 3 N-A
|
||||
engine_prelude.h asm sites (a macro definition only) got 0 expected 0 OK
|
||||
elapsed 36.8 s
|
||||
elapsed 39.0 s
|
||||
|
||||
@@ -27,7 +27,7 @@ originals; nothing "functionally equivalent" counts. What the repository claims
|
||||
|
||||
One source per unique function (Phase 35): 103,015 function bodies written once in C (3,173 of them shared headers instantiated 262,573 times); 160 duplicate copies remain in 51 ledgered classes (declaration conflicts left for the types phase); 38 functions whose bytes vary per binary share one text through the text tier (2,030 sites); 1,668 same-address copies of 381 tiny bodies inside the cross-address classes are deferred to the names phase.
|
||||
|
||||
Levers off (Phase 36, snapshot 2026-09-09): 37,720 register pins and 15,514 asm statements remain in 15,679 functions (2,227 distinct bodies), 0 of them marked `// !FAKE:`; 3,138 volatile qualifiers and 86 bare `register` keywords are censused; 6,891 GTE coprocessor operations and 22 whole-body assembly routines kept inside C shells (2,682 sites; the original's scratchpad stack-switch trampolines, one copy per overlay, listed in the verbatim manifest) are not levers and are excluded.
|
||||
Levers off (Phase 36, snapshot 2026-09-09): 20,646 register pins and 12,979 asm statements remain in 12,501 functions (1,728 distinct bodies), 33,625 of them marked `// !FAKE:`; 1,722 volatile qualifiers and 50 bare `register` keywords are censused; 6,891 GTE coprocessor operations and 22 whole-body assembly routines kept inside C shells (2,682 sites; the original's scratchpad stack-switch trampolines, one copy per overlay, listed in the verbatim manifest) are not levers and are excluded.
|
||||
|
||||
_Generated by `tools/progress.py --readme` from `docs/progress.json` — numbers are never typed by hand._
|
||||
<!-- progress:end -->
|
||||
|
||||
@@ -76,7 +76,9 @@ PROBE = REPO / ".run" / "P36" / "probe"
|
||||
PRELUDE = "src/shared/engine_prelude.h"
|
||||
REMOVABLE = {("A", "pin"), ("B", "barrier"), ("B", "launder"), ("B", "keepalive"), ("B", "instruction"),
|
||||
("C", "cast"), ("C", "decl-body"), ("C", "param"), ("D", "register")}
|
||||
FILE_SCOPE_REMOVABLE = {("C", "decl-file")}
|
||||
FILE_SCOPE_REMOVABLE = {("C", "decl-file"), ("B", "barrier"), ("B", "launder"), ("B", "keepalive"), ("B", "instruction")}
|
||||
# a file-scope asm statement is a TU-level site: a barrier/launder/keep-alive is judged like any other; a `.section` block is a rodata
|
||||
# DEFINITION carried as assembly (asm-data) — data, not a compiler steer: refused with that reason and marked, for T7
|
||||
DEFERRED_KINDS = {"asm-body"} # a whole routine in a C shell: T7's work, marked now (the census counts it as a lever)
|
||||
MARK_KINDS = {"pin", "barrier", "launder", "keepalive", "instruction", "asm-body"} # class A/B survivors carry the marker; C/D never
|
||||
ORDER = {"barrier": 0, "launder": 1, "keepalive": 2, "instruction": 3, "pin": 4, "cast": 5, "decl-body": 6, "param": 6, "register": 7}
|
||||
@@ -417,6 +419,8 @@ def site_edits(raw, m, ls, site, keep_register=False):
|
||||
how, text = launder_rewrite(inner)
|
||||
new = "" if how == "delete" else text
|
||||
elif kind == "instruction":
|
||||
if str(site.get("detail", "")).startswith("."):
|
||||
raise Refuse(f"asm-data: a `{site['detail']}` block defines data as assembly (a rodata carve, not a compiler steer) — T7")
|
||||
new = instruction_to_c(inner, "")
|
||||
if new is None:
|
||||
raise Refuse(f"instruction `{site['detail']}` has no C spelling in the table")
|
||||
@@ -966,7 +970,7 @@ def work_file(tu, bs, recipes_for, pool, exemplars, ledger_ex, label, log, calib
|
||||
try:
|
||||
walk = lc.walk_file(final, tu, is_hdr)
|
||||
nh = {d["name"]: d["nhash"] for d in walk["defs"]}
|
||||
fs_sites = [s for s in walk["sites"] if s["cls"] == "C" and s["kind"] == "decl-file"]
|
||||
fs_sites = [s for s in walk["sites"] if not s.get("fn") and (s["cls"], s["kind"]) in FILE_SCOPE_REMOVABLE]
|
||||
fs_hash = "fs:" + hashlib.sha1("\n".join(s["text"] for s in fs_sites).encode()).hexdigest()
|
||||
for b, row in rows:
|
||||
row["nhash_after"] = fs_hash if b["fn"] == FILE_SCOPE_FN else nh.get(b["fn"])
|
||||
|
||||
+9
-9
@@ -51,15 +51,15 @@
|
||||
"levers": {
|
||||
"date": "2026-09-09",
|
||||
"what": "compiler-forcing constructs left in the C: register pins + asm statements (the classes Phase 36 drives to 0; GTE coprocessor ops and whole-body hand-asm routines excluded), with the volatile/register qualifiers censused",
|
||||
"sites": 53234,
|
||||
"pins": 37720,
|
||||
"asm_statements": 15514,
|
||||
"bodies": 15679,
|
||||
"distinct_bodies": 2227,
|
||||
"marked_fake": 0,
|
||||
"unmarked": 53234,
|
||||
"volatile_sites": 3138,
|
||||
"register_keyword_sites": 86,
|
||||
"sites": 33625,
|
||||
"pins": 20646,
|
||||
"asm_statements": 12979,
|
||||
"bodies": 12501,
|
||||
"distinct_bodies": 1728,
|
||||
"marked_fake": 33625,
|
||||
"unmarked": 0,
|
||||
"volatile_sites": 1722,
|
||||
"register_keyword_sites": 50,
|
||||
"gte_sites": 6891,
|
||||
"hand_asm_routines_in_c_shells": 22,
|
||||
"hand_asm_routine_sites": 2682
|
||||
|
||||
@@ -90,5 +90,6 @@
|
||||
| 2026-09-06 | 36 | P32 (v1.31.0) | 218 | 100.0% | 100.0% | 100.0% | 100.0% | 0 | 789 / 2091 |
|
||||
| 2026-09-07 | 61 | P33 (v1.32.0) | 218 | 100.0% | 100.0% | 100.0% | 100.0% | 0 | — |
|
||||
| 2026-09-08 | 76 | P33.5 (v1.32.1), P34 (v2.0.0), P35 (v2.1.0) | 218 | 100.0% | 100.0% | 100.0% | 100.0% | 0 | — |
|
||||
| 2026-09-09 | 26 | | 218 | 100.0% | 100.0% | 100.0% | 100.0% | 0 | — |
|
||||
|
||||
74 dated rows · phase ticks from the 36 PhaseEnds · the chart: `docs/story-timeline.svg`.
|
||||
75 dated rows · phase ticks from the 36 PhaseEnds · the chart: `docs/story-timeline.svg`.
|
||||
|
||||
+44
-44
@@ -6,54 +6,54 @@
|
||||
<line x1="60" y1="195.0" x2="980" y2="195.0" stroke="#ddd"/><text x="54" y="199.0" text-anchor="end" font-size="11" fill="#555">50%</text>
|
||||
<line x1="60" y1="112.5" x2="980" y2="112.5" stroke="#ddd"/><text x="54" y="116.5" text-anchor="end" font-size="11" fill="#555">75%</text>
|
||||
<line x1="60" y1="30.0" x2="980" y2="30.0" stroke="#ddd"/><text x="54" y="34.0" text-anchor="end" font-size="11" fill="#555">100%</text>
|
||||
<line x1="241.9" y1="30" x2="241.9" y2="360" stroke="#eee"/><text x="241.9" y="376" text-anchor="middle" font-size="11" fill="#555">Jul 2026</text>
|
||||
<line x1="573.5" y1="30" x2="573.5" y2="360" stroke="#eee"/><text x="573.5" y="376" text-anchor="middle" font-size="11" fill="#555">Aug 2026</text>
|
||||
<line x1="905.1" y1="30" x2="905.1" y2="360" stroke="#eee"/><text x="905.1" y="376" text-anchor="middle" font-size="11" fill="#555">Sep 2026</text>
|
||||
<line x1="239.8" y1="30" x2="239.8" y2="360" stroke="#eee"/><text x="239.8" y="376" text-anchor="middle" font-size="11" fill="#555">Jul 2026</text>
|
||||
<line x1="567.6" y1="30" x2="567.6" y2="360" stroke="#eee"/><text x="567.6" y="376" text-anchor="middle" font-size="11" fill="#555">Aug 2026</text>
|
||||
<line x1="895.4" y1="30" x2="895.4" y2="360" stroke="#eee"/><text x="895.4" y="376" text-anchor="middle" font-size="11" fill="#555">Sep 2026</text>
|
||||
<line x1="60.0" y1="360" x2="60.0" y2="352" stroke="#888"/>
|
||||
<line x1="60.0" y1="360" x2="60.0" y2="352" stroke="#888"/>
|
||||
<line x1="60.0" y1="360" x2="60.0" y2="352" stroke="#888"/>
|
||||
<line x1="60.0" y1="360" x2="60.0" y2="352" stroke="#888"/>
|
||||
<line x1="60.0" y1="360" x2="60.0" y2="352" stroke="#888"/>
|
||||
<line x1="70.7" y1="360" x2="70.7" y2="352" stroke="#888"/>
|
||||
<line x1="70.7" y1="360" x2="70.7" y2="352" stroke="#888"/>
|
||||
<text x="70.7" y="390" text-anchor="middle" font-size="10" fill="#333">P7</text>
|
||||
<line x1="70.7" y1="360" x2="70.7" y2="352" stroke="#888"/>
|
||||
<line x1="70.7" y1="360" x2="70.7" y2="352" stroke="#888"/>
|
||||
<line x1="81.4" y1="360" x2="81.4" y2="352" stroke="#888"/>
|
||||
<line x1="81.4" y1="360" x2="81.4" y2="352" stroke="#888"/>
|
||||
<line x1="81.4" y1="360" x2="81.4" y2="352" stroke="#888"/>
|
||||
<line x1="102.8" y1="360" x2="102.8" y2="352" stroke="#888"/>
|
||||
<text x="102.8" y="390" text-anchor="middle" font-size="10" fill="#333">P15</text>
|
||||
<line x1="113.5" y1="360" x2="113.5" y2="352" stroke="#888"/>
|
||||
<line x1="124.2" y1="360" x2="124.2" y2="352" stroke="#888"/>
|
||||
<line x1="124.2" y1="360" x2="124.2" y2="352" stroke="#888"/>
|
||||
<line x1="124.2" y1="360" x2="124.2" y2="352" stroke="#888"/>
|
||||
<line x1="134.9" y1="360" x2="134.9" y2="352" stroke="#888"/>
|
||||
<line x1="188.4" y1="360" x2="188.4" y2="352" stroke="#888"/>
|
||||
<line x1="220.5" y1="360" x2="220.5" y2="352" stroke="#888"/>
|
||||
<line x1="252.6" y1="360" x2="252.6" y2="352" stroke="#888"/>
|
||||
<text x="252.6" y="390" text-anchor="middle" font-size="10" fill="#333">P23</text>
|
||||
<line x1="316.7" y1="360" x2="316.7" y2="352" stroke="#888"/>
|
||||
<line x1="348.8" y1="360" x2="348.8" y2="352" stroke="#888"/>
|
||||
<line x1="391.6" y1="360" x2="391.6" y2="352" stroke="#888"/>
|
||||
<text x="391.6" y="390" text-anchor="middle" font-size="10" fill="#333">P26</text>
|
||||
<line x1="391.6" y1="360" x2="391.6" y2="352" stroke="#888"/>
|
||||
<line x1="402.3" y1="360" x2="402.3" y2="352" stroke="#888"/>
|
||||
<line x1="552.1" y1="360" x2="552.1" y2="352" stroke="#888"/>
|
||||
<text x="552.1" y="390" text-anchor="middle" font-size="10" fill="#333">P29</text>
|
||||
<line x1="712.6" y1="360" x2="712.6" y2="352" stroke="#888"/>
|
||||
<text x="712.6" y="390" text-anchor="middle" font-size="10" fill="#333">P30</text>
|
||||
<line x1="947.9" y1="360" x2="947.9" y2="352" stroke="#888"/>
|
||||
<text x="947.9" y="390" text-anchor="middle" font-size="10" fill="#333">P31</text>
|
||||
<line x1="958.6" y1="360" x2="958.6" y2="352" stroke="#888"/>
|
||||
<text x="958.6" y="390" text-anchor="middle" font-size="10" fill="#333">P32</text>
|
||||
<line x1="969.3" y1="360" x2="969.3" y2="352" stroke="#888"/>
|
||||
<line x1="980.0" y1="360" x2="980.0" y2="352" stroke="#888"/>
|
||||
<line x1="980.0" y1="360" x2="980.0" y2="352" stroke="#888"/>
|
||||
<line x1="980.0" y1="360" x2="980.0" y2="352" stroke="#888"/>
|
||||
<line x1="466.5" y1="30" x2="466.5" y2="360" stroke="#c33" stroke-dasharray="4,3"/><text x="470.5" y="44" font-size="11" fill="#c33">2026-07-22: main enters the denominators</text>
|
||||
<polyline fill="none" stroke="#1f77b4" stroke-width="2" points="348.8,169.4 359.5,152.3 370.2,149.5 380.9,133.5 391.6,135.5 402.3,125.8 413.0,122.1 423.7,111.7 434.4,108.2 445.1,102.6 455.8,102.5 466.5,100.5 477.2,98.1 487.9,96.3 498.6,94.1 509.3,90.4 520.0,81.5 530.7,74.4 541.4,72.3 552.1,68.9 562.8,65.8 573.5,55.0 594.9,50.8 605.6,48.1 616.3,46.5 627.0,49.7 637.7,50.5 669.8,48.7 680.5,47.0 691.2,46.0 701.9,45.9 712.6,45.5 723.3,44.8 734.0,44.6 744.7,43.6 755.3,42.9 808.8,42.8 830.2,38.6 840.9,34.9 851.6,34.2 873.0,33.6 883.7,33.3 894.4,32.1 905.1,31.6 915.8,31.0 926.5,30.9 937.2,30.1 947.9,30.0 958.6,30.0 969.3,30.0 980.0,30.0"/><text x="70" y="352" font-size="12" fill="#1f77b4">instruction-weighted (all binaries)</text>
|
||||
<polyline fill="none" stroke="#2ca02c" stroke-width="2" points="348.8,263.2 359.5,230.9 370.2,225.5 380.9,197.6 391.6,196.8 402.3,184.2 413.0,181.7 423.7,159.9 434.4,152.9 445.1,140.5 455.8,140.4 466.5,136.8 477.2,136.7 487.9,136.7 498.6,134.8 509.3,131.5 520.0,114.5 530.7,106.2 541.4,103.4 552.1,100.4 562.8,94.4 573.5,77.8 594.9,69.5 605.6,65.5 616.3,64.8 627.0,70.9 637.7,72.4 669.8,69.1 680.5,65.6 691.2,63.7 701.9,63.3 712.6,62.7 723.3,61.3 734.0,60.8 744.7,58.5 755.3,57.0 808.8,56.9 830.2,47.8 840.9,40.3 851.6,38.8 873.0,37.9 883.7,37.4 894.4,34.8 905.1,33.8 915.8,32.2 926.5,32.0 937.2,30.3 947.9,30.1 958.6,30.0 969.3,30.0 980.0,30.0"/><text x="70" y="338" font-size="12" fill="#2ca02c">distinct code (each body once)</text>
|
||||
<polyline fill="none" stroke="#999" stroke-width="2" points="81.4,276.3 92.1,190.3 102.8,180.2 113.5,176.8 124.2,167.4 134.9,163.1 145.6,158.2 156.3,154.4 167.0,151.7 177.7,151.5 188.4,149.9 220.5,149.9 231.2,148.1 241.9,146.8 252.6,146.0 263.3,143.4 274.0,143.0 306.0,142.1 316.7,122.3 327.4,121.4 338.1,114.5 348.8,113.9 359.5,88.6 370.2,88.1 380.9,81.9 391.6,87.3 402.3,75.2 413.0,74.3 423.7,72.8 434.4,71.4 445.1,69.9 455.8,69.8 466.5,68.9 477.2,67.4 487.9,66.4 498.6,65.7 509.3,64.6 520.0,62.5 530.7,59.3 541.4,57.3 552.1,54.5 562.8,52.3 573.5,45.1 594.9,42.9 605.6,41.5 616.3,41.1 627.0,43.3 637.7,44.2 669.8,42.5 680.5,41.8 691.2,41.5 701.9,41.3 712.6,40.9 723.3,40.4 734.0,40.2 744.7,39.8 755.3,39.5 808.8,39.5 830.2,35.3 840.9,32.1 851.6,31.6 873.0,31.2 883.7,30.9 894.4,30.4 905.1,30.2 915.8,30.1 926.5,30.0 937.2,30.0 947.9,30.0 958.6,30.0 969.3,30.0 980.0,30.0"/><text x="70" y="324" font-size="12" fill="#999">function count</text>
|
||||
<line x1="70.6" y1="360" x2="70.6" y2="352" stroke="#888"/>
|
||||
<line x1="70.6" y1="360" x2="70.6" y2="352" stroke="#888"/>
|
||||
<text x="70.6" y="390" text-anchor="middle" font-size="10" fill="#333">P7</text>
|
||||
<line x1="70.6" y1="360" x2="70.6" y2="352" stroke="#888"/>
|
||||
<line x1="70.6" y1="360" x2="70.6" y2="352" stroke="#888"/>
|
||||
<line x1="81.1" y1="360" x2="81.1" y2="352" stroke="#888"/>
|
||||
<line x1="81.1" y1="360" x2="81.1" y2="352" stroke="#888"/>
|
||||
<line x1="81.1" y1="360" x2="81.1" y2="352" stroke="#888"/>
|
||||
<line x1="102.3" y1="360" x2="102.3" y2="352" stroke="#888"/>
|
||||
<text x="102.3" y="390" text-anchor="middle" font-size="10" fill="#333">P15</text>
|
||||
<line x1="112.9" y1="360" x2="112.9" y2="352" stroke="#888"/>
|
||||
<line x1="123.4" y1="360" x2="123.4" y2="352" stroke="#888"/>
|
||||
<line x1="123.4" y1="360" x2="123.4" y2="352" stroke="#888"/>
|
||||
<line x1="123.4" y1="360" x2="123.4" y2="352" stroke="#888"/>
|
||||
<line x1="134.0" y1="360" x2="134.0" y2="352" stroke="#888"/>
|
||||
<line x1="186.9" y1="360" x2="186.9" y2="352" stroke="#888"/>
|
||||
<line x1="218.6" y1="360" x2="218.6" y2="352" stroke="#888"/>
|
||||
<line x1="250.3" y1="360" x2="250.3" y2="352" stroke="#888"/>
|
||||
<text x="250.3" y="390" text-anchor="middle" font-size="10" fill="#333">P23</text>
|
||||
<line x1="313.8" y1="360" x2="313.8" y2="352" stroke="#888"/>
|
||||
<line x1="345.5" y1="360" x2="345.5" y2="352" stroke="#888"/>
|
||||
<line x1="387.8" y1="360" x2="387.8" y2="352" stroke="#888"/>
|
||||
<text x="387.8" y="390" text-anchor="middle" font-size="10" fill="#333">P26</text>
|
||||
<line x1="387.8" y1="360" x2="387.8" y2="352" stroke="#888"/>
|
||||
<line x1="398.4" y1="360" x2="398.4" y2="352" stroke="#888"/>
|
||||
<line x1="546.4" y1="360" x2="546.4" y2="352" stroke="#888"/>
|
||||
<text x="546.4" y="390" text-anchor="middle" font-size="10" fill="#333">P29</text>
|
||||
<line x1="705.1" y1="360" x2="705.1" y2="352" stroke="#888"/>
|
||||
<text x="705.1" y="390" text-anchor="middle" font-size="10" fill="#333">P30</text>
|
||||
<line x1="937.7" y1="360" x2="937.7" y2="352" stroke="#888"/>
|
||||
<text x="937.7" y="390" text-anchor="middle" font-size="10" fill="#333">P31</text>
|
||||
<line x1="948.3" y1="360" x2="948.3" y2="352" stroke="#888"/>
|
||||
<text x="948.3" y="390" text-anchor="middle" font-size="10" fill="#333">P32</text>
|
||||
<line x1="958.9" y1="360" x2="958.9" y2="352" stroke="#888"/>
|
||||
<line x1="969.4" y1="360" x2="969.4" y2="352" stroke="#888"/>
|
||||
<line x1="969.4" y1="360" x2="969.4" y2="352" stroke="#888"/>
|
||||
<line x1="969.4" y1="360" x2="969.4" y2="352" stroke="#888"/>
|
||||
<line x1="461.8" y1="30" x2="461.8" y2="360" stroke="#c33" stroke-dasharray="4,3"/><text x="465.8" y="44" font-size="11" fill="#c33">2026-07-22: main enters the denominators</text>
|
||||
<polyline fill="none" stroke="#1f77b4" stroke-width="2" points="345.5,169.4 356.1,152.3 366.7,149.5 377.2,133.5 387.8,135.5 398.4,125.8 409.0,122.1 419.5,111.7 430.1,108.2 440.7,102.6 451.3,102.5 461.8,100.5 472.4,98.1 483.0,96.3 493.6,94.1 504.1,90.4 514.7,81.5 525.3,74.4 535.9,72.3 546.4,68.9 557.0,65.8 567.6,55.0 588.7,50.8 599.3,48.1 609.9,46.5 620.5,49.7 631.0,50.5 662.8,48.7 673.3,47.0 683.9,46.0 694.5,45.9 705.1,45.5 715.6,44.8 726.2,44.6 736.8,43.6 747.4,42.9 800.2,42.8 821.4,38.6 832.0,34.9 842.5,34.2 863.7,33.6 874.3,33.3 884.8,32.1 895.4,31.6 906.0,31.0 916.6,30.9 927.1,30.1 937.7,30.0 948.3,30.0 958.9,30.0 969.4,30.0 980.0,30.0"/><text x="70" y="352" font-size="12" fill="#1f77b4">instruction-weighted (all binaries)</text>
|
||||
<polyline fill="none" stroke="#2ca02c" stroke-width="2" points="345.5,263.2 356.1,230.9 366.7,225.5 377.2,197.6 387.8,196.8 398.4,184.2 409.0,181.7 419.5,159.9 430.1,152.9 440.7,140.5 451.3,140.4 461.8,136.8 472.4,136.7 483.0,136.7 493.6,134.8 504.1,131.5 514.7,114.5 525.3,106.2 535.9,103.4 546.4,100.4 557.0,94.4 567.6,77.8 588.7,69.5 599.3,65.5 609.9,64.8 620.5,70.9 631.0,72.4 662.8,69.1 673.3,65.6 683.9,63.7 694.5,63.3 705.1,62.7 715.6,61.3 726.2,60.8 736.8,58.5 747.4,57.0 800.2,56.9 821.4,47.8 832.0,40.3 842.5,38.8 863.7,37.9 874.3,37.4 884.8,34.8 895.4,33.8 906.0,32.2 916.6,32.0 927.1,30.3 937.7,30.1 948.3,30.0 958.9,30.0 969.4,30.0 980.0,30.0"/><text x="70" y="338" font-size="12" fill="#2ca02c">distinct code (each body once)</text>
|
||||
<polyline fill="none" stroke="#999" stroke-width="2" points="81.1,276.3 91.7,190.3 102.3,180.2 112.9,176.8 123.4,167.4 134.0,163.1 144.6,158.2 155.2,154.4 165.7,151.7 176.3,151.5 186.9,149.9 218.6,149.9 229.2,148.1 239.8,146.8 250.3,146.0 260.9,143.4 271.5,143.0 303.2,142.1 313.8,122.3 324.4,121.4 334.9,114.5 345.5,113.9 356.1,88.6 366.7,88.1 377.2,81.9 387.8,87.3 398.4,75.2 409.0,74.3 419.5,72.8 430.1,71.4 440.7,69.9 451.3,69.8 461.8,68.9 472.4,67.4 483.0,66.4 493.6,65.7 504.1,64.6 514.7,62.5 525.3,59.3 535.9,57.3 546.4,54.5 557.0,52.3 567.6,45.1 588.7,42.9 599.3,41.5 609.9,41.1 620.5,43.3 631.0,44.2 662.8,42.5 673.3,41.8 683.9,41.5 694.5,41.3 705.1,40.9 715.6,40.4 726.2,40.2 736.8,39.8 747.4,39.5 800.2,39.5 821.4,35.3 832.0,32.1 842.5,31.6 863.7,31.2 874.3,30.9 884.8,30.4 895.4,30.2 906.0,30.1 916.6,30.0 927.1,30.0 937.7,30.0 948.3,30.0 958.9,30.0 969.4,30.0 980.0,30.0"/><text x="70" y="324" font-size="12" fill="#999">function count</text>
|
||||
<text x="980" y="426" text-anchor="end" font-size="10" fill="#777">generated by tools/timeline.py — keyed by date</text>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
+85
-63
@@ -385,78 +385,100 @@ accumulate here as the phase produces them.**
|
||||
|
||||
- **2026-09-09 — T4 batch `tus11`** (`.run/P36/delever/run_tus11.log`, `batch_tus11.json`): `delever: batch tus11 — 5 files (TUs; 5 drawable) · 5 bodies: 0 lever-free, 5 residue, 0 refused · sites removed 0 / needed 10 / refused 7 / deferred 0 · replays 0 (0 disagreed) · compiles 20 in 2 s wall · final 5/5 identical · written 5 files` → R22 (`.run/P36/baseline/r22_tus11.log`) **`check-all: 218 passed, 0 failed of 218`** (`wall=119.43 s`) → census `THE PHASE'S NUMBER (pins + asm statements, GTE excluded): 33,625 sites in 12,501 bodies (1,728 distinct) · marked !FAKE 33,625 · UNMARKED 0`.
|
||||
|
||||
## 🛑 SESSION CHECKPOINT — S98 (2026-09-09): T0 ☑ T1 ☑ T1b ☑ T2 ☑ T3 ☑ — all committed (T3 = `39e3e1851` tools, `cd24727dd` + `7ee458dd7` the ov_SC04_011 batches, this close); NEXT = T4 the mechanical campaign: `tools/delever_cycle.sh` over the whole population (TUs then headers), unattended, one commit per batch, R22 every batch | the number: 53,033 sites in 15,638 bodies (2,246 distinct), 310 marked, 0 orphans | last batch `tus11` on 0cb78a6a7: THE PHASE'S NUMBER (pins + asm statements, GTE excluded): 33,625 sites in 12,501 bodies (1,728 distinct) · marked !FAKE 33,625 · UNMARKED 0
|
||||
- **S98 — T4 CLOSE: the mechanical campaign over the whole population (rungs A/B + replay), 15 batches, every one gated by the clean
|
||||
fleet run.** TU batches `tus1`–`tus10` (`a605e1dba`, `85905840c`, `ce8737066`, `5e10b19e8`, `ca761c4f6`, `3e60fdf41`, `34f03003d`,
|
||||
`d9e01a398`, `aa70308cf`, `cb2fb5e6d`), header batches `headers1`–`headers2` (`9184678f1`, `0cb78a6a7`), the file-scope stragglers
|
||||
`tus11` (`f087282a3`: the 6 file-scope `__asm__("")` barriers in the three `*_jr_8015444C.c` copies all NEEDED; the 7 file-scope
|
||||
`.section .rodata` blocks are DATA carried as assembly — refused as `asm-data`, marked, T7's) — each `check-all: 218 passed, 0 failed of
|
||||
218`. **Totals (the ledger, latest row per body; R41):** 16,334 bodies judged — **3,341 lever-free (20.5 %)**, 12,967 residue (79.4 %),
|
||||
13 nothing-usable, 13 deferred asm-bodies; sites 56,445 — **removed 20,780 + rewritten 283 = 21,063 (37.3 %)**, needed 35,281
|
||||
(62.5 %; the oracle's word: DIFFERS 35,273, COMPILE-ERROR 8), refused 88, deferred 13. By kind (needed % of the kind's sites): pin 20,643
|
||||
needed / 17,074 removed (55 % of 37,720) · barrier 4,570 / 1,257 (78 % of 5,829) · launder 4,631 / 419 + 138 rewritten as assignments
|
||||
(88 % of 5,233) · keep-alive 2,000 / 576 (78 %) · instruction 1,667 / 145 rewritten (90 % of 1,850) · cast 1,509 / 876 (63 %) ·
|
||||
decl-file 152 / 365 (29 % — most file-scope `volatile` came off) · decl-body 57 / 177 (24 %) · bare register 50 / 36 (58 %). Needed
|
||||
pins by register: $2 3,834 · $4 2,718 · $5 2,475 · $3 2,445 · $16 1,764 · $17 1,492 · $0 1,318 · $7 721 · $19 588 · $6 520 (the v/a
|
||||
argument-return class dominates, as the probe said). Refused: the macro-carried sites (RTP_SND 22, XFER 12, DRAW 9, XFERLAST 9,
|
||||
XFER_1919A0 6 — the lever is in the `#define`, T5), launders with 2 inputs 5, `addu`/`lui` with no C spelling 7, asm-data 7.
|
||||
Compiles 49,487 (16,577 s CPU); replays 8,239 of 16,334 bodies (50 %), **1 disagreement** (a header). **THE NUMBER: 53,234 → 33,625
|
||||
sites (−36.8 %) in 12,501 bodies (1,728 distinct) · marked 33,625 · UNMARKED 0 · orphans 0** — `lever_census --check: 33,625 pin/asm
|
||||
sites, 33,625 marked !FAKE, 0 UNMARKED — OK` (the mid-campaign gate is met; T8 wires it into tools-health). The residue for T5–T7:
|
||||
12,967 bodies in **1,803 distinct classes**; mix: pins-only 6,018 bodies, pins + asm 4,310, asm-only 2,141, C/D-only 498 (no A/B
|
||||
survivor — done for the phase's number, kept unmarked by decision 3); by kind ov 12,359 · shared 291 · md 163 · main 142 · resident 12.
|
||||
The T2 probe priced 43 % of sites / 19 % of bodies / ~1,800 exemplars; measured 37 % / 20.5 % / 1,803 — its pricing held. Published
|
||||
(R75): `make report BINARY=main` (285 s) → README line 30 `Levers off (Phase 36, snapshot 2026-09-09): 20,646 register pins and 12,979
|
||||
asm statements remain in 12,501 functions (1,728 distinct bodies), 33,625 of them marked …`, `docs/progress.json` `counts.levers`
|
||||
(`sites 33625 · marked_fake 33625 · unmarked 0`), the timeline regenerated. Instruments changed in this task (each with its log entry
|
||||
above): "done" per body; the includer cache; the stale-lock wait; `--restore` drops a killed batch's rows; the controls keyed on their
|
||||
T1 hashes; the cycle's FINISH mode; the file-scope pseudo-body now holds file-scope asm statements. **T4 ☑.** Rules check (P6) done
|
||||
after T4 (re-read complete).
|
||||
|
||||
## 🛑 SESSION CHECKPOINT — S98 (2026-09-09): T0 ☑ T1 ☑ T1b ☑ T2 ☑ T3 ☑ T4 ☑ — all committed (T4 = 13 batch commits `a605e1dba`…`f087282a3` + the tool commits; this close); NEXT = T5 the GTE consolidation + the dead lever-macro sweep | the number: 33,625 sites in 12,501 bodies (1,728 distinct) · marked 33,625 · UNMARKED 0 · orphans 0 — `lever_census --check` OK
|
||||
|
||||
### 0. How to use this block
|
||||
A fresh session reads CLAUDE.md's load order, replays this block verbatim, confirms the effort (T4/T5/T6/T8/T9 are xHigh per the plan, Max is
|
||||
what S98 ran at — Drew toggles, R27) and executes §2. The tree is clean at HEAD = this close commit (`git log --oneline -4` shows it above
|
||||
`7ee458dd7`, `cd24727dd`, `39e3e1851`). The headless Ghidra MCP is unused this phase (the SessionStart hook starts it; stop it with the sentinel
|
||||
before a checkpoint commit, R23). Drew pushes (R6). **T7 (the Ultracode reshaping waves) starts ONLY on Drew's direct approval in the session
|
||||
that would run them** — his words, 2026-09-09, in the decisions section; the R27 toggle is necessary, not sufficient.
|
||||
A fresh session reads CLAUDE.md's load order, replays this block verbatim, confirms the effort (T5/T6/T8/T9 xHigh per the plan; S98 ran
|
||||
at Max — Drew toggles, R27) and executes §2. The tree is clean at HEAD = this close commit. The headless Ghidra MCP is unused this phase.
|
||||
Drew pushes (R6). **T7 (the Ultracode reshaping waves) starts ONLY on Drew's direct approval in the session that would run them** (his
|
||||
words, 2026-09-09, decisions) — the toggle is necessary, not sufficient. **Never run a long job as a harness background task** — the
|
||||
harness's low-memory guard kills them with 22 GB free; run cycles DETACHED (`setsid nohup … &`, the usage line in the cycle script) and
|
||||
watch the log with a `Monitor`; a killed batch: `tools/delever.py --restore` (drops its ledger rows); a batch whose apply + fleet run
|
||||
were green but whose census/commit failed: `FINISH=<label> tools/delever_cycle.sh k k …`.
|
||||
|
||||
### 1. Where things stand
|
||||
- **Done, committed:** gate 1 (2026-09-09, the decisions above); T0 (`63b886626`, R22 218/218); T1 (`357f8a1ed`, `tools/lever_census.py`); T1b
|
||||
(`a1407bdfc`, the manifest's in-function form, 49 rows); T2 (`617f29e30`, `tools/delever_oracle.py` + the probe); **T3** (`39e3e1851` the campaign
|
||||
tool + cycle; `cd24727dd` batch `t3_tus1` = ov_SC04_011's 18 TUs, 176 bodies, 215 sites removed, R22 green; `7ee458dd7` batch `t3_tus2` = the
|
||||
redraw of the one refused body; this close = the scrub of 2 orphan markers + the tool fixes + the docs, R22 green).
|
||||
- **The number:** `THE PHASE'S NUMBER (pins + asm statements, GTE excluded): 53,033 sites in 15,638 bodies (2,246 distinct) · marked !FAKE 310 ·
|
||||
UNMARKED 52,723` · `orphan !FAKE markers: 0` (was 53,234 / 15,679 / 2,227 at T1b; the census's `distinct` RISES while copies of an edited
|
||||
class are still unjudged — expected). Re-derive: `.venv/bin/python tools/lever_census.py --sites -j 16` (30–35 s; the JSON carries `head`,
|
||||
`src_stamp`, `orphan_markers`; the walk cache is keyed on the tool's own hash). `lever_census --check` FAILS until T4 has judged everything
|
||||
(0 UNMARKED is the T8 gate) — it must NOT fail on orphans at any commit.
|
||||
- **The first real sample (ov_SC04_011, R41):** 25 % of bodies lever-free after rungs A+B, 40 % of sites removed, 100 % of NEEDED verdicts
|
||||
DIFFERS (0 compile errors, 0 crashes since the launder-assignment rewrite); needed by kind: pin 194/373, launder 46/49, barrier 40/49,
|
||||
keepalive 13/18, instruction 14/18, cast 11/23. The T2 probe's numbers (43 % / 19 %) were measured with the assignment-launders deleted.
|
||||
- **The ledger** `.run/P36/delever/ledger.jsonl` (tracked): 176 + 2 body rows + 1 scrub row; `tools/delever.py --status` prints the totals.
|
||||
"Done" = the body's current nhash is some row's `nhash_after`; a body whose nhash is a row's `nhash_before` REPLAYS that row (1 compile);
|
||||
`--redraw REFUSED NOTHING-USABLE` draws refused bodies again after a tool fix; `--rejudge` draws everything.
|
||||
- **Instruments (all with SETUP rows + dictionary rows, kit corpus regenerated, `tool_census --check: OK`):** `tools/delever.py` (`--plan`,
|
||||
`--apply --batch N --label L [--headers] [--only …] [--redraw …] [-j 12]`, `--restore`, `--scrub`, `--status`, `--apply-body`, `--selftest`,
|
||||
`--probe`), `tools/delever_cycle.sh` (`[LABEL_PREFIX=…] [TASK=T4] [REDRAW=…] START END [BATCH=300] [tus|headers] [ONLY=…]`),
|
||||
`tools/delever_oracle.py` (`--calibrate ov_SC04_011 ov_SC03_015 ov_SC03_014 main -j 16` 2.4–3.9 s; keyed to HEAD — EVERY commit stales it; the
|
||||
cycle recalibrates itself), `tools/lever_census.py` (`--sites`, `--check [--strict]`, `--selftest`). Selftests: `delever --selftest: OK — 15 sites
|
||||
in the exemplar, 1 refused rewrite(s), ladder RESIDUE (15 compiles), replay replay (1 compile), markers 5`; `lever_census --selftest: OK — 23
|
||||
sites, 2 defs, 2 asm macros`.
|
||||
- **No src/ is dirty at this commit;** `.run/P36/delever/inflight.json` (ignored) may exist from the last batch — `--apply` deletes it on a clean
|
||||
tree; a crash mid-batch leaves files modified → `tools/delever.py --restore` (never git checkout, R102).
|
||||
- **Environment:** WSL2, `~/bfm-decomp`, `.venv`; R22 clean fleet run 90–145 s; the census 30–35 s; `make kit-corpus` ≈ 25 s (a NEW tool must be
|
||||
`git add`ed first); 16 cores; 31 GB RAM; ~32 GB disk free; the harness's foreground cap is 10 min — run the cycle in the BACKGROUND with its log.
|
||||
- **T4 done:** every drawable body judged (`delever --plan` and `--plan --headers`: `0 of 0 drawable files`); the totals are in the T4
|
||||
close entry above. THE NUMBER: **53,234 → 33,625 sites (−36.8 %) in 12,501 bodies (1,728 distinct); 33,625 marked, 0 UNMARKED, 0
|
||||
orphans**; the residue = 12,967 bodies in 1,803 distinct classes (pins-only 6,018 · pins+asm 4,310 · asm-only 2,141 · C/D-only 498).
|
||||
Re-derive: `.venv/bin/python tools/lever_census.py --check -j 16` (≈35 s; must print `… 0 UNMARKED — OK` and no ORPHAN line at every
|
||||
commit from now on) · `tools/delever.py --status` (the ledger's totals) · `docs/progress.json` `counts.levers` + README line 30 are
|
||||
generated by `make report BINARY=main` (285 s; rewrites `docs/story-timeline.*` too — commit them together, R75).
|
||||
- **The ledger** `.run/P36/delever/ledger.jsonl` (tracked): one row per body per judgement (verdict, rung, sites with REMOVED / REWRITTEN /
|
||||
NEEDED(oracle word) / REFUSED(why) / DEFERRED, `nhash_before`/`nhash_after`, the calibration id); "done" = (tu, fn, after-hash); a body
|
||||
reshaped by T6/T7 gets a new hash and is drawn again; `--redraw REFUSED NOTHING-USABLE` after a tool fix; `--apply-body TU FN FILE
|
||||
--label L --rung D|E` banks a reshaped body (refused if a class A/B lever remains).
|
||||
- **Instruments (SETUP + dictionary rows current, kit corpus regenerated, `tool_census --check: OK`):** `tools/delever.py` (`--plan`,
|
||||
`--apply`, `--restore`, `--scrub`, `--status`, `--apply-body`, `--redraw`, `--selftest`, `--probe`), `tools/delever_cycle.sh` (`[TASK=…]
|
||||
[FINISH=label] [REDRAW=…] START END [BATCH] [tus|headers] [ONLY]`), `tools/delever_oracle.py` (`--calibrate ov_SC04_011 ov_SC03_015
|
||||
ov_SC03_014 main -j 16`, keyed to HEAD — every commit stales it), `tools/lever_census.py` (`--sites`, `--check [--strict]`, the controls
|
||||
keyed on T1 hashes → N-A once a control body is edited, the walk cache keyed on the tool's hash, `orphan_markers`). Selftests:
|
||||
`delever --selftest: OK — 15 sites in the exemplar, 1 refused rewrite(s), ladder RESIDUE (15 compiles), replay replay (1 compile),
|
||||
markers 5`; `lever_census --selftest: OK — 23 sites, 2 defs, 2 asm macros`.
|
||||
- **Environment:** WSL2, `~/bfm-decomp`, `.venv`; R22 clean fleet run 90–150 s; the census ≈35 s; `make report BINARY=main` ≈285 s; `make
|
||||
kit-corpus` ≈25 s (a NEW tool must be `git add`ed first); 16 cores; 31 GB RAM; ~30 GB disk free; the harness's foreground cap is 10 min;
|
||||
two `make` invocations in one tree are a race.
|
||||
|
||||
### 2. T4 — the mechanical campaign (xHigh; unattended cycles; P3 — no permission stops between batches)
|
||||
1. Preflight: `git status --short` empty; `.venv/bin/python tools/delever.py --plan --batch 300` (prints `N of M drawable files …`; the census is
|
||||
rerun by the tool when its src stamp is stale); `--plan --headers --batch 200` for the header count.
|
||||
2. The TU campaign, in the background with its log: `TASK=T4 tools/delever_cycle.sh 1 10 300 tus > .run/P36/delever/cycle_t4_tus.log 2>&1`
|
||||
(labels `tus1..tus10`; each batch: apply ≈ 3–8 min → R22 ≈ 2 min → census ≈ 0.5 min → log entry + headline → commit). It stops cleanly
|
||||
with `nothing drawable` when the TUs are exhausted, or on the first red (`cycle: …` names it; the files stay in place → inspect the apply
|
||||
log, fix the tool, `delever --restore`, recommit nothing, rerun). Expect ~9 batches ≈ 1–1.5 h.
|
||||
3. The header campaign: `TASK=T4 tools/delever_cycle.sh 1 3 200 headers > .run/P36/delever/cycle_t4_hdr.log 2>&1` (labels `headers1..`; serial
|
||||
per header, includers in parallel; a header's greedy runs on ONE includer and the final on ALL — an `h_text` header (38, byte-variant per
|
||||
binary) that disagrees reruns the greedy on all includers, logged `does not hold on every includer`).
|
||||
4. Stragglers: `--redraw REFUSED NOTHING-USABLE` after any tool fix (`REDRAW="REFUSED NOTHING-USABLE" tools/delever_cycle.sh …`); a
|
||||
COMBINATION-FAILED file (the cycle stops on it: `final X/Y`) is a tool defect to fix, never a body to skip.
|
||||
5. After the last batch: `tools/delever.py --status`; `lever_census --check` (0 orphans; UNMARKED = the sites of bodies never drawn — should be
|
||||
0 once every file is judged, else find them with `--plan`); the T4 log entry = the totals with denominators (bodies lever-free / residue,
|
||||
sites removed / needed / refused by kind, replays and disagreements, compiles and wall) and the residue's class mix for T5/T6; the P6
|
||||
rules check after T4 (S98 did one after T3); then the checkpoint refresh.
|
||||
Gotchas already paid for: the cycle greps `delever: batch …` WITHOUT a `^` anchor (the log line is timestamped) and refuses an EMPTY verify
|
||||
line; the census line is `THE PHASE'S NUMBER…`; a body whose zero-register variable is used inside another site's statement composes; a
|
||||
removed site consumes its trailing marker (an orphan marker is a `--check` failure and a `--scrub` job); the census cache is keyed on the
|
||||
tool's hash; a compound macro use is REFUSED (its marker says `T5`) — T5 edits the `#define`; the 13 asm-bodies are DEFERRED with a `T7`
|
||||
marker; class C/D survivors are never marked (decision 3) — the ledger is their record; `-O0` TUs are judged like any other (`o0` in the row).
|
||||
### 2. T5 — the GTE consolidation and the dead lever-macro sweep (xHigh; design first, X1)
|
||||
The facts from T1's census (`.run/P36/census/lever_census.json` `macro_definitions`): 9,540 asm-bearing macro definitions under 338
|
||||
names, 32 names with more than one text — gte 9,102 (`gte_ldv0` 839 defs / 9 texts; a 171-definition variant carries a byte-relevant
|
||||
`"memory"` clobber; plus address-suffixed private copies like `LDV0_DA34`, `RTPS221A8`), launder 428 (`SHB` 416 defs / 2 texts — `__asm__
|
||||
__volatile__("" : "=r"(x) : "0"(x))` ×145 and the non-volatile ×271; `ENGINE_SHB` in `src/shared/engine_prelude.h`; `LAUNDER_8018A180`),
|
||||
instruction 9 (`RTP_SND`), barrier 1 (`COPY_TO_FAAC`), the compound `XFER`/`XFERLAST`/`XFER_1919A0`/`DRAW` (real code around a launder).
|
||||
The GTE uses: 6,891 sites (`gte_ldv0` 653 uses, `gte_rtps` 356, `gte_stsxy` 361, `gte_stflg` 319, `gte_rtpt` 289 … and raw `lwc2`/`swc2`/
|
||||
`mfc2` 945 spelled inline). Build order: (1) an inventory tool pass (extend `lever_census` or a small `tools/gte_consolidate.py`): every
|
||||
GTE macro definition's name → normalized text → the PsyQ canonical name (the SDK's `inline_c.h`/`gtemac.h` spellings under
|
||||
`include/psyq/` if present, else the majority text per name); group the address-suffixed private names by text; list the `"memory"`-
|
||||
clobber variants apart (they are levers: the clobber is the steer — their USES become class-B `gte`+clobber sites for T7, not a second
|
||||
spelling in the header). (2) `include/gte_inline.h` (the census's `GTE_HEADER_DEFAULT`) with one canonical macro per PsyQ name, included
|
||||
from `src/shared/engine_prelude.h` (every overlay/module TU) and from main's/resident's common include; (3) per TU, delete the local
|
||||
definitions whose text equals the canonical one, rename the private-name USES to the canonical name — every TU judged by the oracle
|
||||
(`delever_oracle.judge_all`: a macro that expands to the same text gives the same object, but the oracle says so, not the argument), the
|
||||
fleet gated by R22; (4) the dead-macro sweep: every `#define` with an asm inside and NO remaining use in its TU (`SHB` where T4 removed
|
||||
every use; the census's macro list vs the sites' `via` counts — `SHB` may be used by an included header: `src/shared/ov/func_80166F58__3728db8a.h`
|
||||
uses the INCLUDER's `SHB`, count cross-file uses before deleting) → deleted; `ENGINE_SHB` if unused fleet-wide; (5) the compound macros
|
||||
(XFER/DRAW/RTP_SND/COPY_TO_FAAC/XFERLAST/…; 88 refused use sites): edit the DEFINITION (drop the launder/barrier statement inside), judge
|
||||
the TU — IDENTICAL → the uses are no longer sites, their markers become orphans → `delever --scrub`; DIFFERS → the definition keeps
|
||||
its asm and the use markers stay (T7). (6) `lever_census`: 0 per-TU asm macro definitions outside the GTE header (the T5 verify line);
|
||||
R22 green; the log entry; SETUP/dictionary rows for any new tool; kit corpus; commit. Effort xHigh; one session.
|
||||
|
||||
### 3. Numbers to re-derive, never trust
|
||||
`docs/progress.json` `counts.levers` and the README sentence are generated from `.run/P36/census/lever_census.json` — rerun the census, then
|
||||
`make report BINARY=main` (≈ 226 s; rewrites `docs/story-timeline.md` too — commit it with the rest) before any commit that quotes a number
|
||||
in a published document (R75); the batch commits quote the census line only. The gate-1 population table is superseded by T1; the T2 probe's
|
||||
percentages by the ov_SC04_011 sample (§1).
|
||||
The gate-1 table (grep) → T1's census → T4's ledger; the T2 probe's percentages → T4's measured 37.3 % of sites / 20.5 % of bodies. Any
|
||||
number in a published document is regenerated by `make report BINARY=main` (R75). The census after T5 will show FEWER macro definitions
|
||||
and the same 33,625 pin/asm sites unless T5's definition edits remove use sites (the compound macros).
|
||||
|
||||
### 4. Gotchas known before any work
|
||||
The oracle must not write `build/`; objects embed the source path (compile in place, restore from the in-memory snapshot); the calibration is
|
||||
keyed to HEAD + the Makefile/config stamp; `compile_only.py` is not faithful (no pad stage); a dotfile probe under `src/` refuses the cycle;
|
||||
a shared header's edit reaches up to 136 binaries — the final verifies every includer; `SHB` may be used by an included header
|
||||
(`src/shared/ov/func_80166F58__3728db8a.h`); never `git checkout` to restore (R102); `tool_census --check` refuses an UNTRACKED tool — `git
|
||||
add` a new tool before `make kit-corpus`; two concurrent `make` invocations in one tree are a race — never run `make kit-corpus` (or a report)
|
||||
while a cycle's R22 runs.
|
||||
The oracle must not write `build/`; objects embed the source path (compile in place, restore from the in-memory snapshot, the mtime
|
||||
restored); the calibration is keyed to HEAD + the Makefile/config stamp; the census's src stamp is stat-based (a written file = rerun,
|
||||
≈35 s); `compile_only.py` is not faithful; a dotfile under `src/` refuses the cycle; a shared header's edit reaches up to 136 binaries; never
|
||||
`git checkout` to restore (R102); `tool_census --check` refuses an UNTRACKED tool; never two `make`s at once; never edit a running
|
||||
bash script; a marker on a removed site is consumed by the rewrite and an orphan is a `--check` failure (`--scrub`).
|
||||
|
||||
## Approved plan (verbatim, gate 1 — 2026-09-09)
|
||||
|
||||
|
||||
+6
-2
@@ -76,7 +76,9 @@ PROBE = REPO / ".run" / "P36" / "probe"
|
||||
PRELUDE = "src/shared/engine_prelude.h"
|
||||
REMOVABLE = {("A", "pin"), ("B", "barrier"), ("B", "launder"), ("B", "keepalive"), ("B", "instruction"),
|
||||
("C", "cast"), ("C", "decl-body"), ("C", "param"), ("D", "register")}
|
||||
FILE_SCOPE_REMOVABLE = {("C", "decl-file")}
|
||||
FILE_SCOPE_REMOVABLE = {("C", "decl-file"), ("B", "barrier"), ("B", "launder"), ("B", "keepalive"), ("B", "instruction")}
|
||||
# a file-scope asm statement is a TU-level site: a barrier/launder/keep-alive is judged like any other; a `.section` block is a rodata
|
||||
# DEFINITION carried as assembly (asm-data) — data, not a compiler steer: refused with that reason and marked, for T7
|
||||
DEFERRED_KINDS = {"asm-body"} # a whole routine in a C shell: T7's work, marked now (the census counts it as a lever)
|
||||
MARK_KINDS = {"pin", "barrier", "launder", "keepalive", "instruction", "asm-body"} # class A/B survivors carry the marker; C/D never
|
||||
ORDER = {"barrier": 0, "launder": 1, "keepalive": 2, "instruction": 3, "pin": 4, "cast": 5, "decl-body": 6, "param": 6, "register": 7}
|
||||
@@ -417,6 +419,8 @@ def site_edits(raw, m, ls, site, keep_register=False):
|
||||
how, text = launder_rewrite(inner)
|
||||
new = "" if how == "delete" else text
|
||||
elif kind == "instruction":
|
||||
if str(site.get("detail", "")).startswith("."):
|
||||
raise Refuse(f"asm-data: a `{site['detail']}` block defines data as assembly (a rodata carve, not a compiler steer) — T7")
|
||||
new = instruction_to_c(inner, "")
|
||||
if new is None:
|
||||
raise Refuse(f"instruction `{site['detail']}` has no C spelling in the table")
|
||||
@@ -966,7 +970,7 @@ def work_file(tu, bs, recipes_for, pool, exemplars, ledger_ex, label, log, calib
|
||||
try:
|
||||
walk = lc.walk_file(final, tu, is_hdr)
|
||||
nh = {d["name"]: d["nhash"] for d in walk["defs"]}
|
||||
fs_sites = [s for s in walk["sites"] if s["cls"] == "C" and s["kind"] == "decl-file"]
|
||||
fs_sites = [s for s in walk["sites"] if not s.get("fn") and (s["cls"], s["kind"]) in FILE_SCOPE_REMOVABLE]
|
||||
fs_hash = "fs:" + hashlib.sha1("\n".join(s["text"] for s in fs_sites).encode()).hexdigest()
|
||||
for b, row in rows:
|
||||
row["nhash_after"] = fs_hash if b["fn"] == FILE_SCOPE_FN else nh.get(b["fn"])
|
||||
|
||||
Reference in New Issue
Block a user