Port the fixImpossibleCells retry and on/off checks to Rust (#227) - #356
Merged
Conversation
wormeyman
force-pushed
the
feat/227-fix-impossible-cells
branch
from
August 30, 2026 05:42
f38b167 to
afb597c
Compare
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
Port-first entry 5, which merges verdicts 5 and 9 because both halves die with `src/noise/cliffs/cliffPlacement.ts`. Seven tests, from `test/fixImpossibleCellsRetry.spec.ts` and `test/cliffFixImpossibleCells.spec.ts`. ## The retry branch was ungraded, and this measures that rather than asserting it `fix_impossible_cells_sweep` sets its own retry flag: on reaching a cell it cannot fix it restarts the whole pass, first zeroing the eight outer edges of the chunk's four corner cells, and a second failure abandons the chunk. It is fully implemented here and reached by nothing - over the committed captures the retry fires once in 512 chunks and changes no placed cell, which is exactly why no fixture grades it. Planted rather than predicted: | plant | result | | --- | --- | | remove the retry entirely | **429 tests pass, only the 2 new retry tests fail** | | fire the corner step unconditionally | the guard test fails, and so does the Nauvis on/off test | The first row is the finding. With the branch deleted the whole crate goes green except the tests added here, oracle fixtures included. The second row is why the guard test is not ceremony: the corner step clears eight edges unconditionally, so firing it on a healthy chunk deletes real cliffs - and the Nauvis comparison catches that too, which was not designed in. ## The other half pins a NEGATIVE result The sweep does not change Nauvis by a single cell, at either oracle seed. That retires the claim carried in `cliffs-NOTES.md` from 2026-07-20 that Nauvis's ~6% cliff residual "is `fixImpossibleCells`". It is not. Nauvis's `cliffiness_nauvis` is a hard 0-or-10 gate, so the configurations it produces are already legal. If this ever fails, that conclusion needs revisiting - it does not mean the port drifted. Two guards around it, because a negative result is the easiest kind to rot: - The placed-cell counts are frozen, 282 at seed 123456 and 52 at 777771. Two EMPTY lists also compare equal, so without the counts a placement that stopped placing anything would satisfy the test perfectly. The spec this replaces did not have them. - The companion test requires the sweep to FIRE on Vulcanus, whose continuous `cliffiness_basic` produces configurations the orientation table rejects. Without it, "no change on Nauvis" is equally consistent with a sweep that does nothing anywhere. The comparison is over `(x, y, code)` rather than the cell set alone, which is stronger than the spec's own key comparison and holds. Claude-Session: https://claude.ai/code/session_01UVcbv1pAhPUoCC6aBwZUtg Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
wormeyman
force-pushed
the
feat/227-fix-impossible-cells
branch
from
August 30, 2026 06:06
afb597c to
5769902
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Port-first entry 5, which merges verdicts 5 and 9 because both halves die with
src/noise/cliffs/cliffPlacement.ts. Seven tests, fromtest/fixImpossibleCellsRetry.spec.tsandtest/cliffFixImpossibleCells.spec.ts.The retry branch was ungraded, and this measures that rather than asserting it
fix_impossible_cells_sweepsets its own retry flag: on reaching a cell itcannot fix it restarts the whole pass, first zeroing the eight outer edges of
the chunk's four corner cells, and a second failure abandons the chunk. It is
fully implemented here and reached by nothing - over the committed captures the
retry fires once in 512 chunks and changes no placed cell, which is exactly why
no fixture grades it.
Planted rather than predicted:
The first row is the finding. With the branch deleted the whole crate goes green
except the tests added here, oracle fixtures included. The second row is why the
guard test is not ceremony: the corner step clears eight edges unconditionally,
so firing it on a healthy chunk deletes real cliffs - and the Nauvis comparison
catches that too, which was not designed in.
The other half pins a NEGATIVE result
The sweep does not change Nauvis by a single cell, at either oracle seed. That
retires the claim carried in
cliffs-NOTES.mdfrom 2026-07-20 that Nauvis's ~6%cliff residual "is
fixImpossibleCells". It is not. Nauvis'scliffiness_nauvisis a hard 0-or-10 gate, so the configurations it produces are already legal. If
this ever fails, that conclusion needs revisiting - it does not mean the port
drifted.
Two guards around it, because a negative result is the easiest kind to rot:
EMPTY lists also compare equal, so without the counts a placement that stopped
placing anything would satisfy the test perfectly. The spec this replaces did
not have them.
cliffiness_basicproduces configurations the orientation table rejects.Without it, "no change on Nauvis" is equally consistent with a sweep that does
nothing anywhere.
The comparison is over
(x, y, code)rather than the cell set alone, which isstronger than the spec's own key comparison and holds.
Claude-Session: https://claude.ai/code/session_01UVcbv1pAhPUoCC6aBwZUtg
Co-authored-by: Claude Opus 5 (1M context) noreply@anthropic.com