feat(overhaul): port S5 particle cell visibility

Publish the exact completed walk landscape set as the typed retained particle-view product. Apply retail CLandCell membership versus constant-true non-null CEnvCell eligibility while preserving the x87 distance and AP-116 behavior.

Delete the null-root terrain visibility reconstruction and the dead drawable-cell point-light feedback chain. Retire AP-117, correct AP-85 and AD-21, and keep directional shadows, building degrade, AP-232, probes, RHI, shaders, and DAT outside this chunk.

Automated return: Release 0 warnings/0 errors; Core VFX 111/111; App particle/frame/renderer/terrain 146/146; warmed production allocation 1/1 at 0 B. First official hermetic artifact s5-c1-hermetic-20260904 is preserved at 16759/16760 with only the stale 162-row assertion; after the bounded 161 correction, exact pin 1/1 and fresh s5-c1-hermetic-corrected-20260904 16760/16760. InstalledDat 385 pass, 10 documented failures, 1 documented skip, no new identity.

Mutation 1: making EnvCell eligibility set-dependent first failed ParticleSystemTests.cs:553 Assert.True, expected true actual false. Mutation 2: making outdoor eligibility constant true first failed ParticleSystemTests.cs:559 Assert.False, expected false actual true.

Mutation 3: feeding the diagnostic union first failed WorldSceneRendererTests.cs:279 HashSet equality, expected [16842755], actual [16843008, 16842755]. Mutation 4: restoring CollectVisibleCells first failed TerrainParticleCellVisibilityTests.cs:37 and named TerrainModernRenderer.cs.

Mutation 5: restoring ObserveDrawableCells first failed TerrainParticleCellVisibilityTests.cs:37 and named WorldRenderFrameBuilder.cs. Mutation 6: changing the inclusive boundary from <= to < first failed ParticleSystemTests.cs:519 Assert.True, expected true actual false.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Erik 2026-09-04 16:27:46 +02:00
parent efb0756190
commit 94a6b5ef39
18 changed files with 352 additions and 269 deletions

View file

@ -307,6 +307,7 @@ weather/sky post-pass
| Outside cells reached by the static bbox transit remain in the CELLARRAY. | Dirty `CellTransit` removed an outdoor prune globally, including collision callers. | Correct retail fact, wrong ownership boundary risk. OH3 must port the exact bbox route without mutating unrelated sphere/collision routes. |
| Dynamics and attached children inherit the root's exact ordered CELLARRAY and publish exact per-part entries. | `WalkProductionWorldData` buckets whole `RenderProjectionRecord`s by `ShadowObjectRegistry.GetOwnerCells`, resolving equipped children by a parent callback. The draw classifier later tries to restore per-part stamps. | Membership is reconstructed from the collision registry, loses the canonical `CShadowPart` transaction/order, and creates a second model. |
| `LScape::draw` runs once and visibility unions all views. | `RetailFrameWalk.DrawLandscape` correctly installs one view set and walks blocks/cells once. | Keep. |
| `CLandCell::IsInView` consumes the previous completed landscape stamp; `CEnvCell::IsInView` is constant true. | `RetailPViewFrameResult.VisibleLandscapeCells` publishes the walk's exact landscape half; `ParticleSystem.ApplyRetailView` branches by cell-id family. Frames without a completed walk product publish no outdoor answer. | **FIXED by S5-c1 (2026-09-04).** The competing null-root terrain reconstruction is deleted; point lights remain resident-registry based. |
| Per landscape cell: terrain -> building -> ordinary objects. | `RetailFrameWalk.DrawLandscape` now emits one `OnLandCellTurn` per admitted land cell BEFORE that cell's own building/object turn (`RenderDeviceD3D::DrawBlock`'s real per-cell interleave), and `WalkFrameDriver.Replay` submits each cell's terrain through a deferred, order-preserving batch rather than one whole pre-stage draw. | FIXED by S3 chunk 3 (commit 671eb3ad4 + fix round 1) — the whole-stage `TerrainSlice(0)`/`DrawTerrainSlice` this row described is deleted outright; row retired. |
| Cell object draw consumes the cell's exact stable far-to-near `shadow_part_list`. | The driver materializes per-cell record buckets, classifies/batches them, and uses a scope-level ordered stream plus separate alpha collection. | OH3/OH7 must replace reconstructed membership/order with exact part entries and exact per-cell alpha barriers. |
| Building is alpha drain -> portal pass -> shell, then cell objects. | `RetailFrameWalk.DrawBuilding` and the driver's building events model this order. | Mechanism broadly matches, but its correctness depends on the sibling OH1 built-mesh/view and depth-lifecycle findings. |

View file

@ -1,6 +1,6 @@
# Campaign OVERHAUL v2 — S5 consumers, material, and closeout packet
**Status:** S5-c1 STOPPED 2026-09-04 after fix round 2; not landed.
**Status:** S5-c1 IMPLEMENTED 2026-09-04; sequential review pending.
**Branch:** `claude/campaign-w-retail-frame-walk`.
**Gate:** G4 remains unpassed. Nothing merges to `main` before G4.
@ -275,45 +275,56 @@ failed test first, then a fresh official hermetic lane under a new artifact
name and the required InstalledDat lane. Preserve the original failed artifact
and record both identities in the implementer return.
## 9. S5-c1 mandatory stop after fix round 2 — 2026-09-04
## 9. S5-c1 implementation result — 2026-09-04
The reviewed scratch stack is intentionally **not landed**:
The bounded implementation publishes `WalkFrameDriver.VisitedLandscapeCellIds`
as the typed landscape product, retains it transactionally in the particle
visibility owner, and applies the retail cell-family virtual: membership for
land cells, constant true for non-null EnvCells. The null-root terrain
reconstruction and the dead point-light drawable-cell feedback chain are
deleted. AP-117 is retired; AP-85 and AD-21 now describe the surviving code.
- gate-correction contract `2bb565b0b`;
- implementation `9aadc917a`;
- retail fix-round-1 contract/implementation `afaebcad6` / `74a2e4c48`;
- retail fix-round-2 contract/implementation `ed8200664` / `a28384d80`.
The real warmed allocation pin initially exposed that enumerating the retained
`SortedSet<int>` of world-simulation handles allocated on every `Apply`. The
owner is now a sorted `List<int>` maintained at lifecycle mutation time, so the
production Apply loop preserves stable handle order and measures 0 B without
changing queue, router, draw, or particle tick behavior. This is an
implementation-mechanism correction, not a retail behavior deviation.
The retail lens ultimately passed. It verified the paired executable/PDB bytes,
the exact land-cell versus EnvCell virtual behavior, previous-completed-frame
timing, x87/AP-116 edges, typed landscape handoff, and unchanged particle
draw/queue/tick behavior. The production lens found no production-code or test
defect and reproduced Release 0 warnings / 0 errors, Core VFX 111/111, App
focused 146/146, allocation 1/1 at 0 B, AP-116 3/3, all six non-vacuous
mutations, all source guards, and all three 30-entry artifact manifests with
zero mismatch. Official artifacts remain in the scratch worktree:
Focused returns before the official lanes: Core VFX 111/111, App particle /
frame / renderer / terrain 146/146, and the real warmed production allocation
pin 1/1 at 0 B. Release built with 0 warnings / 0 errors. The first official
hermetic artifact, `artifacts/s5-c1-hermetic-20260904`, is deliberately
preserved at 16,759/16,760: its sole failure was the stale 162-row test literal
after AP-117's retirement. Section 8 authorized only that coupled test
correction; the exact failed pin then passed 1/1 with the truthful 161-row
header and physical count. The one-shot corrected official lane at
`artifacts/s5-c1-hermetic-corrected-20260904` then passed 16,760/16,760,
0 skipped, across 14 assemblies. The inclusive InstalledDat lane at
`artifacts/s5-c1-installed-20260904` produced the documented global set:
385 passed, 10 failed, 1 skipped. The failures are `TowerAscent`, the two
#383 layout sweeps, #458 `Oh_doorway_still_first_frame_diff`, and the six
`AlphaFlushCounts_*` transcript Facts; the skip is
`Sweep_the_lookin_gate_decodes_against_the_street_fixture`. No new failure or
skip identity appeared.
- `artifacts/s5-c1-hermetic-20260904`: 16,759 passed / 1 stale-row failure;
- `artifacts/s5-c1-hermetic-corrected-20260904`: 16,760/16,760;
- `artifacts/s5-c1-installed-20260904`: 385 passed / 10 documented failed /
1 documented skipped, with no new identity.
Independent mutation ledger (each mutation restored exactly before the next):
The final production lens nevertheless failed on two correction-worthy
documentation/evidence findings after both allowed fix rounds:
1. `acdream-architecture.md` and AD-21 say a null-root frame publishes no
cell-visibility answer. Production actually completes
`hasCompletedView=true` with an empty landscape set; only login/portal carry
false. Scratch packet §11.1 states this correctly, so the implementation's
claim that architecture/register prose is truthful is false.
2. The packet reports the official lanes but does not reconcile their recorded
`WorktreeDirty=true` bases (`00f134f9e` for the first lane and `2bb565b0b`
for the corrected/InstalledDat lanes) to implementation commit `9aadc917a`,
nor state that later commits are prose/comments only. The manifests prove
their 30 recorded evidence files, not the dirty source content.
Correcting either finding would be fix round 3. The campaign rule therefore
requires this stop: do not cherry-pick the scratch stack, do not run a graphical
gate on it, and do not dispatch S5-c2. Resumption requires explicit owner
direction on whether to authorize an evidence/documentation-only exception;
history must remain intact either way. G3 stays provisional and G4 unpassed.
1. EnvCell eligibility made set-dependent: `ApplyRetailView_UsesLandscapeMembershipButEnvCellConstantVirtual`
first failed `Assert.True`, expected true / actual false, at
`ParticleSystemTests.cs:553`.
2. Outdoor eligibility made constant true: the same test first failed
`Assert.False`, expected false / actual true, at `ParticleSystemTests.cs:559`.
3. Renderer fed the diagnostic union: `PViewWorld_PublishesOnlyLandscapeCellsToParticleVisibility`
first failed the HashSet equality at `WorldSceneRendererTests.cs:279`,
expected `[16842755]`, actual `[16843008, 16842755]`.
4. A production `CollectVisibleCells` symbol was restored:
`Production_source_has_no_reconstructed_particle_visibility_feedback`
first failed at `TerrainParticleCellVisibilityTests.cs:37`, naming
`TerrainModernRenderer.cs`.
5. A production `ObserveDrawableCells` symbol was restored: the same source
guard first failed at line 37, naming `WorldRenderFrameBuilder.cs`.
6. The inclusive boundary was changed from `<=` to `<`:
`ApplyRetailView_UsesOwnerVisibilityAndInclusiveAuthoredDistance` first
failed `Assert.True`, expected true / actual false, at
`ParticleSystemTests.cs:519`.