Grade the overlay water skip and the mark painters in Rust (#227) - #358
Merged
Conversation
wormeyman
force-pushed
the
feat/227-overlay-water-and-marks
branch
from
August 30, 2026 06:31
3d1cecf to
43c7577
Compare
Second of the cheap-tier delete-with-loss ports, and it closes the same claim in four deleted specs at once. `renderCliffs`, `renderRocks`, `renderEnemies` and `renderResources` each carried a "never paints over water" test. Rust has the predicate - `is_nauvis_water`, derived from the palette so it cannot drift - and every overlay passes it, but the only test of it was the tree one. `paint_mark` and `paint_mark_skipping` had no test at all, though every placement overlay on both planets goes through them. ## Two plants shaped the water test, and both were mine The obvious form of this test is worth writing down as a dead end, because it looks convincing: | attempt | why it does not grade anything | | --- | --- | | render each overlay, assert no water pixel moved | **Nearly vacuous.** Rocks are excluded from water at PLACEMENT time, so in an ordinary window no mark ever gets the chance to spill onto water. Deleting the rock overlay's skip entirely left it green. | | build an all-water base from a colour sampled out of a render | **Vacuous the other way.** The window handed back deepwater, so a predicate that stopped recognising SHALLOW water also passed. | Both were planted and observed, not reasoned about. The shipped test names both tiles from the palette rather than sampling one, and under the shallow-water plant it now fails while all 34 other tests pass. It also paints the same mark on a land base and requires all 25 pixels, so a painter that does nothing cannot satisfy it. ## The rest - `every_nauvis_overlay_paints_and_leaves_water_alone` is kept, and is deliberately described as the weaker check it is. What it does pin is that each overlay paints SOMETHING in a real window. The enemy arm runs at a different origin because enemy bases are excluded from the starting area by design - the anti-vacuity guard caught that rather than passing silently, and that is how the window was chosen. - Three `paint_mark` tests: the `(2r+1)` square, clipping at the edge instead of wrapping, and consulting the skip predicate per pixel rather than per mark. 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-overlay-water-and-marks
branch
from
August 30, 2026 06:44
43c7577 to
bbd5b12
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.
Second of the cheap-tier delete-with-loss ports, and it closes the same claim in
four deleted specs at once.
renderCliffs,renderRocks,renderEnemiesandrenderResourceseach carried a "never paints over water" test. Rust has thepredicate -
is_nauvis_water, derived from the palette so it cannot drift - andevery overlay passes it, but the only test of it was the tree one.
paint_markandpaint_mark_skippinghad no test at all, though everyplacement overlay on both planets goes through them.
Two plants shaped the water test, and both were mine
The obvious form of this test is worth writing down as a dead end, because it
looks convincing:
Both were planted and observed, not reasoned about. The shipped test names both
tiles from the palette rather than sampling one, and under the shallow-water
plant it now fails while all 34 other tests pass.
It also paints the same mark on a land base and requires all 25 pixels, so a
painter that does nothing cannot satisfy it.
The rest
every_nauvis_overlay_paints_and_leaves_water_aloneis kept, and isdeliberately described as the weaker check it is. What it does pin is that
each overlay paints SOMETHING in a real window. The enemy arm runs at a
different origin because enemy bases are excluded from the starting area by
design - the anti-vacuity guard caught that rather than passing silently, and
that is how the window was chosen.
paint_marktests: the(2r+1)square, clipping at the edge instead ofwrapping, and consulting the skip predicate per pixel rather than per mark.
Claude-Session: https://claude.ai/code/session_01UVcbv1pAhPUoCC6aBwZUtg
Co-authored-by: Claude Opus 5 (1M context) noreply@anthropic.com