diff --git a/AGENTS.md b/AGENTS.md index 898b51c1..b372b44a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -115,17 +115,17 @@ and the final two-client portal-out/materialization observer flow are user-gated. Deterministic world-lifecycle automation protects fresh login, outdoor/world-edge/dungeon travel, same-location revisit, exact graceful disconnect, and uncapped fresh-process reconnect with JSON/PNG artifacts. -Release builds; 6,714 tests pass / 5 skip. +Release builds; 6,940 tests pass / 5 skip. **Active prerequisite before new M4 subsystem work:** continue the behavior-preserving `GameWindow` decomposition reconciled on 2026-07-21. -Selection/interaction Slice 1, live-animation-presentation Slice 2, and -complete live-session ownership Slice 3 are landed. `LiveSessionController` -now owns the exact resolve/connect/enter/tick/reconnect/graceful-close -generation; GameWindow has no parallel session/router/command fields or old -lifecycle bodies. `GameWindow` is 14,310 lines, 274 fields, and 190 methods. -Slice 4 extracts live-entity App integration next; later slices finish -landblock presentation, update/render orchestration, and composition cleanup. +Selection/interaction Slice 1, live-animation-presentation Slice 2, complete +live-session ownership Slice 3, and live-entity App integration Slice 4 are +landed. Focused hydration, teardown, inbound-authority, network-update, and +motion-runtime owners now sit over canonical `LiveEntityRuntime` without a +second GUID dictionary. `GameWindow` is 10,301 lines, 267 fields, and 163 +methods. Slice 5 extracts landblock presentation next; later slices finish +update/render orchestration and composition cleanup. See `docs/architecture/code-structure.md`. **Carried:** #153, #116, remaining R6 ownership cleanup, TS-50/TS-51, Modern Pipeline MP1b+, and #225's lifestone/particle alpha visual gate. diff --git a/CLAUDE.md b/CLAUDE.md index a1743ce6..44e9d230 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -113,17 +113,17 @@ and the final two-client portal-out/materialization observer flow are user-gated. Deterministic world-lifecycle automation protects fresh login, outdoor/world-edge/dungeon travel, same-location revisit, exact graceful disconnect, and uncapped fresh-process reconnect with JSON/PNG artifacts. -Release builds; 6,714 tests pass / 5 skip. +Release builds; 6,940 tests pass / 5 skip. **Active prerequisite before new M4 subsystem work:** continue the behavior-preserving `GameWindow` decomposition reconciled on 2026-07-21. -Selection/interaction Slice 1, live-animation-presentation Slice 2, and -complete live-session ownership Slice 3 are landed. `LiveSessionController` -now owns the exact resolve/connect/enter/tick/reconnect/graceful-close -generation; GameWindow has no parallel session/router/command fields or old -lifecycle bodies. `GameWindow` is 14,310 lines, 274 fields, and 190 methods. -Slice 4 extracts live-entity App integration next; later slices finish -landblock presentation, update/render orchestration, and composition cleanup. +Selection/interaction Slice 1, live-animation-presentation Slice 2, complete +live-session ownership Slice 3, and live-entity App integration Slice 4 are +landed. Focused hydration, teardown, inbound-authority, network-update, and +motion-runtime owners now sit over canonical `LiveEntityRuntime` without a +second GUID dictionary. `GameWindow` is 10,301 lines, 267 fields, and 163 +methods. Slice 5 extracts landblock presentation next; later slices finish +update/render orchestration and composition cleanup. See `docs/architecture/code-structure.md`. **Carried:** #153, #116, remaining R6 ownership cleanup, TS-50/TS-51, Modern Pipeline MP1b+, and #225's lifestone/particle alpha visual gate. diff --git a/docs/architecture/acdream-architecture.md b/docs/architecture/acdream-architecture.md index 1b2c5e75..743ab0a5 100644 --- a/docs/architecture/acdream-architecture.md +++ b/docs/architecture/acdream-architecture.md @@ -838,8 +838,10 @@ Current movement/collision ownership: shared retail inventory-request owner; Slice 2 moved final animation presentation into `LiveEntityAnimationPresenter`; Slice 3 moved the complete session generation into `LiveSessionController` plus its focused host and - routers. Slice 4 live-entity App integration is next. The reconciled ledger - and sequence live in `docs/architecture/code-structure.md`. This decision + routers; Slice 4 moved hydration, teardown, inbound authority, network + updates, and reusable motion-runtime policy over canonical + `LiveEntityRuntime`. Slice 5 landblock presentation is next. The reconciled + ledger and sequence live in `docs/architecture/code-structure.md`. This decision does not reclassify the remaining L.2 conformance work or Track LH. Full `GameEntity` type aggregation remains a separate, higher-risk target after diff --git a/docs/architecture/code-structure.md b/docs/architecture/code-structure.md index 17608be2..a9ddf3cd 100644 --- a/docs/architecture/code-structure.md +++ b/docs/architecture/code-structure.md @@ -1,7 +1,7 @@ # acdream — code structure & extraction sequence **Status:** Living document. Created 2026-05-16; implementation reconciliation -completed 2026-07-21; Slices 1–3 landed the same day. This is the active +completed 2026-07-21; Slices 1–4 landed the same day. This is the active structural program before new M4 subsystems enter the App layer. **Purpose:** Describe the desired structural state of the App layer, explain the rules we've adopted, and lay out the safe extraction @@ -26,6 +26,7 @@ baseline cf50ee3d 15,723 lines / 278 fields / 205 method after Slice 1 14,912 lines / 278 fields / 191 methods after Slice 2 14,546 lines / 277 fields / 190 methods after Slice 3 14,310 lines / 274 fields / 190 methods +after Slice 4 10,301 lines / 267 fields / 163 methods ``` `GameWindow` is the single object that: @@ -393,7 +394,7 @@ useful ordering seam, but its ownership status is **partial**. |---|---|---| | Startup options | **Complete** | `RuntimeOptions` owns startup configuration (`eda936dc`). Remaining direct environment reads are legacy runtime diagnostics, not startup configuration. | | Network session | **Complete** | `LiveSessionController` owns resolve/create/bind/Connect/selection/EnterWorld/Tick/stop/reconnect/disposal; `LiveSessionLifecycleHost` is the narrow App composition boundary; `LiveSessionEventRouter` and `LiveSessionCommandRouter` own exact inbound/outbound lifetimes. `GameWindow` retains one controller field and focused domain sink factories only (`d9ccf8a6`, `6a5d9e2e`). | -| Live identity/lifetime | **Complete core owner** | `LiveEntityRuntime` owns incarnation identity, accepted snapshots/timestamps, runtime components, logical/spatial lifetime, and teardown. `GameWindow` still owns large hydration and wire-to-presentation adapter bodies. | +| Live identity/lifetime | **Complete App integration** | `LiveEntityRuntime` owns incarnation identity, accepted snapshots/timestamps, runtime components, and logical/spatial lifetime. `LiveEntityHydrationController`, `LiveEntityRuntimeTeardownController`, and `LiveEntityNetworkUpdateController` own DAT-backed hydration, retryable cleanup, and accepted Position/Vector/State/Movement presentation without a second GUID owner (`aa90c646`). | | Inbound/object-frame order | **Partial** | `RetailInboundEventDispatcher`, `RetailLiveFrameCoordinator`, `LiveEntityAnimationScheduler`, `LiveEntityAnimationPresenter`, static scheduler, remote/projectile updaters, and teleport owners are shipped. `AdvanceLiveObjectRuntimeCore` retains the visible cross-owner order until Slice 6. | | World reveal | **Complete** | `WorldRevealCoordinator` owns login/portal readiness and reveal lifetime (`a4ef5788`). The accepted deterministic lifecycle trace did not change after extraction. | | Retained gameplay UI | **Mostly complete feature ownership** | `RetailUiRuntime` and focused panel/controllers own layout and behavior. `GameWindow.OnLoad` still performs substantial service composition, which is allowed until the final composition cleanup. | @@ -500,11 +501,10 @@ client processes exited normally. `GameWindow` fell another 236 lines and three fields to 14,310 lines / 274 fields / 190 methods. Slice 4 is next. -#### Slice 4 — extract live-entity App integration +#### Slice 4 — extract live-entity App integration — COMPLETE 2026-07-21 Detailed execution ledger: -[`docs/plans/2026-07-21-gamewindow-slice-4-live-entity-integration.md`](../plans/2026-07-21-gamewindow-slice-4-live-entity-integration.md) -(active). +[`docs/plans/2026-07-21-gamewindow-slice-4-live-entity-integration.md`](../plans/2026-07-21-gamewindow-slice-4-live-entity-integration.md). This is two owners, not one replacement god object: @@ -534,8 +534,15 @@ subtree recovery now use independent authority transactions and preserve the same logical/runtime identities. Checkpoint E is complete in `f38822c4`: Delete, visibility prune, retryable exact-incarnation component cleanup, and derived remote stop-observation lifetime now have focused owners. Checkpoint F -(Position/Vector/State/Movement and equal-generation CreateObject routing) is -active. +completed in `aa90c646`: accepted Position/Vector/State/Movement and the +equal-generation CreateObject tail now route through focused owners. +Independent authority/version captures survive reentrant callbacks and GUID +reuse; shared motion-runtime policy is one-way bound and no extracted owner +keeps a second identity dictionary. ForcePosition serializes and stamps one +exact canonical outbound Position. Three corrected-diff reviews, the complete +6,940-test Release suite, and the 310-second seven-destination connected R6 +route all passed. `GameWindow` is 10,301 lines / 267 fields / 163 methods. +Slice 5 is active next. #### Slice 5 — extract landblock presentation diff --git a/docs/plans/2026-04-11-roadmap.md b/docs/plans/2026-04-11-roadmap.md index 9deb537e..9909f504 100644 --- a/docs/plans/2026-04-11-roadmap.md +++ b/docs/plans/2026-04-11-roadmap.md @@ -38,9 +38,19 @@ tests with five intentional skips. Its connected gate passed capped login, five travel/revisit checkpoints, graceful close, and uncapped fresh-process reconnect in 306 seconds. -**Next:** Slice 4 extracts live-entity App integration into focused hydration -and network-update controllers over the existing canonical -`LiveEntityRuntime`, without adding a second GUID or resource owner. +Slice 4 live-entity App integration landed 2026-07-21: focused hydration, +retryable teardown, inbound authority, network-update, equal-generation +CreateObject, and reusable motion-runtime owners now sit over the canonical +`LiveEntityRuntime`. No extracted owner adds a second GUID dictionary. +`GameWindow` is now 10,301 lines, 267 fields, and 163 methods; the Release suite +passes 6,940 tests with five intentional skips. The 310-second connected R6 +gate passed seven destinations/revisits, movement/jump/combat exercises, and +graceful close. + +**Next:** Slice 5 extracts DAT-backed landblock build, publication, demotion, +and retirement into `LandblockPresentationPipeline` while preserving +`StreamingController` residency decisions and `GpuWorldState` spatial +ownership. This is a behavior-preserving structural program. Severe regressions still get root-cause fixes in separate commits; ordinary feature work resumes with M4 diff --git a/docs/plans/2026-05-12-milestones.md b/docs/plans/2026-05-12-milestones.md index 51a2bb13..f26351e9 100644 --- a/docs/plans/2026-05-12-milestones.md +++ b/docs/plans/2026-05-12-milestones.md @@ -17,10 +17,12 @@ layer, the active structural prerequisite is the behavior-preserving `GameWindow` decomposition in [`docs/architecture/code-structure.md`](../architecture/code-structure.md). The 2026-07-21 audit baseline was 15,723 lines, 278 fields, and 205 methods. -Selection/interaction Slice 1, live-animation-presentation Slice 2, and -complete live-session ownership Slice 3 are complete. `GameWindow` is now -14,310 lines, 274 fields, and 190 methods. Slice 4 — live-entity App -integration — is active next. +Selection/interaction Slice 1, live-animation-presentation Slice 2, complete +live-session ownership Slice 3, and live-entity App integration Slice 4 are +complete. `GameWindow` is now 10,301 lines, 267 fields, and 163 methods. The +full Release suite passes 6,940 tests / 5 skips, and Slice 4's seven-destination +connected R6 route passed in 310 seconds. Slice 5 — landblock presentation — +is active next. Carried: #153 far-teleport residual, #116 slide-response, the remaining R6 ownership cleanup plus diff --git a/docs/plans/2026-07-21-gamewindow-slice-4-live-entity-integration.md b/docs/plans/2026-07-21-gamewindow-slice-4-live-entity-integration.md index 5fb2ed19..1c82c42c 100644 --- a/docs/plans/2026-07-21-gamewindow-slice-4-live-entity-integration.md +++ b/docs/plans/2026-07-21-gamewindow-slice-4-live-entity-integration.md @@ -1,6 +1,6 @@ # GameWindow Slice 4 — live-entity App integration -**Status:** Active 2026-07-21. +**Status:** Complete 2026-07-21. **Parent program:** [`docs/architecture/code-structure.md`](../architecture/code-structure.md), Slice 4. **Baseline:** `ed9dc366`; `GameWindow.cs` is 14,310 lines, 274 fields, and 190 methods before this slice. Release baseline: 6,714 passed / 5 skipped. @@ -30,10 +30,10 @@ them inside a mechanical extraction. identity across leave-world/re-entry. Landed in `fe551496`; 6,877 Release tests passed / 5 skipped after three clean retail, architecture, and adversarial re-reviews on 2026-07-21. -- [ ] E — Delete/prune and retryable exact-incarnation teardown ownership. -- [ ] F — Position/Vector/State/Movement controller, same-generation CreateObject +- [x] E — Delete/prune and retryable exact-incarnation teardown ownership. +- [x] F — Position/Vector/State/Movement controller, same-generation CreateObject tail, independent authority gates, and direct inbound cutover. -- [ ] G — `GameWindow` cleanup, three-agent review cycle, full Release suite, +- [x] G — `GameWindow` cleanup, three-agent review cycle, full Release suite, connected gates, documentation, and durable memory closeout. ## 1. Outcome and non-goals @@ -343,6 +343,20 @@ skips and no errors; all three corrected-diff re-reviews were clean. - Route session callbacks directly and remove old GameWindow handlers. - Full Release build/test; review cycle. +Completed in `aa90c646`. `LiveEntityNetworkUpdateController` now owns accepted +Position, Vector, State, and Movement routing; +`LiveEntitySameGenerationUpdateRouter` owns the retail equal-generation +CreateObject tail. `LiveEntityInboundAuthorityGate` pins the exact record, +independent channel authority, and velocity authority before any reentrant App +callback. `LiveEntityMotionRuntimeController` owns the shared physics-host, +Setup, MoveTo/Sticky, Hidden-target, and server-controlled-cycle policy behind +a once-bound construction bridge. ForcePosition preserves retail's +blip-then-immediate-F7B1 order and stamps the exact Position snapshot serialized +on the wire. Focused tests cover stale/equal/wrapped timestamps, callback +replacement, GUID reuse, projectile/body/remote Vector precedence, mixed +same-generation routing, bridge binding, and the exact 56-byte autonomous +position payload. All three corrected-diff re-reviews were clean. + ### G — closeout - Structural tests prove both controllers lack identity dictionaries and @@ -358,6 +372,16 @@ skips and no errors; all three corrected-diff re-reviews were clean. ledger, `AGENTS.md`/`CLAUDE.md` when current-state pointers change, and durable GameWindow/live-runtime memory. +Completed 2026-07-21. `GameWindow` fell from the Slice-3 baseline of 14,310 +lines to 10,301 lines; its top-level field and method declarations are now 267 +and 163. Release build completed with zero warnings/errors and the full suite +passed 6,940 tests with five intentional skips. The 310-second connected R6 +route passed login, Caul/Sawato/Rynthid/Aerlinthe/Sawato-revisit/Holtburg/ +Caul-return materialization, turn sampling, three locomotion/jump/combat +exercises, and graceful close. Live-server population churn, previously known +missing DAT VFX diagnostics, and empty world-edge landblocks remained warnings, +not lifecycle failures. Slice 5 is the next structural owner boundary. + ## 5. Adversarial acceptance matrix Automated acceptance includes: