acdream/docs/research/2026-06-03-p0-conformance-apparatus-notes.md
Erik a90f34368f test(p0): dat-backed conformance loader + characterized cottage-doorway topology
P0 (verbatim-spatial-pipeline-port) Tasks 1+2. ConformanceDats loads the
cottage-doorway cells from the real dats with their real ContainmentBsp;
CottageDoorwayCharacterizationTests maps the Holtburg 0140..017F indoor
neighborhood and pins the master-plan threshold building (origin
161.93,7.50,94.00): 0xA9B40170 vestibule (exit portal 0xFFFF + portal to
0171), 0xA9B40171 room. Grid math confirms the outdoor side is landcell
0xA9B40031 -> the 0031<->0170<->0171 ping-pong is verified real. Verified
interior points recorded for the point_in_cell/find_cell_list goldens.

Plan: docs/superpowers/plans/2026-06-03-p0-conformance-apparatus.md
Notes: docs/research/2026-06-03-p0-conformance-apparatus-notes.md

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 14:20:17 +02:00

4 KiB

P0 — Conformance apparatus notes (characterized topology + goldens)

2026-06-03. Companion to docs/superpowers/plans/2026-06-03-p0-conformance-apparatus.md. Source of truth for the cell ids + golden inputs the P0 conformance tests pin. All values below were characterized from the real client dats (not guessed) by CottageDoorwayCharacterizationTests against %USERPROFILE%\Documents\Asheron's Call.

Characterized Holtburg (landblock 0xA9B4) indoor neighborhood

Scanned 0xA9B40140..0xA9B4017F. All cells load with a real ContainmentBsp and seenOutside=1. Cells share a per-BUILDING world origin (the building's reference frame). The distinct buildings:

Cell range World origin Stab Identity
0140..0150 (17 cells) (130.50, 11.50, 94.00) 17 Cottage-with-cellar (#98 cellar saga; exit portals at 0145,014C,014E,014F,0150)
0151..0169 (25 cells) (107.50, 36.00, 94.00) 24 Larger building (inn)
016A..016E (5 cells) (79.50, 37.50, 94.00) 4 Small building
016F..0175 (7 cells) (161.93, 7.50, 94.00) 6 THE doorway-threshold building (master-plan 0170/0171)
0176..0178 (65.21, 156.63, 66.00) 2
0179..017A (158.18, 37.71, 94.00) 1
017B..017F (161.72, 105.05, 66.00) 4

The pinned threshold topology (master-plan 0031↔0170↔0171)

Building at world origin (161.93, 7.50, 94.00):

Cell Role Portal dests seenOutside BSP
0xA9B40170 vestibule / doorway [0xFFFF (exit→outdoor), 0x0171] 1 real
0xA9B40171 room (behind the door) [0x0170, 0x0173, 0x0175] 1 real

Grid math confirms the outdoor side: origin (161.93, 7.50) → gridX = ⌊161.93/24⌋ = 6, gridY = ⌊7.5/24⌋ = 0 → landcell id 6*8 + 0 + 1 = 49 = 0x31outdoor landcell 0xA9B40031. So the player crossing the doorway traverses 0031 (outdoor) → 0170 (vestibule, via the 0xFFFF exit portal) → 0171 (room) — exactly the master-plan ping-pong 0031↔0170↔0171. Verified real.

Naming note: a 2026-05-21 capture dir called 0170/0171 the "inn 2nd floor"; that label was loose. By geometry it is the 7-cell building at (161.93, 7.50). Identity (cottage vs inn) is irrelevant to the conformance — what matters is 0170 carries the exit portal (the doorway) and 0171 is the room behind it.

Golden interior points (verified point_in_cell == true)

Cell-LOCAL points whose EnvCell.PointInCell(world) returns true (the world form is Vector3.Transform(local, cellPhysics.WorldTransform)):

Cell Interior LOCAL point Interior WORLD point Notes
0xA9B40170 (5.865, -8.449, 0.417) (156.06, 15.95, 94.42) 115/125 grid-inset points inside (small/irregular vestibule)
0xA9B40171 (6.55, -3.25, 4.60) (157.01, 13.69, 95.53)* bounds-center = bsphere origin; 125/125 inside (clean box)

* world recomputed by the test at runtime via the cell's WorldTransform; the value above is the firstInside probe — the canonical bsphere-origin local (6.55,-3.25,4.60) is also fully interior.

These are retail-faithful by construction: the ContainmentBsp is loaded from the same dats retail loads, so a geometrically-correct containment answer is the retail answer.

Golden provenance summary

Golden Provenance Status
point_in_cell (interior true, far-away false) geometric (real dat BSP) autonomous (Task 3)
find_cell_list deep-inside picks 0171/0170 geometric (real dat cells) autonomous (Task 4)
find_cell_list doorway-threshold pick retail cdb trace Task 6 — USER GATE / mine existing traces
PVS visible-set retail cdb cell_draw_list trace deferred to P4 (Task 7 scaffold)

P1-entry checklist (filled at end of P0)

  • Threshold golden GREEN (acdream already matches retail) or RED (P1 must fix) — recorded here.
  • "P0 gate met: ≥1 retail-trace-backed assertion exists" — stated explicitly so P1 can begin.