refactor(app): compose atomic frame roots

Move the complete update/render construction graph into a typed Phase-8 owner, explicitly carry the content dependencies it consumes, and publish both roots through one exact lease. Extract lifecycle resource sampling and frame-owned late bindings so partial startup and shutdown withdraw the same generation without window callbacks.

Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
Erik 2026-07-22 19:02:08 +02:00
parent 826f9ea9b5
commit 3628aeb520
21 changed files with 1052 additions and 374 deletions

View file

@ -34,8 +34,10 @@ What does NOT go here:
I.7 now owns streaming/session/hydration/local-player/teleport startup and
every late edge explicitly. I.8a now owns the focused session factory,
command targets, and sole gameplay input subscriber before frame publication.
`GameWindow.OnUpdate` and `GameWindow.OnRender` are typed orchestration
handoffs and the class is 2,149 raw lines. I.8bI.9 plus the remaining
I.8b now owns the complete update/render construction, exact atomic frame
publication, and lifecycle resource snapshot source. `GameWindow.OnUpdate`
and `GameWindow.OnRender` are typed orchestration handoffs and the class is
1,919 raw lines. I.8cI.9 plus the remaining
shutdown/closeout
cleanup is active in
[`docs/architecture/code-structure.md`](architecture/code-structure.md).

View file

@ -736,12 +736,14 @@ 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. I.8a moves the exact live-session reset/router graph, combat and
diagnostic command targets, and sole gameplay input subscriber into Phase 7
before frame publication. `GameWindow` is 2,149 raw lines after I.8a. I.8bL
remain active, with atomic frame-root publication next. The App gate passes
3,424 tests / 3 intentional skips and the complete Release suite passes 7,796
tests / 5 intentional skips. The clean solution build retains only the 17
test-project warnings tracked by #228; the I.8a behavior, architecture, and
adversarial reviews are clean.
before frame publication. I.8b moves the complete update/render construction
body into `FrameRootCompositionPhase`, publishes the pair through an exact
lease, and gives lifecycle resource sampling a focused source. `GameWindow` is
1,919 raw lines. I.8cL remain active, with terminal session start next. The
App gate passes 3,429 tests / 3 intentional skips and the complete Release suite
passes 7,801 tests / 5 intentional skips. The clean solution build retains only
the 17 test-project warnings tracked by #228; the I.8b corrected-diff review is
clean.
### 4.4 Exit criteria

View file

@ -104,11 +104,11 @@ controllers, selection/radar, landblock publishers, and portal/sky/particle
resources have transactional phase ownership and exact-owner late bindings.
I.7 adds the complete streaming/session/hydration/local-player/teleport phase,
including explicit reversible ownership for every late edge. `GameWindow` is
now 2,149 raw lines after I.8a, which composes the session factory, command
targets, and sole gameplay input subscriber before frame publication. I.8bI.9,
now 1,919 raw lines after I.8b, which also composes and atomically publishes the
complete update/render pair and extracts lifecycle resource sampling. I.8cI.9,
shutdown, canonical soak snapshots, and closeout checkpoints JL remain. The
App gate passes 3,424 tests / 3 intentional skips, the complete Release suite
passes 7,796 tests / 5 skips, and the I.8a corrected-diff review is clean.
App gate passes 3,429 tests / 3 intentional skips, the complete Release suite
passes 7,801 tests / 5 skips, and the I.8b corrected-diff review is 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

@ -60,11 +60,13 @@ publishers, and portal/sky/particle resources have transactional phase
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. I.8a adds the focused live-session runtime factory
and attaches command/input owners before frame publication. `GameWindow` is
2,149 raw lines. I.8bI.9 and checkpoints JL remain active. Issue #232 tracks
and attaches command/input owners before frame publication. I.8b composes and
atomically publishes the complete frame pair and extracts lifecycle resource
sampling. `GameWindow` is 1,919 raw lines. I.8cI.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,424 tests / 3 skips, the complete Release suite passes
7,796 tests / 5 skips, and the I.8a corrected-diff review is clean.
The App gate passes 3,429 tests / 3 skips, the complete Release suite passes
7,801 tests / 5 skips, and the I.8b corrected-diff review is clean.
Carried:
#153 far-teleport residual, #116 slide-response, the remaining R6 ownership cleanup plus

View file

@ -294,9 +294,11 @@ ledger only after the complete pipeline is live.
detailed session-binding, atomic-root, and terminal-start plan is
[`2026-07-22-gamewindow-slice-8-checkpoint-i8-frame-roots-session-start.md`](2026-07-22-gamewindow-slice-8-checkpoint-i8-frame-roots-session-start.md).
I.8a is complete: the session factory, command targets, and sole gameplay
input subscriber now belong to Phase 7 and publish before any frame root;
`GameWindow.cs` is 2,149 raw lines. I.8b atomic frame-root composition is the
active cut.
input subscriber now belong to Phase 7 and publish before any frame root.
I.8b composes the unchanged update/render graph in a focused phase, publishes
the pair through an exact owned slot lease, and moves lifecycle resource
sampling out of the window. `GameWindow.cs` is 1,919 raw lines. I.8c 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.8 Frame Roots and Session Start
**Status:** Active — I.8a complete; I.8b frame-root composition next
**Status:** Active — I.8aI.8b complete; I.8c terminal start next
**Parent:** `2026-07-22-gamewindow-slice-8-checkpoint-i-ordered-composition.md`
@ -81,6 +81,16 @@ Phase-7 suffix in reverse order.
## 3. I.8b — atomic frame-root composition
**Completed 2026-07-22.** `FrameRootCompositionPhase` now constructs the
unchanged render and update graphs from explicit prior-phase results and
focused runtime owners. `GameFrameGraphSlot.PublishOwned` publishes and
withdraws one exact pair. Optional lifecycle automation has a Phase-8 binding
owner, and `WorldLifecycleResourceSnapshotSource` samples the same canonical
owners without window callbacks or mirrored counters. The Phase-8 contract now
receives the Phase-2 content result explicitly because scripts and particles
are real frame dependencies; this removes a hidden reach-back through the
window shell.
Add `FrameRootCompositionPhase` implementing the existing
`IFrameRootCompositionPhase` contract. Its dependencies are focused App owners;
prior phase results supply all resources created during startup.

View file

@ -29,8 +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. I.1I.7 and I.8a are complete;
I.8b atomic frame-root publication is active. Detailed plan:
transactional partial-acquisition rollback. I.1I.8b are complete; I.8c
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.