Skip to content

test(cliffs): RESULT - the unexplained residual sits on CHUNK BORDERS, 2.91 sigma (#84) - #132

Merged
wormeyman merged 1 commit into
mainfrom
test/border-enrichment-decisive
Aug 4, 2026
Merged

test(cliffs): RESULT - the unexplained residual sits on CHUNK BORDERS, 2.91 sigma (#84)#132
wormeyman merged 1 commit into
mainfrom
test/border-enrichment-decisive

Conversation

@wormeyman

Copy link
Copy Markdown
Owner

#131 reported a chunk-border enrichment as a lead and said one more capture round would settle it. It did.

batch unexplained on chunk border base rate z
original 3 regions 14 9 (64.3%) 45.0% 1.45
+4 regions (#131) 13 9 (69.2%) 47.2% 1.59
+8 regions (here) 17 12 (70.6%) 46.0% 2.03
combined, 15 regions 44 30 (68.2%) ~46.3% 2.91

p ≈ 0.002. This is a result, not a lead.

The prediction was registered before the capture

Written into captureVulcanusCliffEntitiesBorderBatch's own doc comment, before it ran: roughly 26 more unexplained cells with about 17 on a border if the enrichment is real at ~66%, taking the combined figure to ~2.9 sigma - and a fall back toward the base rate if it is noise.

It came back 12 of 17, at a higher rate than predicted on fewer cells, and the combined figure landed on 2.91. Effect size is stable across all three batches (64-71%) against a base rate that is also stable (45-47%) - which is what says the comparison is sound rather than the numerator being lucky.

The first row was correctly dismissed as noise when it was all there was. Its value came from being written down, so it could be re-tested once n grew.

Why it points at updateConnections

Chunk borders are that rule's entire domain. applyCliffs gates it on tryToAddCliff's fifth argument, which is !onChunkBorder, so it runs on the chunk's outer ring and nowhere else. Nothing else in the pipeline treats border cells differently at all.

And it is the rule the port has the weakest grip on:

Modelled approximately, unobservable directly, and the residual it cannot explain is enriched 1.47x on precisely its domain. First positive evidence that updateConnections does anything.

What it does NOT say

It does not say those 30 cells are destroyed by updateConnections. An enrichment on a rule's domain is not the rule firing, and 14 of the 44 are not on a border at all - so if this is one cause, it is not the only one.

The port generalises, across fifteen regions

this batch
raw / game cliffs 5581 / 5134
strict superset yes, all eight
precision 0.9818
recall 0.8434
false rejections 7

Two of the eight have no unexplained cells at all, and [-1600,3200] reproduces the game exactly (686 = 686). The residual is concentrated, not a background rate - itself a constraint on any mechanism proposed for it.

Verification

pnpm run verify green - 1499 app (up 6) + 13 worker + 3 container tests, 0 warnings, exit 0. New fixture + PROVENANCE.json entry; capture ~31s. Nothing shipping changed.

🤖 Generated with Claude Code

https://claude.ai/code/session_015jeznBmWiZywUc7cBw9xFU

…, 2.91 sigma (#84)

#131 reported a chunk-border enrichment as a lead and said one more capture
round would settle it. It did.

| batch                 | unexplained | on border  | base  | z    |
| ---                   | ---         | ---        | ---   | ---  |
| original 3 regions    | 14          | 9 (64.3%)  | 45.0% | 1.45 |
| +4 regions (#131)     | 13          | 9 (69.2%)  | 47.2% | 1.59 |
| +8 regions (here)     | 17          | 12 (70.6%) | 46.0% | 2.03 |
| combined, 15 regions  | 44          | 30 (68.2%) | ~46.3%| 2.91 |

p is about 0.002. This is a RESULT, not a lead.

THE PREDICTION WAS REGISTERED BEFORE THE CAPTURE, in
`captureVulcanusCliffEntitiesBorderBatch`'s own doc comment: ~26 more
unexplained cells with ~17 on a border if the enrichment is real at ~66%,
combined ~2.9 sigma - and a FALL back toward the base rate if it is noise. It
came back 12 of 17, at a higher rate on fewer cells, combined landing on 2.91.
Effect size stable across all three batches (64-71%) against a stable base rate
(45-47%).

The first row was correctly dismissed as noise when it was all there was. Its
value came from being written down so it could be re-tested once n grew.

WHY IT POINTS AT `updateConnections`: chunk borders are that rule's entire
domain - `applyCliffs` gates it on `tryToAddCliff`'s fifth argument, which is
`!onChunkBorder`. Nothing else in the pipeline treats border cells differently.
And it is the rule the port has the weakest grip on: measured firing ZERO times
on our own set, modelled as an UPPER bound (the one place the port is knowingly
not a transcription), promoted from inert to load-bearing by #122, and shown by
#127 to be unscoreable from map-gen output. This is the first positive evidence
it does anything.

WHAT IT DOES NOT SAY: not that those 30 are destroyed BY updateConnections. An
enrichment on a rule's domain is not the rule firing, and 14 of the 44 are not
on a border at all - if this is one cause it is not the only one.

The port also generalises: 5581 raw / 5134 game cliffs, strict superset in all
eight regions, precision 0.9818, recall 0.8434. Two regions have no unexplained
cells and [-1600,3200] reproduces the game exactly (686 = 686), so the residual
is concentrated rather than a background rate - itself a constraint on any
mechanism proposed for it.

New fixture + PROVENANCE entry; capture ~31s.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015jeznBmWiZywUc7cBw9xFU
@wormeyman
wormeyman merged commit 519a951 into main Aug 4, 2026
6 checks passed
@wormeyman
wormeyman deleted the test/border-enrichment-decisive branch August 4, 2026 03:42
wormeyman added a commit that referenced this pull request Aug 4, 2026
…ism REFUTED (#84) (#134)

#132 gave `updateConnections` the lead on the clause "nothing else in the
pipeline treats border cells differently at all". That clause was false, and
the counter-example makes the lead stronger rather than weaker.

A cliff's collision box reaches 3.371 tiles; a border cell's centre is 1.5-2.5
tiles from the chunk edge and every interior cell's is 5.5-6.5. So 16 of the 20
orientations cross a chunk edge from the outer ring and none can from anywhere
else - a second border-only channel. And there is a rule on the far side of it:
`Surface::checkTileCollisions` skips a tile whose id is 0, and
`getEffectiveTileID` returns 0 for an absent chunk, so a box reaching into a
not-yet-generated chunk reads no tile and does not collide.

Scored on twelve regions already on disk, with the losing condition registered
before the run - "a non-crossing border rate that is not lower than the
crossing one refutes it":

| population | unexplained | rate |
| --- | --- | --- |
| interior | 9 / 4484 | 0.20% |
| border, box crosses an edge | 7 / 1407 | 0.50% |
| border, box does not cross | 14 / 2479 | 0.56% |

No-information predicts 7.6 crossing cells; observed 7. Refuted. Its own
direction fails too: an absent chunk makes the game KEEP a cliff, so its
signature is a false rejection with a blocking tile across an edge - 0 of 9,
and the predicate is non-vacuous.

The gain is a property the 2.91-sigma result did not have: the enrichment is
orientation-BLIND, which is what a cell-index gate looks like. Both halves keep
the 2.7x enrichment over the interior.

`Cliff`'s connection system is also now decompiled whole. Three facts change
what to try next:

- `onDestroy`'s cascade has FOUR gates, including `map->[0x240] == 0` and an
  entity flag set from the creation parameters. Map generation satisfies all
  four; a Lua or editor probe need not - a hazard for exactly the runtime probe
  #127 asked for.
- `crater-cliff` has no connections at all: the whole system is gated on
  `proto->place_as_crater == nullptr`.
- There is no second connection pass during map generation.
  `updateAndFixConnections` is called from one site in the binary,
  `CliffEditor::buildCliffs`.

No new fixtures, no shipping behaviour change.


Claude-Session: https://claude.ai/code/session_01MmitdaFJxN9Wm8LkQu33kc

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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