[PR #1109] [MERGED] Chunk generation harness: compare postprocessing marks #3055

Closed
opened 2026-11-02 16:01:08 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1109
Author: @ludovic111
Created: 10/21/2026
Status: ✅ Merged
Merged: 10/21/2026
Merged by: @ludovic111

Base: main ← Head: tools/chunk-harness-postprocess


📝 Commits (1)

  • e725e52 Chunk generation harness: compare postprocessing marks too

📊 Changes

3 files changed (+38 additions, -1 deletions)

View changed files

📝 crates/horizon-world/examples/chunk_dump.rs (+14 -0)
📝 mods/horizon/src/test/java/dev/horizonlab/parity/VanillaChunkGenerationOracle.java (+10 -0)
📝 tools/test_chunk_generation_parity.py (+14 -1)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Harness-only change, no game code (label skip-release). Found while checking #996 and #308.

What

tools/test_chunk_generation_parity.py compared blocks, heightmaps and block entities, but not the postprocessing marks a generated chunk carries. These are the positions ProtoChunk.markPosForPostprocessing records, which ChunkMap.postProcessGeneration ticks once the chunk becomes full (fluids start flowing, shapes update). A chunk with the same blocks but other marks behaves differently right after it loads. Water that flows where vanilla's doesn't breaks leaf litter, moss and plants into items (#996). Now:

  • VanillaChunkGenerationOracle prints a p X Y Z line for every mark (ProtoChunk.unpackOffsetCoordinates per section);
  • crates/horizon-world/examples/chunk_dump.rs prints the same from chunk.terrain.postprocessing();
  • the harness compares the marks as a multiset and reports the counts, the first difference and what is extra or missing.

Results

Horizon matches vanilla, so the extra drops in #996 don't come from generation:

  • overworld, seed 12345, 36 chunks: 6,473 marks, 0 differences;
  • Nether, 3 seeds plus the #249 regression site, 311 chunks (bastions, fortresses, fossils, ruined portals, huge fungi, basalt deltas): 0 differences.

Checks

  • cargo fmt --all -- --check: clean.
  • cargo clippy -p horizon-world --all-targets -- -D warnings (with set -o pipefail): clean.
  • cargo test -p horizon-world: all pass.
  • tools/parity.py --changed origin/main: 142 harnesses depend on the four P4 branches (this one and the fixes for #996, #1037 and #770); they ran once on the branches merged onto main ae21bd54 (Mac mini, --changed origin/main): all 142 pass, including chunk_generation (with the new comparison), decorated_region, structure_density, terrain, tree_feature, worldgen, worldgen_random and world_spawn (60/60 seeds). Nothing failed, so no rerun on plain main was needed.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/1109 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/21/2026 **Status:** ✅ Merged **Merged:** 10/21/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `tools/chunk-harness-postprocess` --- ### 📝 Commits (1) - [`e725e52`](https://github.com/horizon-rust/horizon/commit/e725e5257f8c8522b01058ff890db93958ccfce7) Chunk generation harness: compare postprocessing marks too ### 📊 Changes **3 files changed** (+38 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-world/examples/chunk_dump.rs` (+14 -0) 📝 `mods/horizon/src/test/java/dev/horizonlab/parity/VanillaChunkGenerationOracle.java` (+10 -0) 📝 `tools/test_chunk_generation_parity.py` (+14 -1) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Harness-only change, no game code (label `skip-release`). Found while checking #996 and #308. ## What `tools/test_chunk_generation_parity.py` compared blocks, heightmaps and block entities, but not the **postprocessing marks** a generated chunk carries. These are the positions `ProtoChunk.markPosForPostprocessing` records, which `ChunkMap.postProcessGeneration` ticks once the chunk becomes full (fluids start flowing, shapes update). A chunk with the same blocks but other marks behaves differently right after it loads. Water that flows where vanilla's doesn't breaks leaf litter, moss and plants into items (#996). Now: - `VanillaChunkGenerationOracle` prints a `p X Y Z` line for every mark (`ProtoChunk.unpackOffsetCoordinates` per section); - `crates/horizon-world/examples/chunk_dump.rs` prints the same from `chunk.terrain.postprocessing()`; - the harness compares the marks as a multiset and reports the counts, the first difference and what is extra or missing. ## Results Horizon matches vanilla, so the extra drops in #996 don't come from generation: - overworld, seed 12345, 36 chunks: 6,473 marks, 0 differences; - Nether, 3 seeds plus the #249 regression site, 311 chunks (bastions, fortresses, fossils, ruined portals, huge fungi, basalt deltas): 0 differences. ## Checks - `cargo fmt --all -- --check`: clean. - `cargo clippy -p horizon-world --all-targets -- -D warnings` (with `set -o pipefail`): clean. - `cargo test -p horizon-world`: all pass. - `tools/parity.py --changed origin/main`: 142 harnesses depend on the four P4 branches (this one and the fixes for #996, #1037 and #770); they ran once on the branches merged onto main ae21bd54 (Mac mini, `--changed origin/main`): **all 142 pass**, including chunk_generation (with the new comparison), decorated_region, structure_density, terrain, tree_feature, worldgen, worldgen_random and world_spawn (60/60 seeds). Nothing failed, so no rerun on plain main was needed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 16:01:08 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#3055
No description provided.