refactor(app): compose session and player startup

Move streaming, live-session, hydration, local-player, combat, and teleport construction behind the typed Phase-7 boundary. Add exact-owner runtime bindings and focused spawn-claim classification so partial startup rolls back without retaining old session targets while preserving the accepted construction and frame dependencies.

Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
Erik 2026-07-22 18:28:32 +02:00
parent 3573da12e1
commit 7771c07fb6
31 changed files with 1759 additions and 532 deletions

View file

@ -27,13 +27,14 @@ What does NOT go here:
## Current queue — 2026-07-22
- **Active structural work:** `GameWindow` decomposition. Slices 17 and Slice
8 checkpoints AH are complete; I.1I.6 now own the executable ordered
8 checkpoints AH are complete; I.1I.7 now own the executable ordered
startup path through retained UI and live presentation, including the
canonical runtime/world, selection/radar, landblock publishers, and
portal/sky/particle resources.
`GameWindow.OnUpdate` and `GameWindow.OnRender` are typed orchestration
handoffs and the class is 2,840 raw lines. I.7I.9 plus the remaining
shutdown/closeout
I.7 now owns streaming/session/hydration/local-player/teleport startup and
every late edge explicitly. `GameWindow.OnUpdate` and `GameWindow.OnRender`
are typed orchestration handoffs and the class is 2,479 raw lines. I.8I.9
plus the remaining shutdown/closeout
cleanup is active in
[`docs/architecture/code-structure.md`](architecture/code-structure.md).
This is the behavior-preserving prerequisite before new M4 feature bodies.

View file

@ -731,11 +731,14 @@ retained UI, live presentation, and landblock publication into ordered
composition phases. Typed exact-owner sources bridge later session,
selection, radar, view-plane, diagnostics, inventory, hydration, and automation
owners without callbacks to the window. The old item-use and selection wrapper
methods are deleted. `GameWindow` is 2,840 raw lines after I.6. I.7L remain
active, with session, streaming, and hydration composition next. The App gate
passes 3,407 tests / 3 intentional skips and the complete Release suite passes
7,779 tests / 5 intentional skips. The clean solution build retains only the
17 test-project warnings tracked by #228; the I.6 behavior, architecture, and
methods are deleted. I.7 now owns the complete streaming/session/hydration/
local-player/teleport construction phase and every late edge through named
exact-owner tokens; the former 432-line inline body and spawn-claim memo are
gone. `GameWindow` is 2,479 raw lines after I.7. I.8L remain active, with
atomic frame-root publication and terminal session start next. The App gate
passes 3,420 tests / 3 intentional skips and the complete Release suite passes
7,792 tests / 5 intentional skips. The clean solution build retains only the
17 test-project warnings tracked by #228; the I.7 behavior, architecture, and
adversarial reviews are clean.
### 4.4 Exit criteria

View file

@ -97,15 +97,17 @@ runtime-target binding without replay, and one current/toon settings owner.
`GameWindow` is 3,663 lines / 162 fields / 37 methods at G. Checkpoint H adds
sole terrain-atlas and sky-shader roots, one retained Host/runtime lease, an
atomic update/render frame-root pair, prepared portal fallback/transfer, and
checked retryable GL leaf construction and state mutation. Checkpoint I.1I.6
checked retryable GL leaf construction and state mutation. Checkpoint I.1I.7
now provide the executable ordered startup pipeline through retained UI and
live presentation. The canonical live runtime/world, presentation/effect
controllers, selection/radar, landblock publishers, and portal/sky/particle
resources have transactional phase ownership and exact-owner late bindings.
`GameWindow` is now 2,840 raw lines. I.7I.9, shutdown, canonical soak
snapshots, and closeout checkpoints JL remain. The App gate passes 3,407 tests
/ 3 intentional skips, the complete Release suite passes 7,779 tests / 5
skips, and all three I.6 corrected-diff reviews are clean.
I.7 adds the complete streaming/session/hydration/local-player/teleport phase,
including explicit reversible ownership for every late edge. `GameWindow` is
now 2,479 raw lines. I.8I.9, shutdown, canonical soak snapshots, and closeout
checkpoints JL remain. The App gate passes 3,420 tests / 3 intentional skips,
the complete Release suite passes 7,792 tests / 5 skips, and all three I.7
corrected-diff reviews are clean.
This is a behavior-preserving structural program. Severe regressions still get
root-cause fixes in separate commits; ordinary feature work resumes with M4

View file

@ -53,15 +53,17 @@ startup application, and inert late target binding. `GameWindow` is 3,663
lines / 162 fields / 37 methods at G. Checkpoint H adds sole terrain/sky
resource roots, one retained Host/runtime lease, an atomic update/render root
pair, a prepared portal fallback/transfer transaction, and checked retryable GL
leaf construction. Checkpoint I.1I.6 now provide the executable ordered
leaf construction. Checkpoint I.1I.7 now provide the executable ordered
startup pipeline through retained UI and live presentation. The canonical live
runtime/world, presentation/effect controllers, selection/radar, landblock
publishers, and portal/sky/particle resources have transactional phase
ownership and exact-owner late bindings. `GameWindow` is 2,840 raw lines.
I.7I.9 and checkpoints JL remain active. Issue #232 tracks process-residency
variance in the soak without loosening its leak threshold. The App gate passes
3,407 tests / 3 skips, the complete Release suite passes 7,779 tests / 5 skips,
and all three I.6 corrected-diff reviews are clean.
ownership and exact-owner late bindings. I.7 now owns the complete streaming,
session, hydration, local-player, combat, and teleport startup graph, including
named reversible late edges. `GameWindow` is 2,479 raw lines. I.8I.9 and
checkpoints JL remain active. Issue #232 tracks process-residency variance in
the soak without loosening its leak threshold. The App gate passes 3,420 tests
/ 3 skips, the complete Release suite passes 7,792 tests / 5 skips, and all
three I.7 corrected-diff reviews are clean.
Carried:
#153 far-teleport residual, #116 slide-response, the remaining R6 ownership cleanup plus

View file

@ -281,9 +281,16 @@ ledger only after the complete pipeline is live.
under the same ownership contract. `GameWindow.cs` is 2,840 raw lines; the
App gate passes 3,407 tests / 3 intentional skips and the complete Release
suite passes 7,779 tests / 5 intentional skips. I.7 session, streaming, and
hydration composition is the active cut; its ownership, rollback, and gate
hydration composition is complete; its ownership, rollback, and gate
contract is
[`2026-07-22-gamewindow-slice-8-checkpoint-i7-session-player.md`](2026-07-22-gamewindow-slice-8-checkpoint-i7-session-player.md).
- I.7 removes the former 432-line Phase-7 body. Streaming, session, hydration,
local-player, combat, and teleport startup now compose through one typed
result; all late edges have named reversible exact-owner tokens. The
spawn-claim DAT range memo has a focused owner. `GameWindow.cs` is 2,479 raw
lines. App Release passes 3,420 tests / 3 skips; the complete Release suite
passes 7,792 tests / 5 skips with the same 17 warnings tracked by #228. I.8
frame-root publication and terminal session start is the active cut.
Checkpoint I remains active until I.9 closes the complete nine-phase pipeline.
## 6. Automated acceptance

View file

@ -1,6 +1,6 @@
# GameWindow Slice 8 — Checkpoint I.7 Session and Player Composition
**Status:** Active
**Status:** Complete 2026-07-22
**Parent:** `2026-07-22-gamewindow-slice-8-checkpoint-i-ordered-composition.md`
@ -183,3 +183,20 @@ edge has explicit reversible ownership, failure and retry gates pass, the old
window body is gone, documentation/memory report the measured class size and
test totals, and the commit is independently buildable. I.8 then composes the
update/render roots and terminal session start over the typed result graph.
## 8. Completion evidence
- `SessionPlayerCompositionPhase` is the production Phase-7 path. The former
432-line radius/streaming/session/hydration/player/teleport block is absent
from `GameWindow`.
- `SessionPlayerRuntimeBindings` plus exact-owner tokens cover every Phase-7
late edge. Focused tests cover reverse retry, rebind, and stale-token safety.
- `DatSpawnClaimHydrationClassifier` owns the former window memo and exact
indoor-cell boundaries, including missing/empty DAT cases and reset.
- `GameWindow.cs` is 2,479 raw lines, down 13,244 lines (84.2%) from the
15,723-line campaign baseline.
- App Release: 3,420 passed / 3 intentional skips. Complete Release suite:
7,792 passed / 5 intentional skips. Clean solution build: 0 errors and the
17 pre-existing test warnings tracked by #228.
- Behavior/order, architecture/ownership, and adversarial rollback reviews are
clean. No gameplay mechanism changed and no divergence row was introduced.

View file

@ -29,7 +29,8 @@ audit.
- [x] H — give terrain atlas, sky shader, retained `UiHost`, and both frame roots
explicit single ownership and transfer seams.
- [ ] I — group `OnLoad` into small ordered, fakeable composition phases with
transactional partial-acquisition rollback. Active detailed plan:
transactional partial-acquisition rollback. I.1I.7 are complete; I.8
frame-root publication and terminal session start is active. Detailed plan:
[`2026-07-22-gamewindow-slice-8-checkpoint-i-ordered-composition.md`](2026-07-22-gamewindow-slice-8-checkpoint-i-ordered-composition.md).
- [ ] J — move the exact retryable shutdown manifest to a focused lifetime
owner and prove all partial-load/reentrant/retry paths.