docs(runtime): close canonical action ownership

Record J5.1's exact Runtime selection, combat, and target-mode owner, its automated and connected acceptance evidence, rollback, and the J5.2 interaction-transaction boundary. Synchronize architecture, roadmap, milestones, issues, and agent handoff state.

Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
Erik 2026-07-26 10:54:12 +02:00
parent b298f99f91
commit be73bccf5a
10 changed files with 206 additions and 17 deletions

View file

@ -67,8 +67,9 @@ What does NOT go here:
view/command/event/lifecycle contract are live. J2's canonical
session/transport lifetime and ordered inbound route are complete at
`75930787`; J3 canonical entity/object lifetime and J4 gameplay-state
ownership are complete through `89e6b207`. J5 movement, physics,
interaction, and combat ownership is active from
ownership are complete through `89e6b207`. J5.1 canonical selection,
combat, and target-mode ownership is complete at `b298f99f`; J5.2
interaction-transaction ownership is active from
[`plans/2026-07-25-modern-runtime-slice-j.md`](plans/2026-07-25-modern-runtime-slice-j.md).
The [documentation map](README.md) defines how this tactical ledger relates to

View file

@ -224,7 +224,9 @@ src/
transaction/session-state owner
RuntimeCharacterState.cs -> coupled spellbook/local-player plus
character-option/run-jump owner
-> J3J4 complete; J5 movement/physics/interaction/combat active
RuntimeActionState.cs -> exact selection/combat/target-mode owner
InteractionState.cs -> presentation-free cursor-target mode state
-> J3J4 and J5.1 complete; J5.2 interaction transactions active
-> may reference Core, Core.Net, Content, and Plugin.Abstractions only
-> must never reference App, UI, Silk.NET, OpenAL, Arch, or ImGui
@ -480,6 +482,15 @@ state. `RuntimeEntityRecord` deliberately still carries the canonical
Live `PhysicsDesc` effect fields replace Setup defaults on that same exact
sidecar; rebucketing never recreates it.
`RuntimeActionState` is the one action-state root. It constructs and owns the
exact `SelectionState`, `CombatState`, and presentation-free
`InteractionState` instances borrowed by direct/headless and graphical
consumers. App retained widgets, input controllers, plugins, session routing,
and `GameWindow` hold views or exact borrowed children; none may construct a
parallel production action owner. J5.2 moves the related use, appraisal,
pickup, and approach transaction lifetime into Runtime while preserving
retail's press-time ordering and ACE's authoritative completion.
`GpuWorldState` owns spatial buckets only and retains the exact projection key
through loaded/pending movement, landblock retirement/reload, origin recenter,
quiescence, and visibility transition delivery. Register, rebucket, withdraw,

View file

@ -474,10 +474,10 @@ useful ordering seam, but its ownership status is **partial**.
| Inbound/object-frame order | **Complete App orchestration** | `UpdateFrameOrchestrator` owns the complete typed host phase graph; `RetailInboundEventDispatcher`, `RetailLiveFrameCoordinator`, `LiveObjectFrameController`, `LiveSpatialPresentationReconciler`, streaming/input/teleport/player-mode/camera owners preserve the accepted order. `GameWindow.OnUpdate` is one profiler-scoped handoff (`e91f3102`). |
| World reveal | **Complete** | `WorldRevealCoordinator` owns login/portal readiness, generation quiescence, and the exact streaming destination reservation. Login auto-entry and portal completion close only their active generation; stale completion cannot clear its replacement. Delayed portals retain the authored tunnel and centered retail wait notice rather than force-revealing incomplete content. Quiesced destination projections may become spatially resident for renderer preparation while all availability-gated gameplay consumers stay closed. |
| 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. |
| Selection/interaction | **Complete** | `WorldSelectionQuery` owns read-only picking/classification/range queries; `SelectionInteractionController` owns selection intent, Use/PickUp transport, exact-incarnation queues, and auto-walk deferral; `ItemInteractionController` owns ItemHolder policy plus the shared retail inventory-request transaction. `GameWindow` retains construction and narrow lifecycle forwarding only. |
| Selection/interaction | **J5.1 complete; J5.2 active** | Runtime `RuntimeActionState` owns the exact selection, combat, and presentation-free target-mode children. App `WorldSelectionQuery` remains a graphical read-only picker; App interaction controllers currently retain use/appraisal/pickup/approach transaction policy until J5.2 moves that lifetime behind Runtime commands and views without changing retail press-time behavior. |
| Landblock presentation | **Complete** | `LandblockBuildFactory` owns the captured-origin DAT transaction; concrete render/physics/DAT-static publishers and `LandblockPresentationPipeline` own typed-meter publication and exact retryable retirement. `StreamingController` owns stable destination/control/unload/Near/Far queues and destination reservation. CPU mesh-cache restaging requires an exact live owner. `StreamingOriginRecenterCoordinator` serializes old-window retirement with teleport/session origin lifetimes. `GameWindow` retains construction and one pipeline field only (`c79d0a49`, closeout `4a205a3e`; Slice E closeout `91e82c3c`). |
| Render-frame orchestration | **Complete** | `RenderFrameOrchestrator` owns the GPU-flight, resource, world/PView/shared-alpha, private-presentation, diagnostics, screenshot, and recovery graph. `GameWindow.OnRender` takes one logical window-size snapshot and performs one immutable handoff (`9d7df1bf`). |
| Unified `GameEntity` | **Slice J active at J5** | Canonical identity, retained-object lifetime, direct views, ordered entity/object deltas, and J4 gameplay state share failure-safe Runtime owners while exact graphical sidecars stay in App. J5J7 move movement/physics/interaction/combat and world authority before one Runtime composition root. |
| Unified `GameEntity` | **Slice J active at J5.2** | Canonical identity, retained-object lifetime, direct views, ordered entity/object deltas, J4 gameplay state, and J5.1 action state share failure-safe Runtime owners while exact graphical sidecars stay in App. J5.2J7 move interaction transactions, movement/physics/combat, and world authority before one Runtime composition root. |
### 4.3 Revised extraction sequence

View file

@ -1,6 +1,6 @@
# acdream — strategic roadmap
**Status:** Living document. Updated 2026-07-26. **M3 landed; M4 is active.** M3's retail casting/UI, R6 locomotion/collision/projectile/teleport/radar rebaseline, deterministic fresh-login/portal world lifecycle, and final two-client portal observer flow are user-gated. All eight slices of the behavior-preserving ownership campaign in [`docs/architecture/code-structure.md`](../architecture/code-structure.md), their automated closeout, and the user's connected visual matrix are complete. Modern Runtime J3 canonical entity/object lifetime and J4 gameplay-state ownership are closed at `89e6b207`; J5 movement/physics/interaction/combat ownership is active. Issue #225's lifestone/particle alpha comparison remains a separate rendering visual gate.
**Status:** Living document. Updated 2026-07-26. **M3 landed; M4 is active.** M3's retail casting/UI, R6 locomotion/collision/projectile/teleport/radar rebaseline, deterministic fresh-login/portal world lifecycle, and final two-client portal observer flow are user-gated. All eight slices of the behavior-preserving ownership campaign in [`docs/architecture/code-structure.md`](../architecture/code-structure.md), their automated closeout, and the user's connected visual matrix are complete. Modern Runtime J3 canonical entity/object lifetime and J4 gameplay-state ownership are closed at `89e6b207`; J5.1 canonical selection/combat/target-mode ownership is closed at `b298f99f`, and J5.2 interaction transactions are active. Issue #225's lifestone/particle alpha comparison remains a separate rendering visual gate.
**Purpose:** One source of truth for where the project is and where it's going. Every observed defect or missing feature has a named phase that owns it; when something looks wrong in-game, look here to find the phase that'll address it. Implementation details live in per-phase specs under `docs/superpowers/specs/`, not in this file.
---
@ -1737,8 +1737,13 @@ port in any phase — no separate listing here.
> item-use UI cannot construct a second transaction gate, and the combined
> failure-safe ledger converges. Its 175 Runtime tests, 3,780 App tests / 3
> skips, 8,544-test / 5-skip complete Release suite, exact-binary
> lifecycle/reconnect gate, and canonical nine-stop route pass. J5
> movement/physics/interaction/combat ownership is active.
> lifecycle/reconnect gate, and canonical nine-stop route pass. J5.1 is
> complete at `b298f99f`: Runtime owns one exact selection, combat, and
> temporary target-mode graph; every graphical/direct consumer borrows it,
> and the App fallback owner is deleted. Its 182 Runtime tests, 3,779 App
> tests / 3 skips, 8,550-test / 5-skip complete Release suite, and
> exact-binary seven-checkpoint lifecycle/reconnect gate pass. J5.2
> interaction-transaction ownership is active.
> The historical exact cutover
> rollback remains
> `git revert ef1d263337997bb030eadb7b8e71d73dc659907a`. Slice H is complete:

View file

@ -213,7 +213,12 @@ residency is `0/0/0` at every stable checkpoint and teardown converges. Slice I
the combined failure-safe ownership ledger converges. Its 175 Runtime
tests, 3,780 App tests / 3 skips, 8,544 full Release tests / 5 skips,
exact-binary lifecycle/reconnect gate, and canonical nine-stop route pass.
J5 movement/physics/interaction/combat ownership is active under
J5.1 completed at `b298f99f`: one `RuntimeActionState` owns selection,
combat, and temporary target mode; every graphical/direct consumer borrows
those exact children, and the App fallback owner is deleted. Its 182 Runtime
tests, 3,779 App tests / 3 skips, 8,550 full Release tests / 5 skips, and
exact-binary seven-checkpoint lifecycle/reconnect route pass. J5.2
interaction-transaction ownership is active under
[`2026-07-25-modern-runtime-slice-j.md`](2026-07-25-modern-runtime-slice-j.md).
Slice-I closeout evidence is
[`../research/2026-07-25-slice-i7-closeout.md`](../research/2026-07-25-slice-i7-closeout.md).
@ -235,6 +240,8 @@ Slice-J4.4 closeout evidence is
[`../research/2026-07-26-slice-j4-4-character-projections.md`](../research/2026-07-26-slice-j4-4-character-projections.md).
Slice-J4.5 closeout evidence is
[`../research/2026-07-26-slice-j4-5-gameplay-state-closeout.md`](../research/2026-07-26-slice-j4-5-gameplay-state-closeout.md).
Slice-J5.1 closeout evidence is
[`../research/2026-07-26-slice-j5-1-canonical-action-state.md`](../research/2026-07-26-slice-j5-1-canonical-action-state.md).
The historical exact G4 visual rollback remains
`git revert ef1d263337997bb030eadb7b8e71d73dc659907a`.

View file

@ -284,6 +284,15 @@ The executable sub-slice ledger, presentation boundary, acceptance gates, and
rollback discipline live in
[`2026-07-26-modern-runtime-slice-j5.md`](2026-07-26-modern-runtime-slice-j5.md).
J5.1 completed at `b298f99f`. `RuntimeActionState` owns the one exact
selection, combat, and temporary target-mode graph. Program, plugins, retained
UI, session routing, typed commands/views, and shutdown borrow its children;
the App interaction-state class and private controller fallback are gone.
Its 182 Runtime tests, 3,779 App tests / 3 skips, 8,550 complete Release tests /
5 skips, and exact-binary seven-checkpoint lifecycle/reconnect gate pass.
J5.2 interaction-transaction ownership is next. Evidence:
[`../research/2026-07-26-slice-j5-1-canonical-action-state.md`](../research/2026-07-26-slice-j5-1-canonical-action-state.md).
- Move presentation-free movement interpretation, authoritative/predicted
physics state, selection identity, approach/use transactions, combat intent,
projectiles, and outbound movement cadence.

View file

@ -1,6 +1,6 @@
# Modern runtime Slice J5 — movement, physics, interaction, and combat
**Status:** ACTIVE — J5.1 next
**Status:** ACTIVE — J5.1 complete; J5.2 next
**Parent:** `2026-07-25-modern-runtime-slice-j.md`, J5
**Production base:** `2c67a2c3`
**Authorization:** the user approved Slices FL, including the Slice J
@ -85,7 +85,7 @@ commands to Runtime. The camera may not write the player heading directly.
| Sub-slice | Status | Result/evidence |
|---|---|---|
| J5.0 owner/retail inventory | complete | `docs/research/2026-07-26-slice-j5-owner-and-retail-order-inventory.md` |
| J5.1 canonical action state | next | selection, combat state, target-mode owner |
| J5.1 canonical action state | complete | `b298f99f913249d299796e6a71f7a9b6b283ac1a`; one Runtime selection/combat/target-mode owner; 182 Runtime tests, 3,779 App tests / 3 skips, 8,550 complete Release tests / 5 skips, exact-binary connected lifecycle/reconnect pass |
| J5.2 interaction transactions | pending | use/appraisal/pickup/approach state and transport ordering |
| J5.3 combat and magic intent | pending | attack/mode/target/cast owners and typed input |
| J5.4 local movement and outbound cadence | pending | controller, body, movement managers, MTS/AP/jump cadence |
@ -128,6 +128,20 @@ Gate:
- focused Runtime/App tests, Release build, full Release suite, connected
lifecycle/reconnect route.
Completed 2026-07-26 at
`b298f99f913249d299796e6a71f7a9b6b283ac1a`. `RuntimeActionState` now
constructs the exact selection, combat, and temporary interaction-mode
children. Program, plugins, retained UI, session routing, typed commands/views,
and terminal shutdown borrow those exact instances. The App-owned
`InteractionState` and `ItemInteractionController` fallback are deleted.
Failure-safe reset/disposal, two-instance isolation, normalized checkpoints,
dependency closure, and production source guards pass. The exact-binary
connected report is
`logs/connected-world-gate-20260726-104445/report.json`: 7/7 ready
checkpoints, two graceful code-zero exits, zero failures, and only the 25
expected world-edge landblock misses. Evidence:
[`../research/2026-07-26-slice-j5-1-canonical-action-state.md`](../research/2026-07-26-slice-j5-1-canonical-action-state.md).
## J5.2 — interaction transactions
Split App orchestration into:
@ -349,6 +363,7 @@ by a documentation/evidence checkpoint where needed.
Planned production commit sequence:
1. `refactor(runtime): own canonical action state`
(`b298f99f913249d299796e6a71f7a9b6b283ac1a`)
2. `refactor(runtime): own interaction transactions`
3. `refactor(runtime): own combat and magic intent`
4. `refactor(runtime): own local movement and outbound cadence`
@ -360,6 +375,12 @@ Record each full SHA and exact `git revert <sha>` command in this file before
running its connected gate. Revert J5 groups in reverse order. Do not revert
J4 or the flat-collision Slice I cutover to mask a J5 ownership failure.
J5.1 rollback:
```text
git revert b298f99f913249d299796e6a71f7a9b6b283ac1a
```
## Acceptance
J5 is complete only when:

View file

@ -0,0 +1,113 @@
# Slice J5.1 — canonical action state
**Date:** 2026-07-26
**Production commit:** `b298f99f913249d299796e6a71f7a9b6b283ac1a`
**Parent:** `docs/plans/2026-07-26-modern-runtime-slice-j5.md`
## Result
Selection identity, combat mode/known target health, and retail's temporary
Use/Examine/Use-Item-On-Target mode now form one presentation-independent
Runtime lifetime group.
`RuntimeActionState` constructs and owns the exact three mutable children.
`GameWindow` owns one Runtime action root, while Program/plugin selection,
retained UI, session routing, input/combat consumers, and current-runtime
commands/views borrow its exact children. No production App path can construct
another selection, combat, or interaction-mode owner.
The old `AcDream.App.UI.InteractionState` moved to
`AcDream.Runtime.Gameplay`. `ItemInteractionController` now requires the exact
injected state and has no private fallback.
## Retail behavior preserved
No selection, combat, or item-use algorithm changed.
- `SelectionState` retains
`ACCWeenieObject::SetSelectedObject @ 0x0058C2E0`: commit the changed
selection and previous identities before synchronous observers, and
deduplicate a same-object selection.
- `CombatState.Clear` retains
`ClientCombatSystem::Begin @ 0x0056A460`: session reset returns to
NonCombat and clears known target health.
- target-mode entry/acquisition/cancellation remains the existing
`ItemHolder::UseObject @ 0x00588A80` projection.
- commands remain synchronous at the existing press-time boundary; this slice
adds no queue or frame of latency.
## Ownership and failure behavior
- `RuntimeActionState.View` projects revisions plus selected/previous identity,
combat mode, known-health count/query, and interaction mode without copying
a mutable collection.
- reset attempts interaction, selection, and combat suffixes even when one
borrowed observer throws.
- terminal disposal is failure-safe: it clears all children, detaches Runtime's
internal revision subscriptions, and becomes terminal even when observers
fail.
- two Runtime action roots in one process remain completely isolated.
- `RuntimeGameplayOwnership` now includes the action root in its combined
convergence ledger.
- terminal App shutdown releases UI/session borrowers before disposing the
Runtime action root and then the canonical entity/object lifetime.
Production source guards scan all non-Studio App sources and prove that only
the Runtime owner constructs `SelectionState`, `CombatState`, or
`InteractionState`. Existing Runtime dependency and assembly-load closure
tests prove no App, UI, Silk.NET, OpenAL, Arch, or ImGui dependency entered the
kernel.
## Automated gates
All commands ran in Release:
- `dotnet test tests/AcDream.Runtime.Tests/AcDream.Runtime.Tests.csproj`:
182 passed.
- `dotnet test tests/AcDream.App.Tests/AcDream.App.Tests.csproj`:
3,779 passed / 3 fixture-generator skips.
- `dotnet build AcDream.slnx -c Release`: passed.
- `dotnet test AcDream.slnx -c Release --no-build --no-restore`:
8,550 passed / 5 established skips.
- `git diff --check`: passed.
## Exact-binary connected gate
Report:
`logs/connected-world-gate-20260726-104445/report.json`.
The report identifies exact source/binary commit
`b298f99f913249d299796e6a71f7a9b6b283ac1a` and passes:
- six capped login/outdoor/world-edge/dungeon/revisit checkpoints;
- one fresh uncapped-process reconnect checkpoint;
- 7/7 complete reveal/readiness checkpoints and zero invariant failures;
- 245.219-second capped and 61.321-second reconnect sessions;
- graceful logout and code-zero exit for both processes;
- zero failures;
- one expected warning covering 25 empty world-edge landblocks.
The Windows session was disconnected rather than active RDP during this run,
but the retained graphical route and screenshots completed. The gate is
correctness/lifetime evidence, not physical-display performance evidence.
## Divergence audit
This is an ownership-only port of existing retail-faithful behavior. It
introduces no approximation, alternate gameplay algorithm, polling mirror, or
asynchronous seam. No divergence-register row was added or retired.
## Rollback
```text
git revert b298f99f913249d299796e6a71f7a9b6b283ac1a
```
Revert J5 sub-slices in reverse order. Do not revert J4 or the Slice-I flat
collision cutover to mask a later J5 interaction/simulation failure.
## Next boundary
J5.2 moves use/appraisal/pickup/approach transaction identity and ordered
execution into Runtime. World rays, cursor/selection lighting, toasts,
drag/drop visuals, and retained pending-slot drawing remain App presentation.