acdream/docs/research/2026-07-27-slice-k3-shared-content-isolation-checkpoint.md

95 lines
4.2 KiB
Markdown

# Slice K3 shared-content and isolation closeout
**Date:** 2026-07-27
**Status:** Complete
**Commits:** `12b500d3`, `9569dadb`, `b6547ff3`, `3f340125`
## Outcome
The production headless process now opens DAT and `acdream.pak` content once,
leases the exact owner to every configured session, and disposes the mapping
only after the final lease. Sessions share immutable magic/catalog, terrain
height, and bounded flat-collision payloads while retaining distinct
`GameRuntime`, entity, object, action, movement, physics-engine, data-cache,
scratch, and teardown owners.
The direct inbound route now projects accepted local-player spawn/position and
portal state into one per-session movement controller and a per-session
collision neighborhood. Terrain, EnvCell topology, buildings, stabs, and
retail-generated scenery use the same presentation-free content builder as the
graphical streaming path. Headless hydration deliberately skips visual bounds,
so it does not populate the graphical process-wide `GfxObjBounds` cache.
The scheduler quarantines a throwing policy, detaches it before canonical
teardown deltas, and continues healthy sessions. Headless startup rejects
process-global physics probes whose mutable capture cursors cannot be
attributed safely across sessions.
## Automated evidence
- Runtime tests: 412 passed.
- Headless tests: 42 passed.
- App tests: 3,722 passed / 3 skipped.
- Complete Release solution: 8,758 passed / 5 skipped.
- Streaming/collision focused gate: 277 passed.
- Parameterized 1/5/10-session gate:
- identical server GUIDs remain isolated;
- activity and portal completion remain per Runtime root;
- reconnect replaces only that session's incarnation/generation;
- every teardown ledger converges.
- Policy-fault gate: one failing policy is quarantined while the healthy
session continues ticking.
- Shared-content gate: exact DAT, package, magic catalog, height-table backing
array, and bounded collision source are shared; mutable physics/cache/
movement owners are not.
## Connected production evidence
The Windows visible-terminal Release host connected to local ACE without a
window, renderer, audio, or UI assembly. It hydrated collision, completed a
lifestone recall, performed the absolute-deadline graceful reconnect, entered
the second generation, and converged through ACE-confirmed graceful logout.
The native Linux/WSL Release host then connected through the same production
composition using direct single-session `-user`/`-password` launch. The fixed
portal-route policy completed Aerlinthe, Caul, Rynthid, and lifestone stops.
The long-lived observer policy entered Rynthid, accepted two further external
`teleallto` destinations, and continued to issue typed turn/run intents.
A retail client observed the same server-visible character and the user
accepted its smooth movement without rubberbanding.
The live run exposed two connected-only defects and corrected them at their
owner boundaries:
- zero-delta collision snap tracing wrote every frame; production now leaves
the explicit diagnostic sink unset;
- every ordinary local Position echo re-ran full teleport synchronization,
stopping motion and snapping the headless controller. Direct projection now
ignores normal Apply echoes, blips only `ForcePosition`, acknowledges the
force immediately, and retains one full placement for real teleports.
The accepted Linux run completed three external portal generations and then
produced `graceful logout requested`, `graceful logout confirmed`, stopped,
and disposed records. The bot policies contain no private movement or world
model: they consume `IGameRuntimeView`, `IGameRuntimeCommands`, and the same
Runtime local-player frame and outbound serializers as the graphical host.
Final automated evidence after the corrections:
- Release build: zero warnings and zero errors.
- Runtime: 412 passed.
- Headless: 47 passed.
- App: 3,722 passed / 3 skipped.
- Complete solution: 8,764 passed / 5 skipped.
- Native Ubuntu .NET 10 Release build: zero warnings and zero errors.
## Exact rollback
Newest first:
```text
git revert 3f3401257c83bdd9f557eb577ba08cf2e5ec9a06
git revert b6547ff38c375328417855200f41c8af6436f246
git revert 9569dadb578b299b24e30aec85eee86ec0c2b3fb
git revert 12b500d38362e8aae0a23a4f9712b86367006f76
```