[PR #1717] [MERGED] Structure layout harness: starts piece by piece against the structure oracle #3712

Closed
opened 2026-11-03 04:11:37 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: fix/jigsaw-oracle-layouts


📝 Commits (1)

  • 8948bf9 Structure layout harness: Horizon's starts piece by piece against the structure oracle

📊 Changes

5 files changed (+271 additions, -4 deletions)

View changed files

📝 crates/horizon-world/examples/probe/main.rs (+2 -0)
➕ crates/horizon-world/examples/probe/structure_pieces.rs (+103 -0)
📝 crates/horizon-world/src/worldgen/structure.rs (+5 -3)
📝 crates/horizon-world/src/worldgen/structure/template.rs (+6 -1)
➕ tools/test_structure_layout_parity.py (+155 -0)

📄 Description

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

Clean-room: implemented from cleanroom/structures/spec-lithostitched.md §7.1 (the oracle's base_pieces) and oracle/README.md; no mod source read.

What

Step 1 of the structure-mod clean room (structures-cr-impl-1): a check that Horizon's vanilla jigsaw assembler reproduces the layouts a real server saved.

  • structure_pieces probe (world_probe): the starts a chunk owns, piece by piece (element, rotation, position, ground level delta, box).
  • tools/test_structure_layout_parity.py: compares them with the clean-room structure oracle's saves. The oracle's results live outside the repo (.local/structure-oracle/<profile>/seed-N.json.gz, or HORIZON_STRUCTURE_ORACLE); without them it prints SKIP, so CI skips it.
  • StructureTemplate.location: the id a template was loaded under, so a piece names its element.

Result (profile lithostitched, no-mod pieces, seeds 1234 / 2 / 42)

  • 22 of 31 starts match piece for piece: all 12 villages and outposts that 26.3 still places there (67 to 230 pieces each), and the horizontal boxes of the 10 code-built pieces (shipwrecks, desert pyramids, one ruined portal; their height is set when they're placed, after the oracle's comparison point).
  • 9 known version differences: the oracle is 1.21.1. 26.3 vanilla itself (VanillaChunkGenerationOracle scan with HORIZON_PIECES=1) lays out all 18 starts that differ from the 1.21.1 save exactly as Horizon does: 6 trial chambers, 2 ruined portals, and the shipwreck/pyramid heights. One 1.21.1 plains village (seed 1234, chunk -24,47) has no start in 26.3 vanilla either.
  • No vanilla mismatch, so the jigsaw assembler is unchanged.

How tested

python3 tools/test_structure_layout_parity.py: 22 match, 9 known, 0 fail. The 26.3 cross-check was a one-off run of the existing Java oracle.

pr_ready (tools/pr_ready.py --quick on ludovics-mac-mini, against origin/main at 4bb7f96f8, 8 min 58 s)

Check Result
Scope ✅ 5 files, +271 −4
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 252 run, FAILED (errors=2) (33 s)
rustfmt ✅ (6 s)
clippy ✅ (1 min 42 s)
tests: horizon-world ✅ 236 passed (6 min 15 s)
doc tests ✅ 0 passed (3 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 310 affected, to run in CI (--quick): active_effect_tick, active_effects, ambient_sound, anchor, arrow, attribute_health, attribute_map_queries, attribute, attribute_updates, audio_attributes, auto_jump, bamboo and 298 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Python tests: the 2 errors (test_reuses_until_an_input_or_output_changes, test_report_rejects_sources_changed_during_a_run) fail the same way on main on macOS (/private/var temp paths, java shim exit 127).

Needs Ludovic

Nothing. The harness only runs where the oracle results are present: the ThinkPad (~/cleanroom-structures-oracle) and the Mac mini (horizon-parity/cleanroom/structures/oracle/results).

🤖 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/1717 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/25/2026 **Status:** ✅ Merged **Merged:** 10/25/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/jigsaw-oracle-layouts` --- ### 📝 Commits (1) - [`8948bf9`](https://github.com/horizon-rust/horizon/commit/8948bf90c4304dd142e090bc3006ff7f2cde2679) Structure layout harness: Horizon's starts piece by piece against the structure oracle ### 📊 Changes **5 files changed** (+271 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-world/examples/probe/main.rs` (+2 -0) ➕ `crates/horizon-world/examples/probe/structure_pieces.rs` (+103 -0) 📝 `crates/horizon-world/src/worldgen/structure.rs` (+5 -3) 📝 `crates/horizon-world/src/worldgen/structure/template.rs` (+6 -1) ➕ `tools/test_structure_layout_parity.py` (+155 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Clean-room: implemented from cleanroom/structures/spec-lithostitched.md §7.1 (the oracle's `base_pieces`) and oracle/README.md; no mod source read. ## What Step 1 of the structure-mod clean room (structures-cr-impl-1): a check that Horizon's vanilla jigsaw assembler reproduces the layouts a real server saved. - `structure_pieces` probe (world_probe): the starts a chunk owns, piece by piece (element, rotation, position, ground level delta, box). - `tools/test_structure_layout_parity.py`: compares them with the clean-room structure oracle's saves. The oracle's results live outside the repo (`.local/structure-oracle/<profile>/seed-N.json.gz`, or `HORIZON_STRUCTURE_ORACLE`); without them it prints SKIP, so CI skips it. - `StructureTemplate.location`: the id a template was loaded under, so a piece names its element. ## Result (profile `lithostitched`, no-mod pieces, seeds 1234 / 2 / 42) - **22 of 31 starts match piece for piece**: all 12 villages and outposts that 26.3 still places there (67 to 230 pieces each), and the horizontal boxes of the 10 code-built pieces (shipwrecks, desert pyramids, one ruined portal; their height is set when they're placed, after the oracle's comparison point). - **9 known version differences**: the oracle is 1.21.1. 26.3 vanilla itself (`VanillaChunkGenerationOracle scan` with `HORIZON_PIECES=1`) lays out all 18 starts that differ from the 1.21.1 save exactly as Horizon does: 6 trial chambers, 2 ruined portals, and the shipwreck/pyramid heights. One 1.21.1 plains village (seed 1234, chunk -24,47) has no start in 26.3 vanilla either. - No vanilla mismatch, so the jigsaw assembler is unchanged. ## How tested `python3 tools/test_structure_layout_parity.py`: 22 match, 9 known, 0 fail. The 26.3 cross-check was a one-off run of the existing Java oracle. **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at 4bb7f96f8, 8 min 58 s) | Check | Result | | --- | --- | | Scope | ✅ 5 files, +271 −4 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 252 run, FAILED (errors=2) (33 s) | | rustfmt | ✅ (6 s) | | clippy | ✅ (1 min 42 s) | | tests: horizon-world | ✅ 236 passed (6 min 15 s) | | doc tests | ✅ 0 passed (3 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 310 affected, to run in CI (--quick): active_effect_tick, active_effects, ambient_sound, anchor, arrow, attribute_health, attribute_map_queries, attribute, attribute_updates, audio_attributes, auto_jump, bamboo and 298 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | Python tests: the 2 errors (`test_reuses_until_an_input_or_output_changes`, `test_report_rejects_sources_changed_during_a_run`) fail the same way on main on macOS (`/private/var` temp paths, `java` shim exit 127). ## Needs Ludovic Nothing. The harness only runs where the oracle results are present: the ThinkPad (`~/cleanroom-structures-oracle`) and the Mac mini (`horizon-parity/cleanroom/structures/oracle/results`). 🤖 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-03 04:11:37 +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#3712
No description provided.