[PR #3374] [MERGED] upgrade-datapack: docs, and checks against vanilla 26.2 and 26.3 #4942

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3374
Author: @ThatCakeIsAPie
Created: 10/28/2026
Status: ✅ Merged
Merged: 10/29/2026
Merged by: @ludovic111

Base: main ← Head: feat/upgrade-datapack-4


📝 Commits (10+)

  • 81b3803 port-pack: upgrade-datapack, a 26.2 data pack's registries in 26.3's formats
  • 2aca6fe port-pack: upgrade-datapack rewrites density functions
  • 3d39bbd port-pack: upgrade-datapack rewrites noise settings, dimensions and presets
  • f983223 port-pack: upgrade-datapack rewrites features and placements
  • 85bfbc7 upgrade-datapack: docs, and checks against vanilla 26.2 and 26.3
  • 0771f59 upgrade-datapack: refuse pack entries that leave the pack
  • 825f8f8 Merge feat/upgrade-datapack-1: refuse pack entries that leave the pack
  • 217216e Merge feat/upgrade-datapack-2a: refuse pack entries that leave the pack
  • 1ffe686 Merge feat/upgrade-datapack-2b: refuse pack entries that leave the pack
  • a717d6d Merge feat/upgrade-datapack-3: refuse pack entries that leave the pack

📊 Changes

13 files changed (+2066 additions, -3 deletions)

View changed files

📝 crates/horizon-port-pack/Cargo.toml (+3 -1)
📝 crates/horizon-port-pack/src/lib.rs (+1 -0)
📝 crates/horizon-port-pack/src/main.rs (+23 -2)
➕ crates/horizon-port-pack/src/upgrade/density.rs (+323 -0)
➕ crates/horizon-port-pack/src/upgrade/features.rs (+122 -0)
➕ crates/horizon-port-pack/src/upgrade/mod.rs (+630 -0)
➕ crates/horizon-port-pack/src/upgrade/noise.rs (+112 -0)
➕ crates/horizon-port-pack/src/upgrade/registries.rs (+168 -0)
➕ crates/horizon-port-pack/src/upgrade/settings.rs (+252 -0)
📝 docs/README.md (+1 -0)
➕ docs/datapack-upgrade.md (+86 -0)
➕ tools/datapack_upgrade_fidelity.py (+196 -0)
➕ tools/datapack_upgrade_rosetta.py (+149 -0)

📄 Description

🤖 Opened by ThatCakeIsAPie's AI agent (Claude), not by ThatCakeIsAPie themself.

Builds on #3373 (feat/upgrade-datapack-3): until that merges, its commits show here too; this PR's own change is the last commit(s) on top of it.

What and why

The last part of horizon-port-pack upgrade-datapack (26.2 data packs in 26.3's formats, parts 1 to 4): its documentation and the two checks that compare it with the real game.

  • docs/datapack-upgrade.md: how to run the command, every rewrite with how it is checked, and what is not rewritten. It is linked from docs/README.md and the command's help. It says plainly that Horizon doesn't apply a pack's world generation yet, and that packs are often All Rights Reserved, so an upgraded copy shouldn't be shared;
  • tools/datapack_upgrade_rosetta.py: writes vanilla 26.2's own worldgen (from the 26.2 server jar the player downloaded) out as a pack, upgrades it, and compares it with vanilla 26.3's file by file. Registries whose format changed but whose content didn't must come out identical. Density functions and noise settings differ where Mojang rewrote expressions, and those are judged by generated terrain instead;
  • tools/datapack_upgrade_fidelity.py: starts vanilla's 26.2 and 26.3 dedicated servers on the same seed, the first with a pack and the second with its upgrade. It force loads the same chunks and compares the saved blocks: how many differ, the most common pairs, and at which heights. Without packs it measures what 26.3 itself changed, which the upgrade can't be blamed for. A pack that 26.3 refuses (registry errors in the log) fails the run.

Both tools reuse tools/lab.py, tools/anvil_dump.py and the dedicated server harness's Server. Neither downloads anything: the 26.2 jar must be in .local/vanilla-26.2/. So they are run by hand and are not part of CI.

Vanilla reference

None for the docs. The tools run the vanilla 26.2 and 26.3 server jars themselves.

Tested on: the 26.2 world generation pack To The Max, which the upgrade and both tools were developed against (42 biomes, 175 density functions, its noise settings, carvers, features and structures). No other third-party 26.2 packs have been tried yet. The tools weren't re-run for this split: this machine has no 26.2 jar.

Self-check

pr_ready (tools/pr_ready.py --quick --base upstream/main on DESKTOP-LT6RAH8, against upstream/main at e1b2b0b2f, 2 min 36 s)

Check Result
Scope ⚠️ 13 files, +2020 −3; 1936 lines of code: over 500, split it if it can ship in parts
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 401 run, FAILED (failures=1, errors=1, skipped=1) (1 min 50 s)
rustfmt ✅ (16 s)
clippy ✅ (5 s)
tests: horizon-port-pack ✅ 76 passed (1 s)
doc tests ✅ 0 passed
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ✅ (1 s)
launcher clippy ❌ failed (8 s)
launcher tests ✅ 212 passed (9 s)
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

The Python tests that fail here fail the same way on upstream main on this Windows machine (symlink privilege, path separators); they're independent of this change, and CI runs them on Linux. Launcher clippy fails on Windows on upstream main too: an unused CommandExt import in launcher/src/sources.rs (9f1fa0a0a), which this change doesn't touch; #3363 removes it.

Label: skip-release.

🤖 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/3374 **Author:** [@ThatCakeIsAPie](https://github.com/ThatCakeIsAPie) **Created:** 10/28/2026 **Status:** ✅ Merged **Merged:** 10/29/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/upgrade-datapack-4` --- ### 📝 Commits (10+) - [`81b3803`](https://github.com/horizon-rust/horizon/commit/81b38030176f5e9e8beac500403a80265e88ce64) port-pack: upgrade-datapack, a 26.2 data pack's registries in 26.3's formats - [`2aca6fe`](https://github.com/horizon-rust/horizon/commit/2aca6fe06c3a9f551d2b1566acafe0043318d8f9) port-pack: upgrade-datapack rewrites density functions - [`3d39bbd`](https://github.com/horizon-rust/horizon/commit/3d39bbdaf1ab25d57bd32a3273ca38b88fdf45ec) port-pack: upgrade-datapack rewrites noise settings, dimensions and presets - [`f983223`](https://github.com/horizon-rust/horizon/commit/f9832233540ce7455e806cb41f541982350717e4) port-pack: upgrade-datapack rewrites features and placements - [`85bfbc7`](https://github.com/horizon-rust/horizon/commit/85bfbc7d46fcaaa0f068eb1390598d445dae94e5) upgrade-datapack: docs, and checks against vanilla 26.2 and 26.3 - [`0771f59`](https://github.com/horizon-rust/horizon/commit/0771f59bca57243d668e2aafbed932dfe25f38d6) upgrade-datapack: refuse pack entries that leave the pack - [`825f8f8`](https://github.com/horizon-rust/horizon/commit/825f8f8845503b37435f329f3f1ecfb400573c63) Merge feat/upgrade-datapack-1: refuse pack entries that leave the pack - [`217216e`](https://github.com/horizon-rust/horizon/commit/217216e263333f004be19bdb07645d2eebe84dbf) Merge feat/upgrade-datapack-2a: refuse pack entries that leave the pack - [`1ffe686`](https://github.com/horizon-rust/horizon/commit/1ffe686350daf1ac2bb8867d1e48e909ca0b8721) Merge feat/upgrade-datapack-2b: refuse pack entries that leave the pack - [`a717d6d`](https://github.com/horizon-rust/horizon/commit/a717d6d5834b3f859e1a0cea752ac5d873026cca) Merge feat/upgrade-datapack-3: refuse pack entries that leave the pack ### 📊 Changes **13 files changed** (+2066 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-port-pack/Cargo.toml` (+3 -1) 📝 `crates/horizon-port-pack/src/lib.rs` (+1 -0) 📝 `crates/horizon-port-pack/src/main.rs` (+23 -2) ➕ `crates/horizon-port-pack/src/upgrade/density.rs` (+323 -0) ➕ `crates/horizon-port-pack/src/upgrade/features.rs` (+122 -0) ➕ `crates/horizon-port-pack/src/upgrade/mod.rs` (+630 -0) ➕ `crates/horizon-port-pack/src/upgrade/noise.rs` (+112 -0) ➕ `crates/horizon-port-pack/src/upgrade/registries.rs` (+168 -0) ➕ `crates/horizon-port-pack/src/upgrade/settings.rs` (+252 -0) 📝 `docs/README.md` (+1 -0) ➕ `docs/datapack-upgrade.md` (+86 -0) ➕ `tools/datapack_upgrade_fidelity.py` (+196 -0) ➕ `tools/datapack_upgrade_rosetta.py` (+149 -0) </details> ### 📄 Description > 🤖 Opened by ThatCakeIsAPie's AI agent (Claude), not by ThatCakeIsAPie themself. **Builds on #3373** (`feat/upgrade-datapack-3`): until that merges, its commits show here too; this PR's own change is the last commit(s) on top of it. ## What and why The last part of `horizon-port-pack upgrade-datapack` (26.2 data packs in 26.3's formats, parts 1 to 4): its documentation and the two checks that compare it with the real game. - **`docs/datapack-upgrade.md`**: how to run the command, every rewrite with how it is checked, and what is not rewritten. It is linked from `docs/README.md` and the command's help. It says plainly that Horizon doesn't apply a pack's world generation yet, and that packs are often All Rights Reserved, so an upgraded copy shouldn't be shared; - **`tools/datapack_upgrade_rosetta.py`**: writes vanilla 26.2's own worldgen (from the 26.2 server jar the player downloaded) out as a pack, upgrades it, and compares it with vanilla 26.3's file by file. Registries whose format changed but whose content didn't must come out identical. Density functions and noise settings differ where Mojang rewrote expressions, and those are judged by generated terrain instead; - **`tools/datapack_upgrade_fidelity.py`**: starts vanilla's 26.2 and 26.3 dedicated servers on the same seed, the first with a pack and the second with its upgrade. It force loads the same chunks and compares the saved blocks: how many differ, the most common pairs, and at which heights. Without packs it measures what 26.3 itself changed, which the upgrade can't be blamed for. A pack that 26.3 refuses (registry errors in the log) fails the run. Both tools reuse `tools/lab.py`, `tools/anvil_dump.py` and the dedicated server harness's `Server`. Neither downloads anything: the 26.2 jar must be in `.local/vanilla-26.2/`. So they are run by hand and are not part of CI. ## Vanilla reference None for the docs. The tools run the vanilla 26.2 and 26.3 server jars themselves. Tested on: the 26.2 world generation pack *To The Max*, which the upgrade and both tools were developed against (42 biomes, 175 density functions, its noise settings, carvers, features and structures). No other third-party 26.2 packs have been tried yet. The tools weren't re-run for this split: this machine has no 26.2 jar. ## Self-check **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on DESKTOP-LT6RAH8, against upstream/main at e1b2b0b2f, 2 min 36 s) | Check | Result | | --- | --- | | Scope | ⚠️ 13 files, +2020 −3; 1936 lines of code: over 500, split it if it can ship in parts | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 401 run, FAILED (failures=1, errors=1, skipped=1) (1 min 50 s) | | rustfmt | ✅ (16 s) | | clippy | ✅ (5 s) | | tests: horizon-port-pack | ✅ 76 passed (1 s) | | doc tests | ✅ 0 passed | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ✅ (1 s) | | launcher clippy | ❌ failed (8 s) | | launcher tests | ✅ 212 passed (9 s) | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | The Python tests that fail here fail the same way on upstream main on this Windows machine (symlink privilege, path separators); they're independent of this change, and CI runs them on Linux. Launcher clippy fails on Windows on upstream main too: an unused `CommandExt` import in `launcher/src/sources.rs` (9f1fa0a0a), which this change doesn't touch; #3363 removes it. Label: `skip-release`. 🤖 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 05:09:04 +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#4942
No description provided.