test(simulation): golden-seed regression for the Layer 0->1 cascade (#952, D-200)
End-to-end determinism guard. cascade_golden.rs pins two artifacts for a real committed body heightmap (GJ1c) in one diffable JSON golden (server/tests/golden/cascade_layer1.json): - Layer 0: SHA-256 of the source heightmap.png bytes (flips if the Python heightmap generator or the file changes) - Layer 1: the serialized Layer1Output of run_cascade on a 128x64 downsample (flips if the Rust drainage/feature/sub-biome code changes) JSON (not the msgpack discussed in refinement) to match the existing golden_suite.rs convention and stay diffable — a failure shows what drifted. UPDATE_GOLDEN=1 regenerates; wired into `make golden-update`. Adds Serialize/Deserialize to RiverNetwork/DrainageBasin/Layer1Output and a sha2 dev-dependency. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -209,8 +209,9 @@ golden-diff:
|
||||
fi
|
||||
|
||||
golden-update:
|
||||
@echo "Regenerating golden file..."
|
||||
@echo "Regenerating golden files..."
|
||||
@cd server && UPDATE_GOLDEN=1 cargo test --test golden_suite -- proof_room_tick_10_matches_golden
|
||||
@cd server && UPDATE_GOLDEN=1 cargo test --test cascade_golden
|
||||
@git add server/tests/golden/
|
||||
@echo "--- Golden file updated and staged ---"
|
||||
@echo "Review with: git diff --cached -- server/tests/golden/"
|
||||
|
||||
Reference in New Issue
Block a user