# Modern runtime J4.3 — magic and player-sheet ownership **Status:** COMPLETE **Production commit:** `d02a12ceac54d035797b4c58f2fc2f0ccad9a4d6` **Parent plan:** `../plans/2026-07-26-modern-runtime-slice-j4.md` ## Result `RuntimeCharacterState` is the single presentation-independent owner for the coupled `Spellbook` and `LocalPlayerState`. The coupling is structural: vital-max calculations read active enchantments from that exact spellbook, so the two objects cannot be independently replaced or reconstructed by a host. The Runtime live-session router, App content loader, retained UI, developer tools, command routing, reset manifest, shutdown transaction, and future no-window host all borrow this one graph. `GameWindow` retains read-only compatibility properties only and no longer constructs either Core owner. The App content host still opens portal.dat and projects immutable retail spell metadata. It installs that table exactly once through the Runtime owner; no DAT or App type enters `AcDream.Runtime`. The interim desired-component snapshot introduced during J4.2 was deleted. `Spellbook.DesiredComponents` is now the only mutable desired-component owner, alongside learned spells, favorites, filters, active enchantments, and cooldowns. Inventory retains item/component objects and shortcut state, but no second component-count model. Session reset preserves the accepted order: spellbook state clears before the App magic request projection, while local-player vitals/attributes/skills/ properties/positions clear later at their existing reset edge. Direct Runtime disposal clears both halves, aggregates observer failures, and remains retryable until convergence. ## Retail basis J4.3 changes lifetime ownership only. It preserves the existing retail-derived wire and reset mechanisms: - `CPlayerSystem::OnEndCharacterSession @ 0x00562870`; - `PlayerModule::Clear @ 0x005D48A0`; - `CPlayerSystem::Begin @ 0x0055D410`; - PlayerDescription `0x0013` manifest replacement; - live spell/enchantment and vital update routing; - `CEnchantmentRegistry::OnCooldown @ 0x005943C0`; - `CreatureVital::GetMaxValue @ 0x0058F2DD`. The current magic behavior and its DAT/UI research remain recorded in `claude-memory/project_magic_ui_and_casting.md`. ## Automated evidence - Runtime suite: 162 passed. - App suite: 3,772 passed / 3 established skips. - Core suite: 3,305 passed / 2 established skips. - Core.Net suite: 600 passed. - UI abstractions: 545 passed. - Complete Release solution: 8,522 passed / 5 established skips. - Release build: pass, zero errors and 17 established test warnings. - `git diff --check`: pass. Focused coverage proves exact spellbook/local-player coupling, immutable metadata installation, desired-component single ownership, independent Runtime instances, group-specific reset, retryable disposal after failures, production construction uniqueness, exact session routing, retained-UI borrowing, and shutdown ordering. Existing Core/Core.Net suites continue to cover complete PlayerDescription replacement, incremental spell/enchantment/ vital changes, cooldowns, favorites, filters, skills, attributes, properties, positions, and ViewModel invalidation behavior. ## Exact-binary connected evidence `logs/connected-world-gate-20260726-083921/report.json` passed on exact source and embedded binary commit `d02a12ceac54d035797b4c58f2fc2f0ccad9a4d6`: - six capped checkpoints through login, outdoor/dungeon/facility travel and revisit plus one fresh-process uncapped reconnect checkpoint; - 243.672-second capped route and 61.329-second reconnect route; - both sessions exited gracefully with code zero; - zero failures. Its only warning is the established set of 25 expected world-edge landblock misses. ## Divergence audit The slice changes owner placement, reset composition, and failure containment without changing retail algorithms or wire behavior. No divergence row was added or retired. ## Rollback ```text git revert d02a12ceac54d035797b4c58f2fc2f0ccad9a4d6 ``` Revert J4.3 before J4.2 if the gameplay-state groups ever need to be unwound. Do not revert J3's canonical entity/object ownership to mask a character-state failure. ## Next boundary J4.4 moves the remaining presentation-independent character options and skill-derived command/bot projections into Runtime, then exposes borrowed immutable views and synchronous typed commands over all J4 owner groups. Controller, camera, input, animation, paperdoll, and panel state remain in App.