test #137: the seam shake reproduced offline — third mechanism characterized

The corridor gate FAILED with a changed symptom: shaking at cell seams
(+ purple floor flashing there) instead of the dead stop. Deep-probe
session (step-walk/push-back/indoor-bsp + full resolve capture) traced
the complete chain; docs/ISSUES.md #137 carries it. Short form:

- Corridor floors are double-faced portal slabs over under-rooms; the
  resting foot sphere lives within half a millimeter of three hit/straddle
  thresholds there.
- Crossing a boundary, the foot penetrates the neighbor ramp slab by
  ~0.4mm, steps up onto it successfully (+0.6mm lift, stepped=True) —
  and the lifted check position is then LOST: the following pass runs at
  the unlifted height (the P2 stale-snapshot class; retail step_up
  0x0050b6cc restores only on FAILURE).
- The unlifted re-test grazes the under-room's ceiling (the slab
  underside) within the near-miss window, dispatches a neg-poly step-up
  with a DOWNWARD normal, whose nested step-down finds no walkable at
  exact tangency -> StepUpSlide -> slide_sphere opposing branch ->
  reversed-movement collision -> Collided -> revert. Every frame = shake.

Apparatus committed:
- Issue137CorridorSeamReplayTests: 3 deterministic offline repros
  (snapshot-exact west-boundary from the capture, east deep-straddle,
  the clean-run pin), currently Skip='#137 seam shake' pending the fix.
  Key: THREE portal-ring hydration (the under-room 0x8A020166 is ring-3;
  with fewer rings the flood can't add it and the bug vanishes) + live
  Setup step heights (0.6/1.5) + probe-buffer capture for line-diffing
  offline vs live traces.
- Issue137CorridorSeamInspectionTests: portal-poly world spans (exposed
  the visual-vs-physics polygon-id conflation and the floor-portal
  topology), physics-BSP leaf membership walk, hit-normal candidate
  sweep (|align| both windings), downward-poly sweep.

NEXT: read TransitionalInsert's attempt loop against retail 0x0050b6f0,
find the restore that clobbers the successful step-up position, fix,
un-skip. The purple seam flashing is expected to be the render exposing
the same per-frame oscillation - re-check after the physics fix.

Suites: Core 2553 / App 713 / UI 425 / Net 385, 0 failures (5 skips =
2 pre-existing + the 3 parked repros).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Erik 2026-07-05 19:05:19 +02:00
parent e8651b3819
commit dbddad7a5e
4 changed files with 25131 additions and 4 deletions

View file

@ -1183,8 +1183,46 @@ walls** in particular. (Symptoms not fully characterized yet: likely walking thr
openings that should block / blocking at openings that should pass, and door collision not
matching the door's open/closed state.)
**CORRIDOR PHANTOM FIXED 2026-07-06 (both mechanisms resolved; visual gate
pending — see `docs/research/2026-07-06-137-sliding-normal-lifecycle-audit.md`
**GATE 2026-07-06 FAILED — THIRD MECHANISM CHARACTERIZED (the seam shake),
deterministic offline repro secured:** with mechanisms 1+2 fixed the dead
stop became a SHAKE at cell seams (+ purple floor flashing there — almost
certainly the render exposing the same per-frame position/OnWalkable
oscillation; re-check after the physics fix). Full chain, every link
probe-traced (`launch-137-seam-probes.log`, capture
`resolve-137-seam-capture.jsonl` tick 4101 ×46):
1. Corridor cells sit above under-rooms; the shared floor slab is
double-faced (up-face + underside as separate physics polys) and IS a
portal plane (e.g. 0x8A020165's ramp over 0x8A020166). The resting foot
sphere is permanently within ±0.5 mm of THREE thresholds there (poly-hit
rε, walkable rε, portal-straddle r+ε).
2. Walking across the boundary at the flat-floor height penetrates the
ramp slab by ~0.4 mm → foot full-hit on the up-face → StepSphereUp →
step-down accepts the ramp (+0.6 mm lift, CheckPos 5.999,
`[stepsphereup] stepped=True`).
3. **THE BUG: the lifted position is then LOST** — the next pass runs at
the UNLIFTED height (GlobalSphere center 5.520 vs the lifted 5.519;
the P2 stale-snapshot class, single-slot Save/RestoreCheckPos clobber
suspected — retail `CTransition::step_up` 0x0050b6cc restores ONLY on
failure) → the re-test at 0.4 mm inside the slab grazes the NEIGHBOR
under-room's CEILING (the slab underside, n≈(0.03,0,1)) within the
near-miss window → recorded (retail records it too — pos_hits_sphere
registers geometric hits pre-cull) → neg-poly step-up dispatch with the
DOWNWARD normal → the nested step-down finds no walkable at exact
tangency → StepUpSlide → slide_sphere(down normal vs up contact plane)
→ the opposing branch → reversed-movement collision normal → Collided →
validate revert (Contact/OnWalkable stripped) → next step's AdjustOffset
zeroes → out==in every frame = the shake. Retail never enters at step 3:
its kept step-up lift leaves the sphere ON the surface, no graze.
4. Offline repro: `Issue137CorridorSeamReplayTests` (3 tests, currently
`Skip="#137 seam shake"`) reproduce the block deterministically — the
key was hydrating THREE portal rings (the under-room 0x8A020166 is
ring-3; with fewer rings the flood can't add it and everything passes).
NEXT: read our `TransitionalInsert` attempt loop against retail
0x0050b6f0 to find the restore that clobbers the successful step-up's
position; fix; un-skip the three tests.
**CORRIDOR PHANTOM mechanisms 1+2 FIXED 2026-07-06 (see
`docs/research/2026-07-06-137-sliding-normal-lifecycle-audit.md`
for the full audit):** mechanism 2 = BSPQuery Contact-branch stub slide
responses leaked sliding normals retail's BSP layer never writes (fixed:
real `slide_sphere` routing + success-gated body writeback). Mechanism 1 as