phase6: open the phase control record and triage the open items
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
# Current Phase — Phase 6: From One Match to a Matching Pipeline
|
||||
|
||||
**Status:** ACTIVE
|
||||
**Started:** 2026-09-23, immediately after Phase 5 closure, on explicit developer approval of `phase-ends/Phase6_PLAN.md`.
|
||||
**Goal:** turn the single verified C match into a repeatable pipeline; close the four toolchain gaps; match a first batch of functions; record a defensible boundary inventory.
|
||||
|
||||
## Progress
|
||||
|
||||
- [x] **P6-T1 — Phase control records, baseline revalidation, and open-item triage** (complete)
|
||||
- [ ] P6-T2 — Registry symbol support and per-region flag overrides
|
||||
- [ ] P6-T3 — `maspsx` integration and the ASPSX `la` verification
|
||||
- [ ] P6-T4 — `-G` small-data threshold from byte evidence
|
||||
- [ ] Rules check
|
||||
- [ ] P6-T5 — Evidence-graded function-boundary inventory
|
||||
- [ ] P6-T6 — First matching batch, with duplicate sharing
|
||||
- [ ] P6-T7 — Cookbook, conventions, verification record, and phase gate
|
||||
|
||||
## P6-T1 — Baseline revalidation (2026-09-23)
|
||||
|
||||
All entry gates were re-run from the current worktree and passed.
|
||||
|
||||
| Gate | Command | Result |
|
||||
|---|---|---|
|
||||
| Synthetic suite | `python3 -m unittest discover -s tools/tests` | exit 0; 53 tests pass |
|
||||
| Clean data baseline | `make clean` then `make all` | both exit 0 |
|
||||
| Full-binary comparison | `cmp build/scus_946_40.rebuilt 'extracted/SCUS_946.40;1'` | exit 0 |
|
||||
| Baseline SHA-1 | `sha1sum` on both files | `e173426c157384ebf1b6caf8c6fea18a85a14af9` |
|
||||
| Ordered C gate | `make gate` | `c_regions=1`, `differing_bytes=0`, `result=MATCH`, exit 0 |
|
||||
| Firewall | `git ls-files` under prohibited roots | 0 tracked |
|
||||
| Git hygiene | `git status --short`, `git diff --check` | clean, exit 0 |
|
||||
|
||||
Observed executable: 1,886,208 bytes, SHA-1 `e173426c157384ebf1b6caf8c6fea18a85a14af9` — matches the
|
||||
carried context. Tracked file count is 62 (57 at Phase 5 closure plus the five `phase-ends/logs/*.md`
|
||||
archive records committed with the closure). No `CURRENT_PHASE.md` existed at phase start; this file
|
||||
is that record.
|
||||
|
||||
## P6-T1 — Open-item triage
|
||||
|
||||
The Phase 5 open items are split by whether they block a **class** of functions or a **single**
|
||||
function. Every row states its provenance and the limit that keeps it open. No item is closed here;
|
||||
this is a scope statement for P6-T2..T6.
|
||||
|
||||
### Blocking a class of functions
|
||||
|
||||
| Item | Provenance | Limit / why it is a class |
|
||||
|---|---|---|
|
||||
| **Registry symbols** — per-region absolute symbol definitions | `docs/MATCHING_CONVENTIONS.md` §Symbols; `docs/PHASE5_FIRST_MATCH.md` Part B; harness `--defsym` is global-only | Any function that references a global, a data object, or a callee by name needs a definition; today symbols can only be defined globally for a whole build, so `0x8002D2A0` is verified but unregisterable. |
|
||||
| **Per-region compiler/assembler flags** | `docs/PHASE5_MATCH_HARNESS.md` §Limits ("no per-region flag overrides yet"); `--cc1-flag` replaces defaults globally | The original almost certainly compiled some translation units with other `-O`/`-G` values; a single global flag set cannot represent them. |
|
||||
| **`maspsx` / ASPSX `la` behaviour** | `docs/MATCHING_COOKBOOK.md` findings 4 and 5; `docs/PHASE5_FIRST_MATCH.md` §Limits | GNU `as` expands `la rt,sym` with `ori`; the original (ASPSX 2.81) uses `addiu`/`%lo`. Every function that materialises a symbol **address** mismatches until `maspsx` runs between `cc1` and `as`. |
|
||||
| **`-G` small-data threshold** | `docs/MATCHING_COOKBOOK.md` §Open questions; `docs/PHASE5_MATCH_HARNESS.md` §Limits | The executable clearly performs `gp`-relative accesses, but the threshold and whether `-mgpopt` was passed are unknown; every small-data function is affected. |
|
||||
|
||||
### Single-function
|
||||
|
||||
| Item | Provenance | Limit |
|
||||
|---|---|---|
|
||||
| **`0x8005DEF8` constant multiply** | `phase-ends/PhaseEnd_Phase5.md` §Deviations; `docs/MATCHING_COOKBOOK.md` §Open questions | The original emits a real `mult` where every tested compiler (including the real `CC1PSX`) synthesises shifts; the reconstruction is the likely cause. Bounded to this one function. |
|
||||
| **`0x80017AE8` (verified, unregistered)** | `docs/PHASE5_FIRST_MATCH.md` Part B | Verified byte-identical by `sf3_match range`; deliberately left for the Phase 6 batch. No blocker. |
|
||||
| **`0x8002D2A0` (verified, unregistered)** | `docs/PHASE5_FIRST_MATCH.md` Part B | Verified byte-identical; blocked only by the registry-symbols class item above. |
|
||||
|
||||
## Notes and limits
|
||||
|
||||
- The four class items are the plan's named toolchain gaps (P6-T2..T4); the single-function items are
|
||||
handled in P6-T6.
|
||||
- Nothing in this triage promotes any candidate to a match. Every match still requires an
|
||||
instruction-identical `sf3_match range` and a green clean full-binary `make gate`.
|
||||
- The entry `[0x800FB368,0x800FB410)` remains CRT startup and stays in the data fallback.
|
||||
Reference in New Issue
Block a user