Split Main self-test into partial class

This commit is contained in:
gamer147
2026-08-02 15:52:34 -04:00
parent 8c1a656aa4
commit 20fd9cb694
4 changed files with 433 additions and 411 deletions

View File

@@ -135,6 +135,10 @@ The Godot deliverable includes `Himegari.sln` because Godot's .NET exporter requ
the project do not enter its import or export scan. `tools/export-linux-x64.ps1` produces and validates the
complete disposable artifact under `build/export/linux-x64/`.
`godot/Main.cs` retains the front-end's startup and runtime coordination. Its synthetic threaded/headless
regression harness lives in the behavior-neutral partial-class companion `godot/Main.SelfTest.cs`, keeping
the validation surface independently navigable without changing the Godot node type or invocation path.
The disposable `build/page-map-<SCENE>.jsonl` files are produced by editor/development Godot runs and map
runtime ADV page ordinals to their authoritative script offsets for `tools/locate_page.py`. Packaged exports
have no repository output tree and write their automatic maps below `user://diagnostics/page-maps` instead.

View File

@@ -524,7 +524,7 @@ requirements.
#### Planned maintenance slice — codebase consolidation
**Status (2026-08-02): step 1 complete; step 2 is next.** The runtime and tooling now have enough independent
**Status (2026-08-02): step 1 complete; step 2 underway.** The runtime and tooling now have enough independent
regression coverage to support behavior-preserving cleanup: 590 engine tests, eleven directly runnable Python
tool suites, the Godot build/self-test, and the installed-corpus gates. The project layout itself is sound,
but a few files have become navigation and ownership bottlenecks: `VirtualMachine.cs`, `GfxState.cs`,
@@ -559,6 +559,10 @@ do not mix mechanical moves with semantic changes.
stage, battle, card, routine, gallery, and general table implementations plus tests into importable
modules.
**Progress (2026-08-02):** the first bounded split moved `Main`'s synthetic scene builder and threaded
self-test harness into `godot/Main.SelfTest.cs`. The partial class retains the same node type and private
calls; runtime validation, including all 590 engine tests and the Godot threaded self-test, remains green.
**Gate:** no externally visible behavior or command changes; generated artifacts are byte-identical where
deterministic, and the corresponding engine, Python, Godot, and corpus validations remain green after
each domain move.
@@ -928,8 +932,9 @@ layer's rendering diverges from ADV; save layout.
---
## 8. Immediate next step
Begin step 2 of the **codebase consolidation** maintenance slice: behavior-neutral physical splits backed
by the tracked launcher and layered validation driver. Start with the embedded `Main` self-test surface,
then move one existing domain at a time while preserving public types, commands, and generated output.
Continue step 2 of the **codebase consolidation** maintenance slice: behavior-neutral physical splits backed
by the tracked launcher and layered validation driver. With the embedded `Main` self-test surface isolated,
move the `Main` audio control surface next, then one existing domain at a time while preserving public types,
commands, and generated output.
Concrete playthrough blockers may still preempt this bounded maintenance work; the consolidation effort does
not replace Phase B gameplay validation or the open cross-platform gates.