docs(p0): CORRECTION — retail pick is center-only point_in_cell; the bare-FindCellList divergence is a probe artifact

Read CEnvCell::point_in_cell @ 0x52c300 -> CCellStruct::point_in_cell @ 0x5338f0
-> BSPTREE::point_inside_cell_bsp: the find_cell_list PICK (pc:308810) is
CENTER-ONLY, at global_sphere[0].center (the swept sphere center), NOT
radius-aware and NOT the foot origin. So acdream's PointInsideCellBsp pick
criterion ALREADY matches retail. The architect's 'use SphereIntersectsCellBsp
in the pick' hypothesis is FALSIFIED. The P0 FindCellList_DoorwayThreshold probe
fed the foot origin (captured m_position) through no sweep -> its 'all 22
diverge' is a PROBE ARTIFACT, not a confirmed production divergence (the data's
own tell: retail commits the cell AHEAD of motion while the foot is behind = the
swept sphere center crossing the portal).

P1's decisive first step is the PRODUCTION-PATH trajectory conformance (replay
the golden through ResolveWithTransition, which uses sp.GlobalSphere + the sweep)
BEFORE designing any fix. Do not port a portal-crossing/radius pick on the probe.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Erik 2026-06-03 15:25:45 +02:00
parent 81ea3aa41a
commit 46a86d282e

View file

@ -133,6 +133,40 @@ this diverges and FAILS when P1 lands → rewrite it to assert the full sequence
the integration gate. (Needs the outdoor landcell + building portal loaded — more than the
building-only cache P0 uses.)
## ⚠ CORRECTION (same session, after reading `point_in_cell` + an architect pass)
The "all 22 diverge → retail uses portal-crossing, acdream uses point-in-cell" framing above is the
**probe-level** result and is **likely a test artifact**. Two decomp reads correct it:
1. **Retail's `find_cell_list` PICK is center-only `point_in_cell`, NOT radius-aware.**
`CObjCell::find_cell_list` pick @ pc:308810 calls `vtable[0x84]` = `CEnvCell::point_in_cell`
(`@ 0x52c300 pc:309677`) → `globaltolocal``CCellStruct::point_in_cell` (`@ 0x5338f0 pc:317657`)
**`BSPTREE::point_inside_cell_bsp(cell_bsp, point)`** — a center-only point test. The
radius-aware `sphere_intersects_cell_bsp` is a SEPARATE method (`CCellStruct::sphere_intersects_cell`
`@ 0x533900 pc:317666`), used by `find_transit_cells`' SET-BUILD, not the pick. So acdream's pick
criterion (`PointInsideCellBsp`) ALREADY matches retail. An architect hypothesis that the fix is
"use `SphereIntersectsCellBsp` in the pick" is **FALSIFIED** — that would DIVERGE from retail.
2. **The pick point retail tests is `global_sphere[0].center` (the swept sphere center), not the foot
origin.** `find_cell_list(&check_pos, num_sphere, global_sphere, …)` (pc:309088); the pick tests
`arg3->center` = `global_sphere[0].center`. The P0 `FindCellList_DoorwayThreshold_*` tests + the
diagnostic fed `pick.Position` = the captured `m_position.frame.m_fOrigin` (the FOOT origin at the
resting position), NOT the sphere center, and NOT through the sweep. The diagnostic's own data shows
the tell: retail always commits the cell AHEAD of motion while the foot is still behind
(`0170→0171` with `in_0171=0`; `0171→0170` with `in_0170=0`) — the signature of the **swept sphere
center crossing the portal**, which a static foot-point probe cannot reproduce.
**What this means for P1.** The membership criterion may NOT be broken; acdream's production
`ResolveWithTransition` already feeds `sp.GlobalSphere` (the sphere center) through the swept
transition. The DECISIVE, evidence-first first step is the **production-path trajectory conformance**
(replay the golden positions through `ResolveWithTransition`, assert the swept `CellId` sequence ==
retail's `change_cell` sequence). Outcomes: (a) production MATCHES → the bare-`FindCellList`
divergence was a probe artifact, P1 shrinks to building-entry cleanup (big de-risk); (b) diverges,
fixed by the right point/sweep → small + localized; (c) still diverges → a real bug, design from THAT
evidence. **Do NOT design or code a P1 membership "fix" before the production-path test exists and its
RED/GREEN is read.** The P0 `..._DivergesFromRetail_PendingP1` test is a UNIT-level pin only, NOT
evidence of a production divergence.
## P0 status / P1-entry checklist — COMPLETE
**Apparatus: COMPLETE + GREEN.** (Conformance suite 59 pass / 1 skip / 0 fail.)
@ -149,8 +183,10 @@ this diverges and FAILS when P1 lands → rewrite it to assert the full sequence
"Stage 1" work the master plan's §2 "acdream now" column lists as partial — `CellArray` (ordered
CELLARRAY / R1 flap fix), `FindCellSet`'s interior-wins pick (cites pc:308788-308825),
`RunCheckOtherCellsAndAdvance` (collide-then-pick), swept `sp.CurCellId` return, player-only
`UpdatePlayerCurrCell`. But the ROOT-CAUSE finding shows the pick CRITERION itself is wrong
(point-in-cell, not portal-crossing) — so P1 is NOT just "delete CheckBuildingTransit"; it is
**port `find_transit_cells`' directed portal crossing as the membership transition mechanism**,
then delete `CheckBuildingTransit` + unify `find_env_collisions`, then demote `ResolveCellId` to
seed-only. Re-confirm against the code when P1 starts.
`UpdatePlayerCurrCell`. **Per the CORRECTION above, the pick criterion is NOT confirmed wrong**
retail's pick is center-only `point_in_cell`, same as acdream's. P1's TRUE first step is the
production-path conformance to find where (if anywhere) production membership actually diverges from
the retail `change_cell` golden, THEN the (likely small) fix, THEN delete `CheckBuildingTransit` +
unify `find_env_collisions` + demote `ResolveCellId` to seed-only. Re-confirm against the code +
the production-path evidence when P1 starts — do not port a "portal-crossing pick" on the probe
artifact.