Skip to content

test(cliffs): the WEST residual is NOT the repair sweep's edge order (#84) - #151

Merged
wormeyman merged 1 commit into
mainfrom
cliffs-sweep-order-lever
Aug 5, 2026
Merged

test(cliffs): the WEST residual is NOT the repair sweep's edge order (#84)#151
wormeyman merged 1 commit into
mainfrom
cliffs-sweep-order-lever

Conversation

@wormeyman

Copy link
Copy Markdown
Owner

#150 localised the border residual to the west chunk edge and recorded one lead: fixImpossibleCellsSweep clears the first clearable edge in the order L, T, R, B - west first, north second - and an edge is clearable only when it is not on the chunk's outer boundary. So a west-edge cell is denied its first choice and a north-edge cell only its second: an asymmetry of exactly the observed shape.

It is not the cause. No capture.

The discriminator is relocation, not shrinkage

If the clear order caused the concentration, permuting it should move the excess to whichever edge is tried first. "Does the error get smaller" would not do - almost any perturbation achieves that by accident.

order unexplained on border W N E S z(west)
L, T, R, B (engine) 25 19 9 5 3 2 2.60
R, B, L, T 75 24 11 7 4 3 2.74
T, L, B, R 46 22 10 5 5 3 2.58
B, R, T, L (west last) 76 23 11 7 3 3 2.91

West is the enriched edge in every arm, and at its strongest in the arm that tries west last. Refuted.

The lever is not inert, and the spec asserts it

That is the trap this shape of test falls into - a null result that really means the knob was never connected. Permuting drives the unexplained count from 25 to 76, so the sweep's order matters enormously to the placement. It simply does not matter to where the residual sits.

The code change

Adds a sweepEdgeOrder option to cliffPlacement.ts, defaulting to L, T, R, B. The if/else chain became an order-driven loop; all 1574 pre-existing tests pass on that refactor before the new spec was added, so the default path is behaviour-identical. Marked EXPERIMENTAL at the option, in the same style as rejectAtCrossingStage and everyCell.

Scoping note

These arms score the shipped model, so the control is #149's 25 unexplained / 19 on border - not #150's 23 / 17, which is the cascade model's row. West is 9 in both, which is the overlap saying they are looking at the same cells.

Where #84 stands

Five mechanisms are now ruled out for the chunk-border residual:

  1. the orientation-reach rival (test(cliffs): the border effect is ORIENTATION-BLIND - a rival mechanism REFUTED (#84) #134)
  2. cascade double-counting (test(cliffs): the border enrichment is NOT a cascade artifact (#84) #143)
  3. the cross-chunk destroy cascade (test(cliffs): the cross-chunk cascade does NOT explain the border enrichment (#84) #149 - 2 of 25)
  4. updateConnections (test(cliffs): the border residual is a WEST-edge residual (#84) #150 - 0 of 23)
  5. the repair sweep's edge order (here)

The west concentration itself is now robust: z = 2.6-2.9 across every arm, unmoved by the one placement lever that could plausibly have produced it.

The remaining west-flavoured observation in this investigation is #142's six ore-recall cells, all with their nearest resource to the west. Whether the two are one phenomenon is untested, and is the cheapest next question.

Verification

pnpm run verify green - 1578 app (up 4) + 13 worker + 3 container tests, 0 warnings, exit 0. Measurement only; shipping accuracy unchanged.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HKjzpWJw1HbnigPP9udqN2

…84)

#150's one lead, tested and refuted. fixImpossibleCellsSweep clears the first
CLEARABLE edge in order L, T, R, B - west first, north second - and an edge is
clearable only when it is not on the chunk's outer boundary, so a west-edge cell
is denied its first choice. An asymmetry of exactly the observed shape. It is not
the cause.

The discriminator is RELOCATION, not shrinkage: if the order caused the
concentration, permuting it should move the excess to whichever edge is tried
first. "Does the error get smaller" would not do - almost any perturbation
achieves that by accident.

  order                    unexpl  border   W  N  E  S  z(west)
  L,T,R,B (engine)             25      19   9  5  3  2     2.60
  R,B,L,T                      75      24  11  7  4  3     2.74
  T,L,B,R                      46      22  10  5  5  3     2.58
  B,R,T,L (west LAST)          76      23  11  7  3  3     2.91

West is the enriched edge in EVERY arm and STRONGEST in the arm that tries west
last. Refuted.

And the lever is not inert - the trap this shape of test falls into, where a null
means the knob was never connected. Permuting drives the unexplained count from
25 to 76, so the sweep's order matters enormously to the placement; it simply
does not matter to WHERE the residual sits. The spec asserts that explicitly.

Adds a `sweepEdgeOrder` option to cliffPlacement, defaulting to L,T,R,B so
shipping behaviour is unchanged - the if/else chain became an order-driven loop
and all 1574 pre-existing tests pass on the refactor before the new spec was
added.

Scoping note: these arms score the SHIPPED model, so the control is #149's 25
unexplained / 19 on border, not #150's 23 / 17, which is the cascade model's row.
West is 9 in both, which is the overlap saying they look at the same cells.

Five mechanisms are now ruled out for the border residual: the orientation-reach
rival (#134), cascade double-counting (#143), the cross-chunk destroy cascade
(#149), updateConnections (#150), and the sweep's edge order here. The west
concentration stands at z = 2.6-2.9 across every arm, robust to the one placement
lever that could plausibly have produced it.

Verified: pnpm run verify green - 1578 app (up 4) + 13 worker + 3 container,
0 warnings, exit 0. Measurement only; shipping accuracy unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HKjzpWJw1HbnigPP9udqN2
@wormeyman
wormeyman merged commit 73758b2 into main Aug 5, 2026
6 checks passed
@wormeyman
wormeyman deleted the cliffs-sweep-order-lever branch August 5, 2026 00:06
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