diff --git a/phase-ends/current/PHASE_PLAN.md b/phase-ends/current/PHASE_PLAN.md index b7c656e5f1..1b466e5641 100644 --- a/phase-ends/current/PHASE_PLAN.md +++ b/phase-ends/current/PHASE_PLAN.md @@ -74,8 +74,9 @@ C0507 (§458 struct spelling per-access dial), C0508 (§459 declaration-layer by Inputs: `.run/P37/restruct/types_preview/ov.h` (regenerate with `restruct.py --write-types --type --space --pointees`), `.run/P37/census/struct_map.json`, `docs/actor-struct.md`, `docs/memory-map.md` §3.4. Field names only with cited evidence (G62); else `unkHEX`. Decide whether main (`src/800_shared.h`) and `md_*` share the ov definition or carry a per-space canonical file, by the layouts' identity in the map, never by name. - T4 | done | expert-opus55 | title: fold the head types fleet-wide (rung L) | coder: opus55 | effort: medium | files: src/**/*.c, src/**/*.h (via restruct cycles) | done-when: every local definition and variant of the three head types folded onto T3's canonical definitions through judged rung-L batches (accesses rewritten where an opaque-tier fold renames members); `--check-structs` shows none of the three in any dup class or variant camp; remainder bucketed by ledger verdict (kept units listed with cause); each batch committed after its own R22 | verify: `.venv/bin/python tools/type_census.py --out-dir .run/P38/census --check-structs; .venv/bin/python tools/restruct.py --check-ledger && make clean && make extract-all JOBS=16 && make check-all JOBS=16` | reads: tasks/T2.md, tasks/T3.md | deps: T3 | est-ctx: 110k | review: no | wait-for: — Launch: cycle form in ## Context with `TASK=T4 LABEL_PREFIX=t38_4 … L`, `--only `; shared headers with `HEADERS=1` (serial). Onboard main and `md_*` in this task. `delever_oracle --calibrate` refresh when HEAD moved (the cycle does it). -- T5 | queued | expert-opus55 | title: long tail — one definition per type | coder: opus55 | effort: medium | files: src/shared/engine_types.h, src/shared/**, src/**/*.c, tools/lift_types.py | done-when: remaining duplicate classes folded via `lift_types.py --apply` and rung-L cycles; 40 variant camps uniquified; dead canonical names deleted; the 26 legacy `pad` names renamed to `unkHEX`/`pad_` form; PsyQ layouts carry Sony's SDK names; layout twins without evidence left apart and listed; `--check-structs` gating counts dup_classes/outside_canon/dead/variants/pad_names all 0 | verify: `.venv/bin/python tools/type_census.py --out-dir .run/P38/census --check-structs; make clean && make extract-all JOBS=16 && make check-all JOBS=16` | reads: tasks/T2.md, tasks/T3.md, tasks/T4.md | deps: T4 | est-ctx: 130k | review: no | wait-for: — +- T5 | superseded | expert-opus55 | title: long tail — one definition per type | coder: opus55 | effort: medium | files: src/shared/engine_types.h, src/shared/**, src/**/*.c, tools/lift_types.py | done-when: remaining duplicate classes folded via `lift_types.py --apply` and rung-L cycles; 40 variant camps uniquified; dead canonical names deleted; the 26 legacy `pad` names renamed to `unkHEX`/`pad_` form; PsyQ layouts carry Sony's SDK names; layout twins without evidence left apart and listed; `--check-structs` gating counts dup_classes/outside_canon/dead/variants/pad_names all 0 | verify: `.venv/bin/python tools/type_census.py --out-dir .run/P38/census --check-structs; make clean && make extract-all JOBS=16 && make check-all JOBS=16` | reads: tasks/T2.md, tasks/T3.md, tasks/T4.md | deps: T4 | est-ctx: 130k | review: no | wait-for: — `lift_types.py --candidates` → dry-run → `--apply` per type list; C0067's three laws and C0224 (typedef before every splice point). A tool defect in `lift_types.py` is fixed in this task (product tooling). Commit per batch (R42) before the next gate. +- T5.1 | next | expert-opus55 | coder: opus55 | effort: medium | title: long tail — one definition per type (gate reading fixed) | files: src/shared/engine_types.h, include/struct_types.h, src/**, tools/lift_types.py, tools/type_census.py, docs/struct-twins.md, docs/struct-map-decisions.md | done-when: dead: type_census counts identifier uses inside the canonical headers (a canon type used as member/alias/typedef by a live canon type is not dead) and identifiers of any length; +1 selftest (member-only canon type not dead); residual dead names deleted or each listed with its invisible-use cause; dup_classes: tier-1 classes gate unchanged; a tier-2 (all-placeholder) class gates unless listed in docs/struct-twins.md with its lhash, names and a per-class cause citing struct_map base objects/addresses; census reads the file, fails on a stale lhash, prints non-gating twins_listed=N; outside_canon: a block-scope definition that declares an object in the same statement (stack frame) and sits in no gating dup class is reported non-gating as block_frames=N; every other body (ov/md/main file-scope, per-function shared headers, other headers) relocated to the canonical files (lift_types.py extended beyond ov file-scope); PsyQ layouts carry Sony SDK names; the Unkstruct_800B5CB8 split/union call made from T4's kept units (DIFFERS 29, pad3C 3) and recorded in docs/struct-map-decisions.md; --check-structs gating counts dup_classes/outside_canon/dead/variants/pad_names all 0; R22 green | verify: .venv/bin/python tools/type_census.py --selftest && .venv/bin/python tools/type_census.py --out-dir .run/P38/census --no-cache --check-structs; make clean && make extract-all JOBS=16 && make check-all JOBS=16 | reads: tasks/T2.md, tasks/T4.md, tasks/T5.md | deps: T4 | est-ctx: 130k | review: no | wait-for: — - T6 | queued | expert-opus55 | title: declaration layer on the canonical types | coder: opus55 | effort: medium | files: src/**/*.c, src/**/*.h, src/800.c | done-when: `restruct.py --redraw DECL-KEPT:type` (type-not-visible) and `DECL-KEPT:conflicting` redrawn to exhaustion and the remainder bucketed; `--check-structs` parse_error_decls = 0; the 13 `src/800.c` syntax-error units and the 45 TU-CONFLICT rows each resolved or kept with a named cause; summary reports before/after for types-floor lying (1,537), conflicting types (417), TU-CONFLICT (45) | verify: `.venv/bin/python tools/type_census.py --out-dir .run/P38/census --check-structs; .venv/bin/python tools/restruct.py --check-ledger && make clean && make extract-all JOBS=16 && make check-all JOBS=16` | reads: tasks/T1.md, tasks/T5.md | deps: T5 | est-ctx: 110k | review: no | wait-for: — Out of scope (other phases): jr-merged callers (3.44), void-def/`$v0` and zero-arg `$a0` callers, return-type lies (3.40), cast sites (3.39). Grep callers before any signature unit. - T7 | queued | expert-opus55 | title: milestone gate and record | coder: none | effort: medium | files: docs/struct-map.md, docs/levers.md, cookbook/, phase-ends/current/ | done-when: `--check-structs` exit 0 on a fresh census; R22 218/218 at the closing commit; `type_census --selftest`, `restruct --selftest --real`, `lever_progress --check` OK; `docs/struct-map.md` regenerated; cookbook §396(a) correction and the phase's generalizable gotchas added via `tools/cookbook_add.sh` | verify: `.venv/bin/python tools/type_census.py --out-dir .run/P38/census --no-cache --check-structs && make clean && make extract-all JOBS=16 && make check-all JOBS=16` | reads: tasks/T1.md, tasks/T4.md, tasks/T5.md, tasks/T6.md | deps: T6 | est-ctx: 60k | review: no | wait-for: — @@ -98,3 +99,5 @@ C0507 (§458 struct spelling per-access dial), C0508 (§459 declaration-layer by - 2026-09-29 router: T2 next -> done - 2026-09-29 router: T3 next -> done - 2026-09-29 router: T4 next -> done +- 2026-09-30 critic: reopened T5 as T5.1 — long tail — one definition per type (gate reading fixed) +- 2026-09-30 router: developer: milestone reading for --check-structs: dup_classes gates tier-1 plus unlisted tier-2 (docs/struct-twins.md with per-class evidence); outside_canon excludes object-declaring block-scope stack frames (reported block_frames=N); dead counts intra-canon uses. Header line unchanged; verified by exit 0 under this reading