fix(streaming): commit EnvCell landblocks atomically (#214)

Carry one complete cell payload with each streaming completion and publish visibility, physics, and render state on the render thread. Remove the obsolete post-readiness login reload that triggered a duplicate dungeon build.

Co-Authored-By: Codex <noreply@openai.com>
This commit is contained in:
Erik 2026-07-13 18:45:24 +02:00
parent 85980fe13f
commit b0c175afc0
26 changed files with 973 additions and 617 deletions

View file

@ -46,6 +46,49 @@ Copy this block when adding a new issue:
---
## #214 — Dungeon login could replace a complete EnvCell render with a partial second load
**Status:** IN-PROGRESS — architectural fix complete 2026-07-13, pending user visual gate
**Severity:** HIGH
**Component:** streaming / EnvCell rendering / portal visibility
**Description:** Logging directly into the starter dungeon could leave its room
shells untextured or absent after a relaunch even though the same dungeon had
rendered correctly before logout.
**Root cause:** Two independent load jobs published through shared, process-wide
pending collections. The login spawn first pre-collapsed streaming onto
`0x8C04FFFF`, then an obsolete post-spawn `ForceReloadWindow` reset the collapse
and enqueued the same dungeon again. `EnvCellRenderer.RegisterCell` mutated a
live landblock's pending lists from the worker while `FinalizeLandblock` drained
and replaced them on the render thread; the global portal-visibility bag had the
same ownership flaw across landblocks. The captured failure committed 1,123
shells, then the duplicate completion replaced them with its remaining 11.
**Resolution:** A worker now builds one private, immutable
`EnvCellLandblockBuild` per `LandblockBuild`. That exact payload travels with its
streaming completion and is committed on the render thread to
`CellVisibility`, `EnvCellRenderer`, and the cell physics cache. There are no
shared pending cell/shell collections to drain or cross-contaminate. The login
path now calls `InitializeKnownLoginCenter`: sealed dungeons pre-collapse once;
outdoor spawns wait for the first correctly centered tick. The old forced reload
was removed because `StreamingReadinessGate` already prevents guessed-center
loads before the real player spawn.
**Files:** `src/AcDream.App/Streaming/LandblockBuild.cs`;
`src/AcDream.App/Rendering/Wb/EnvCellLandblockBuild.cs`;
`src/AcDream.App/Rendering/Wb/EnvCellRenderer.cs`;
`src/AcDream.App/Rendering/CellVisibility.cs`;
`src/AcDream.App/Rendering/GameWindow.cs`.
**Research:** `docs/research/2026-07-13-envcell-landblock-transaction.md`.
**Acceptance:** Log out inside the starter dungeon, relaunch, and enter the same
character. The dungeon is fully textured on its first frame, remains complete,
and the log contains exactly one login dungeon collapse with no second reload.
---
## #213 — Retail client commands were sent to ACE as chat text
**Status:** IN-PROGRESS — command-family gate passed except two corrective fixes, pending re-gate