audit: phase 0 tooling for file-by-file 40250 porting

- refroot.py: one reference-root resolver (MT_40250_SOURCE, then manifest)
  used by every audit script; missing tree or fingerprint input is an error
- port_map.py: per-function inventory of active 40250 units plus the
  40250 Python root, status/queue/init/show/check, 40250: tag scan
- manifest: fix 18 wrong reference paths (Python UI now points at the
  40250 Client/Eternexus/root, not the m2dev assets/root), drop 2 deleted
  implementation files, move 64 prose test entries to evidence.commands
- first port-map entry: PythonPlayerEventHandler.cpp
- roadmap replaced by a batch/unit queue

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-09-22 17:17:49 +09:00
co-authored by Claude Opus 5
parent 6a175ee293
commit 55f733fda6
16 changed files with 621 additions and 468 deletions
@@ -30,7 +30,7 @@ The 40250 source is the specification. Do not design behavior; transcribe it. Co
| --- | --- | --- |
| Platform-independent C++ logic (packet structs/handlers, sequence table, formulas, state machines in `UserInterface/`, `GameLib/`; `EterPack`, `EterLocale`) | Transliterate C++ -> C++, keeping class/function structure and names so each function has one counterpart | `extension/src/` |
| 40250 C++ logic that currently lives in GDScript | Port function by function, same names in snake_case, same order of statements | existing `.gd` owner |
| Python UI (`assets/root/*.py`, `uiscript/`) | Translate per `.py` file into its GDScript window, keeping method structure | `project/ui/` |
| Python UI (40250 `Client/Eternexus/root/*.py` + `uiscript/`, **not** `assets/root`) | Translate per `.py` file into its GDScript window, keeping method structure | `project/ui/` |
| Direct3D, Granny, Miles, Win32 input/window, IME, DirectX math | Platform adapter; equivalence by observable output | `extension/`, `project/` |
Mark every ported function with a one-line tag at its definition so coverage can be scanned
@@ -39,9 +39,9 @@ mechanically: `// 40250: CInstanceBase::SetMoveSpeed` (C++) or `# 40250: CInstan
## Round workflow
1. **Pick a unit** from the queue in `audit/remediation-roadmap.md` (ordered by user-visible
gameplay; see Priority). Skip units whose port-map entries are all `PORTED`/`ADAPTED`/`N_A` and
whose reference hash is unchanged.
1. **Pick a unit** from the current batch in `audit/remediation-roadmap.md`, or from
`port_map.py queue` (ordered by user-visible gameplay; see Priority). Run
`port_map.py init <unit>` and `port_map.py show <unit>` to get the function list.
2. **Read the whole reference unit** under the reference root (see `references/project-map.md`;
use `grep -a`, many files contain CP949 bytes). Read every current counterpart, found by the
`40250:` tags, the port-map entry, or `references/project-map.md`.
@@ -110,8 +110,12 @@ behavior verified from code inspection alone.
## Tools
- `scripts/port_map.py status | queue | init <unit> | show <unit> | check` — function inventory
(active `.vcxproj` sources + the 40250 Python root), per-unit status, and tag/port-map consistency.
Run `check` before every commit that touches `audit/port-map/`.
- `scripts/audit_ledger.py refresh --write | report --write | validate` — run once per batch, not
per round. Missing reference files are an error, not a silent fingerprint.
per round. Missing reference, implementation or test files are an error; `evidence.tests` holds
paths only, command lines go in `evidence.commands`.
- `scripts/audit_packet_registry.py`, `audit_phase_dispatch.py`, `audit_sequence_table.py` — run
when a round touches `extension/src/net/`.
- `scripts/audit_source_coverage.py` — maps active 40250 sources (from the `.vcxproj` files) to