Repository navigation
Gleba: terrace, climate and the 41-tile choice, exact at tier 1 (#454) - #557
Conversation
f32 at every step, strict comparison against the strength, NaN stays NaN. Gleba's elevation will read it twice. Unit tests pin the mid-ramp, the exact boundary, a negative step and the NaN case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kd6o1dTdCEZ5JSjytamwMZ
The four property fields (elevation, moisture, aux, temperature) and every named expression the 41 tiles read, built once per render in a GlebaStack: the starting cones, the spiral bridges, the two terraces, the fertile spot field and the rockpools. Every step is f32 and the trig is the game's own polynomial. The tile catalog holds the 41 probabilities and one strict argmax, in the planet's autoplace listing order (the game's own candidate order is not established, and the fixture's 67 tied positions cannot say). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kd6o1dTdCEZ5JSjytamwMZ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kd6o1dTdCEZ5JSjytamwMZ
The module has no new reachable code; its bytes move because a shared file (eval/math.rs) gained a function and the panic location records shifted. The wasm parity specs pass (203 tests; one Nauvis timeout under a parallel gate run passed when rerun alone). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kd6o1dTdCEZ5JSjytamwMZ
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. (Light single-pass review: the |
Part of #454. First Gleba slice: the
terraceop, Gleba's climate stack and its 41-tile catalog in Rust, graded at tier 1 against the game. No ABI, render or app changes yet, so the app still shows "not available" for Gleba.Result
Against
test/fixtures/oracle-gleba-fields.seed123456.json(Factorio 2.1.23, surface seed forced to 123456, point kernel), everything is exact:elevation,moisture,auxandtemperatureare each 1,024 of 1,024.winCounts. The other 67 positions are exact ties between variants of one tile family, and ours picks one of the tied tiles at all 67. The game's tie-break order is not known yet, so they are not graded.The grade can fail
Every count was full on the first run, so each was checked by planting a break (each reverted afterwards):
terraceas the identitygleba_selectconstants folded in f64sinin place of the game's ownterrace's strict<atfrac == strengthis not reached by the fixture, so a unit test pins it.What changed
eval/math.rs:terrace, all f32 as decoded from the 2.1.23 binary (NoiseOperations::Terrace::run). It has apoison::f64_resulthook and two unit tests.expressions/gleba_terrain.rs,gleba_starting.rs,gleba_stack.rs.tiles/gleba_catalog.rs: the 41 tiles and one strict f32 argmax over them, withpoison::index_result. The candidate order is the planet'sautoplace_settingslisting, as a stand-in until the game's order is read.fixtures.rs: three tier-1 tests, all added toPOISONED_TESTS, and each confirmed red under--features poison.docs/rust-wasm-port.md: a row and a short "Gleba slice 1" section.engine.wasm: rebuilt. The new code is reachable, so the bytes change. The wasm parity specs pass unchanged.Gate
pnpm run verify:lint, the fullpnpm vp test(133 files, 1,404 passed, 3 skipped) andscripts/verify-rust.sh(562 + 52 Rust tests, the poison check, theengine.wasmbyte check) pass on this branch, rebased on #552.Open
GlebaControlsis wired through but untested away from 1.oracle-preview-gleba-terrain.seed123456.png.The game probes for stone, entities, enemies and cliffs are on #454.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Kd6o1dTdCEZ5JSjytamwMZ
Summary by CodeRabbit