Skip to content

test(cliffs): pin the SHAPE of the orientation residual (#84) - #92

Merged
wormeyman merged 1 commit into
mainfrom
test/orientation-residual-shape
Aug 2, 2026
Merged

test(cliffs): pin the SHAPE of the orientation residual (#84)#92
wormeyman merged 1 commit into
mainfrom
test/orientation-residual-shape

Conversation

@wormeyman

Copy link
Copy Markdown
Owner

cliffOrientationOracle.spec.ts counts the residual and bounds it. This pins what it looks like, because the shape is the lead and a change in shape is a change in cause even when the count holds.

Measured after #83, #86 and #90:

  • 37 of 1531 matched cells, all differing in exactly ONE edge. Not one two-edge difference survives; before fix(cliffs): multisample offsets are in GRID UNITS - #18 root cause #83 the dominant mode was two edges (125 of 175), a whole corner on the wrong side of a band.
  • Every one is an OVER-detection — the game reports -to-none, the port reports a crossing on that edge. Never the reverse.
  • Spread over all four edges (L11/R6/T7/B13) and all three regions (7/26/4), so it is not a directional off-by-one.

Two causes are already eliminated, which is why this is worth pinning rather than re-deriving:

  • crossesCliff is exact. Disassembled at 0x10160c914 under 2.1.12 (the VA in the notes had moved); cliffPlacement.ts reproduces it line for line — the a < 0 || b < 0 early-out, the boundary < e0 check, the strict > 0.5 gate and strict crossing comparisons.
  • cliffiness_basic is exonerated. Substituting the game's own corner cliffiness leaves the count at exactly 37/1531.

So the residual is in the grid-4 cliff-elevation field — the one input with no direct per-corner oracle. A single-edge, strictly one-directional over-detection is what a small positive field offset looks like.

The direction assertion is the load-bearing one: if under-detections ever appear, the cause has changed and that reading is dead.

pnpm run verify green: 1315 passed / 3 skipped, 0 warnings.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WRKSNgkidxc6daeHGJHqpt

cliffOrientationOracle.spec.ts counts the residual and bounds it. This pins what
it looks like, because the shape is the lead and a change in shape is a change in
cause even when the count holds.

Measured after #83 (multisample grid), #86 (lava rejection) and #90 (raw
collision box):

- 37 of 1531 matched cells, and all 37 differ in EXACTLY ONE edge. Not one
  two-edge difference survives; before #83 the dominant mode was two edges
  (125 of 175), a whole corner on the wrong side of a band.
- Every one is an OVER-detection: the game reports a -to-none orientation and the
  port reports a crossing on that edge, never the reverse.
- Spread over all four edges (L11/R6/T7/B13) and all three regions (7/26/4), so
  it is not a directional off-by-one.

Two candidate causes are already eliminated, which is why the shape is worth
pinning rather than re-deriving next session:

- crossesCliff is EXACT. Disassembled at 0x10160c914 under 2.1.12 (the VA in
  cliffs-NOTES.md had moved); cliffPlacement.ts reproduces it line for line
  including the a<0||b<0 early-out, the boundary<e0 check, and the strict >0.5
  gate and strict crossing comparisons. No >=-vs-> slip exists to find.
- cliffiness_basic is EXONERATED. Substituting the game's own corner cliffiness
  leaves the count at exactly 37/1531.

So the residual is in the grid-4 cliff-elevation field - the one input in the
chain with no direct per-corner oracle. A single-edge, strictly one-directional
over-detection is what a small positive field offset looks like.

The direction assertion is the load-bearing one: if under-detections ever appear,
the cause has changed and that reading is dead.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WRKSNgkidxc6daeHGJHqpt
@wormeyman
wormeyman merged commit e68f617 into main Aug 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant