diff --git a/AGENTS.md b/AGENTS.md index 4c925b67..9d1185c9 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -359,8 +359,13 @@ redacted credentials, direct Runtime command/entity/portal routes, and the production single-session host pass the same real ACE connect, portal, graceful-reconnect, and terminal-teardown gate on Windows and Linux/WSL. Runtime tests pass 402/402, Headless tests pass 25/25, the complete Windows -Release suite passes 8,728/5 skips, and K2 absolute-deadline scheduler plus -typed bot-command parity is active. +Release suite passes 8,728/5 skips. K2 completed at `7e8acb74` plus +`38e83640`: the monotonic absolute-deadline scheduler, shared Runtime +local-player frame sequence, complete generation-gated bot commands, and +ordered lifecycle/entity/inventory/chat/movement/portal/combat/command event +stream pass 411 Runtime tests, 31 Headless tests, 3,732 App tests / 3 skips, +and 8,744 complete Release tests / 5 skips. K3 shared immutable process content +and per-session mutable isolation are active. J0's rollback is `git revert b632672e5ccabfb44c551e08f1c411ab2669c44a`. J1's rollback is @@ -421,6 +426,9 @@ K0's rollback is `git revert aada8a37c1e933f9f0a3f41dc4f05615b01023bc`. K1's rollback is `git revert f8cb840fb15b27f61afa5c33cad6c4dba8584949`. +K2's rollback is, newest first, +`git revert 38e83640d907ee3e0819f3b38ca117ca60914d6b` then +`git revert 7e8acb74dd20931d5ba88430fd100cd074a32e4d`. Slice H's retained UI/frame, bounded-light, and pooled/borrowed/direct network work is complete; the exact seven-checkpoint connected lifecycle/reconnect gate passes. Slice I is closed in @@ -451,7 +459,8 @@ closeout is closeout is `docs/research/2026-07-27-slice-j8-no-window-closeout.md`; K0 closeout is `docs/research/2026-07-27-slice-k0-portability-boundary.md`; K1 closeout is -`docs/research/2026-07-27-slice-k1-single-session-headless.md`; Slice K executes +`docs/research/2026-07-27-slice-k1-single-session-headless.md`; K2 closeout is +`docs/research/2026-07-27-slice-k2-deterministic-bot-parity.md`; Slice K executes from `docs/plans/2026-07-26-modern-runtime-slice-k.md`. The exact G4 visual rollback is `git revert ef1d263337997bb030eadb7b8e71d73dc659907a`; do not revert G3 or diff --git a/CLAUDE.md b/CLAUDE.md index 3e9e6362..cfcedacc 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -357,8 +357,13 @@ redacted credentials, direct Runtime command/entity/portal routes, and the production single-session host pass the same real ACE connect, portal, graceful-reconnect, and terminal-teardown gate on Windows and Linux/WSL. Runtime tests pass 402/402, Headless tests pass 25/25, the complete Windows -Release suite passes 8,728/5 skips, and K2 absolute-deadline scheduler plus -typed bot-command parity is active. +Release suite passes 8,728/5 skips. K2 completed at `7e8acb74` plus +`38e83640`: the monotonic absolute-deadline scheduler, shared Runtime +local-player frame sequence, complete generation-gated bot commands, and +ordered lifecycle/entity/inventory/chat/movement/portal/combat/command event +stream pass 411 Runtime tests, 31 Headless tests, 3,732 App tests / 3 skips, +and 8,744 complete Release tests / 5 skips. K3 shared immutable process content +and per-session mutable isolation are active. J0's rollback is `git revert b632672e5ccabfb44c551e08f1c411ab2669c44a`. J1's rollback is @@ -419,6 +424,9 @@ K0's rollback is `git revert aada8a37c1e933f9f0a3f41dc4f05615b01023bc`. K1's rollback is `git revert f8cb840fb15b27f61afa5c33cad6c4dba8584949`. +K2's rollback is, newest first, +`git revert 38e83640d907ee3e0819f3b38ca117ca60914d6b` then +`git revert 7e8acb74dd20931d5ba88430fd100cd074a32e4d`. Slice H's retained UI/frame, bounded-light, and pooled/borrowed/direct network work is complete; the exact seven-checkpoint connected lifecycle/reconnect gate passes. Slice I is closed in @@ -449,7 +457,8 @@ closeout is closeout is `docs/research/2026-07-27-slice-j8-no-window-closeout.md`; K0 closeout is `docs/research/2026-07-27-slice-k0-portability-boundary.md`; K1 closeout is -`docs/research/2026-07-27-slice-k1-single-session-headless.md`; Slice K executes +`docs/research/2026-07-27-slice-k1-single-session-headless.md`; K2 closeout is +`docs/research/2026-07-27-slice-k2-deterministic-bot-parity.md`; Slice K executes from `docs/plans/2026-07-26-modern-runtime-slice-k.md`. The exact G4 visual rollback is `git revert ef1d263337997bb030eadb7b8e71d73dc659907a`; do not revert G3 or diff --git a/docs/architecture/acdream-architecture.md b/docs/architecture/acdream-architecture.md index 1aea9ce5..38de6c8b 100644 --- a/docs/architecture/acdream-architecture.md +++ b/docs/architecture/acdream-architecture.md @@ -253,7 +253,7 @@ src/ Hosting/ -> one GameRuntime/session/lease/policy lifetime Policies/ -> typed Runtime-view/command consumers -> references Runtime only; no presentation/backend package - -> K0/K1 complete; K2 scheduler and full bot-command parity active + -> K0-K2 complete; shared process-content ownership (K3) active AcDream.Plugin.Abstractions/ Layer 5: plugin interfaces IAcDreamPlugin.cs -> done diff --git a/docs/plans/2026-04-11-roadmap.md b/docs/plans/2026-04-11-roadmap.md index 831ca2d7..a1e96f4a 100644 --- a/docs/plans/2026-04-11-roadmap.md +++ b/docs/plans/2026-04-11-roadmap.md @@ -1,6 +1,6 @@ # acdream — strategic roadmap -**Status:** Living document. Updated 2026-07-27. **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`, J5.2 interaction transactions at `f5f7b417`, J5.3 combat/magic intent at `20df9d15`, J5.4 local movement/outbound cadence at `aa3f4a60`, J5.5 per-session physics/remote simulation at `7e6033d0`, J5.6 projectile simulation at `2aee3356`, and J5.7 combined simulation closeout at `cdee7a4b`. J6.1 world-environment ownership is closed at `902076c0`; J6.2 canonical reveal generation and typed destination readiness is closed at `a6860d55` plus `acb845d8`; J6.3 exact F751/Position destination correlation is closed at `6a063a27`; J6.4 exact graphical-host acknowledgement and owner cleanup is closed at `18d17d8b`. J7's one graphical `GameRuntime` root is closed at `ce41efb9`, including the user's 2026-07-27 exact post-cutover visual acceptance. J8 closed Slice J at `a9a822f2` with one shared graphical/no-window root and generation-reset transaction. Slice K Linux headless/multi-session work is active; K0's tested no-presentation Windows/Linux boundary closed at `aada8a37`, K1's real portable single-session host closed at `f8cb840f`, and K2 scheduler/bot-command parity is active. Issue #225's lifestone/particle alpha comparison remains a separate rendering visual gate. +**Status:** Living document. Updated 2026-07-27. **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`, J5.2 interaction transactions at `f5f7b417`, J5.3 combat/magic intent at `20df9d15`, J5.4 local movement/outbound cadence at `aa3f4a60`, J5.5 per-session physics/remote simulation at `7e6033d0`, J5.6 projectile simulation at `2aee3356`, and J5.7 combined simulation closeout at `cdee7a4b`. J6.1 world-environment ownership is closed at `902076c0`; J6.2 canonical reveal generation and typed destination readiness is closed at `a6860d55` plus `acb845d8`; J6.3 exact F751/Position destination correlation is closed at `6a063a27`; J6.4 exact graphical-host acknowledgement and owner cleanup is closed at `18d17d8b`. J7's one graphical `GameRuntime` root is closed at `ce41efb9`, including the user's 2026-07-27 exact post-cutover visual acceptance. J8 closed Slice J at `a9a822f2` with one shared graphical/no-window root and generation-reset transaction. Slice K Linux headless/multi-session work is active; K0's tested no-presentation Windows/Linux boundary closed at `aada8a37`, K1's real portable single-session host closed at `f8cb840f`, and K2's deterministic scheduler plus complete shared bot command/event path closed at `7e8acb74` plus `38e83640`. K3 shared process content and per-session isolation 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. --- @@ -1804,8 +1804,9 @@ port in any phase — no separate listing here. > portable no-presentation boundary closed at `aada8a37`; K1's production > single-session Windows/Linux host closed at `f8cb840f` after both platforms > completed the same real ACE connect, portal, graceful reconnect, and terminal -> teardown gate. K2's absolute-deadline scheduler and full typed bot-command -> parity are active. +> teardown gate. K2's absolute-deadline scheduler and full typed bot-command/ +> event parity closed at `7e8acb74` plus `38e83640`; K3 shared immutable +> process content and per-session mutable isolation are active. > The historical exact cutover > rollback remains > `git revert ef1d263337997bb030eadb7b8e71d73dc659907a`. Slice H is complete: @@ -1851,8 +1852,8 @@ hitch and follows. > **PROMOTED TO ACTIVE MODERN RUNTIME SLICES K/L.** Slice K now executes the > no-window Linux host and approximately 30-session target from > [`2026-07-26-modern-runtime-slice-k.md`](2026-07-26-modern-runtime-slice-k.md); -> Slice L executes the graphical Linux/platform work. K0/K1 are complete and -> K2 is active. The historical LH rows below remain the stable outcome map. +> Slice L executes the graphical Linux/platform work. K0-K2 are complete and +> K3 is active. The historical LH rows below remain the stable outcome map. The governing architectural rule is that a game session must not be a hidden `GameWindow`. Authentication, networking, world state, movement, inventory, diff --git a/docs/plans/2026-05-12-milestones.md b/docs/plans/2026-05-12-milestones.md index 9b44a299..bee79e19 100644 --- a/docs/plans/2026-05-12-milestones.md +++ b/docs/plans/2026-05-12-milestones.md @@ -290,8 +290,12 @@ residency is `0/0/0` at every stable checkpoint and teardown converges. Slice I connect/portal/graceful-reconnect/teardown gate on Windows and Linux/WSL. The complete Windows Release suite passes 8,728 tests / 5 skips; the Linux portable closure passes 600 Core.Net, 119 Content, 402 Runtime, and 25 - Headless tests. K2's absolute-deadline scheduler and complete typed bot API - parity are active. + Headless tests. K2 completed at `7e8acb74` plus `38e83640`: one monotonic + absolute-deadline scheduler, the shared Runtime local-player frame sequence, + complete generation-gated bot commands, and lifecycle/entity/inventory/chat/ + movement/portal/combat/command events pass 411 Runtime, 31 Headless, 3,732 + App / 3 skips, and 8,744 complete Release tests / 5 skips. K3 shared + immutable process content and per-session mutable isolation are active. Slice-I closeout evidence is [`../research/2026-07-25-slice-i7-closeout.md`](../research/2026-07-25-slice-i7-closeout.md). Slice-J2 closeout evidence is diff --git a/docs/plans/2026-07-26-modern-runtime-slice-k.md b/docs/plans/2026-07-26-modern-runtime-slice-k.md index 9e3f17c4..2da4c93d 100644 --- a/docs/plans/2026-07-26-modern-runtime-slice-k.md +++ b/docs/plans/2026-07-26-modern-runtime-slice-k.md @@ -1,6 +1,6 @@ # Modern runtime Slice K — Linux headless and multi-session host -**Status:** K0–K1 COMPLETE; K2 ACTIVE 2026-07-27 +**Status:** K0–K2 COMPLETE; K3 ACTIVE 2026-07-27 **Parent:** `2026-07-24-modern-runtime-architecture.md`, Slice K **Authorization:** the user approved Slices F–L on 2026-07-24 **Purpose:** run efficient automated clients on Linux without a display, GPU, @@ -265,6 +265,19 @@ cleanly without loading presentation assemblies. ### K2 — deterministic scheduler and bot API parity +**Complete at `7e8acb74` plus `38e83640`.** One monotonic +absolute-deadline scheduler advances every configured session in stable order, +uses bounded elapsed-time catch-up, and represents reconnect quiescence as a +deadline. Graphical and headless hosts now use the same Runtime local-player +frame controller, action owners, typed movement/selection/interaction/combat/ +magic/state commands, hostile-target query, and ordered lifecycle/entity/ +inventory/chat/movement/portal/combat/command event stream. The deterministic +gate proves MoveToState/AutonomousPosition order and elapsed cadence, stale +generation rejection, and 100,000 idle dispatch probes with zero turns and +zero managed allocation. Runtime passes 411 tests, Headless 31, App 3,732/3 +skips, and the complete Release solution 8,744/5 skips. Evidence: +`docs/research/2026-07-27-slice-k2-deterministic-bot-parity.md`. + - Add the absolute-deadline multi-session scheduler. - Serialize accepted per-session work while allowing sessions to progress independently. @@ -363,3 +376,16 @@ K0 exact rollback: ```text git revert aada8a37c1e933f9f0a3f41dc4f05615b01023bc ``` + +K1 exact rollback: + +```text +git revert f8cb840fb15b27f61afa5c33cad6c4dba8584949 +``` + +K2 exact rollback, newest first: + +```text +git revert 38e83640d907ee3e0819f3b38ca117ca60914d6b +git revert 7e8acb74dd20931d5ba88430fd100cd074a32e4d +``` diff --git a/docs/research/2026-07-27-slice-k2-deterministic-bot-parity.md b/docs/research/2026-07-27-slice-k2-deterministic-bot-parity.md new file mode 100644 index 00000000..3399abf4 --- /dev/null +++ b/docs/research/2026-07-27-slice-k2-deterministic-bot-parity.md @@ -0,0 +1,94 @@ +# Slice K2 — deterministic scheduler and bot parity closeout + +**Date:** 2026-07-27 +**Implementation:** `38e83640d907ee3e0819f3b38ca117ca60914d6b` +**Status:** COMPLETE + +## Outcome + +Graphical and headless clients now drive the same Runtime-owned local-player +frame sequence, movement controller, action owners, typed commands, and ordered +event stream. Headless is not a second gameplay implementation and does not +poll mutable App state. + +One monotonic `HeadlessProcessScheduler` owns absolute deadlines for every +configured session. Due sessions execute in stable configuration order, long +pauses use bounded catch-up while preserving elapsed time, and reconnect +quiescence is an absolute deadline rather than a blocking sleep. + +## Shipped mechanisms + +- Complete generation-gated direct command coverage for selection, use, + appraisal, pickup, combat, spell casting, sustained movement, stance, + inventory shortcuts, spellbook state, advancement, character options, + social state, chat, and recalls. +- Exact object selection and persistent movement intent are first-class typed + commands shared by graphical and headless consumers. +- `RuntimeLocalPlayerFrameController` owns retail's pre-network object phase, + inbound barrier, and post-network AutonomousPosition phase. App is a thin + graphical adapter; headless uses the same controller with no render mirror. +- Runtime-owned hostile-target query and retail spell-target policy are + presentation-independent. +- Runtime remote-physics wall-clock reads use the instance `TimeProvider`. +- Headless combat and magic operations route through the same canonical action + owners and live `WorldSession` as the graphical client. +- The lazy event hub now publishes combat-state outcomes in addition to + lifecycle, entity, inventory, chat, movement, portal, and command outcomes. + With no subscriber, it attaches no gameplay callbacks. +- Accepted inbound work remains serialized inside each session's Runtime turn; + bot policy runs after inbound, post-network position, and combat simulation. + +The synchronous Core.Net connect handshake retains its bounded wall-clock +timeout and retail/ACE 200 ms ConnectResponse race suffix. It is outside the +steady scheduler, creates no per-session thread, and is not used for movement +or packet cadence. + +## Deterministic gates + +- Absolute-deadline stable-order execution for multiple sessions. +- Bounded catch-up with exact elapsed-time preservation. +- Monotonic reconnect deadline without a blocked scheduler. +- 100,000 idle pre-deadline dispatch probes: zero turns and zero managed + allocation. +- Graphical wrapper versus direct Runtime local-frame trace equality. +- Headless packet order: MoveToState before AutonomousPosition. +- AutonomousPosition cadence remains elapsed-time based at the retail + one-second boundary; unchanged movement emits no duplicate MoveToState. +- Stale generation movement and selection commands are inert. +- Horizontal/vertical landblock target distance and hostile-only filters. +- Combat-state and command outcomes share the generation-stamped ordered event + sequence. + +## Automated gates + +- Runtime: 411/411. +- Headless: 31/31. +- App: 3,732 passed / 3 intentional skips. +- Complete Release solution: 8,744 passed / 5 intentional skips. +- Release build succeeds. The 17 warnings are pre-existing nullable/analyzer + warnings in Core test fixtures; the changed projects build without warnings. + +## K3 carry + +K3 introduces a process content owner with exact leases: + +- one mapped `acdream.pak`, synchronized DAT access, and immutable lookup + tables per process; +- per-session physics engine, mutable cache/bookkeeping, body graph, scratch, + command state, and diagnostics; +- content-backed local-player physics/spell hydration in headless sessions; +- 1/5/10-session isolation, same-GUID, reconnect, and policy-fault gates. + +## Rollback + +The scheduler foundation landed separately: + +```text +git revert 7e8acb74dd20931d5ba88430fd100cd074a32e4d +``` + +The K2 parity cutover is: + +```text +git revert 38e83640d907ee3e0819f3b38ca117ca60914d6b +```