[PR #357] [MERGED] Version ports: tools read the pinned version from research-lock.json #2517

Closed
opened 2026-11-02 15:56:51 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: feat/tools-follow-lock


📝 Commits (3)

  • ce87bfb Tools read the pinned Minecraft version from research-lock.json
  • eee7786 Generated version facts through lab.version_info; options and world harnesses take the data version from the jar
  • 9ff74a5 lan_e2e.py: the prepared resources of the pinned version (lab)

📊 Changes

67 files changed (+246 additions, -102 deletions)

View changed files

📝 tests/test_gen_version_consts.py (+1 -1)
📝 tools/agent_control_e2e.py (+7 -2)
📝 tools/audio_harness.py (+1 -1)
📝 tools/bench_sprite_mips.py (+6 -1)
📝 tools/fetch_client_assets.py (+2 -2)
📝 tools/gen_block_state_data.py (+8 -3)
📝 tools/gen_flat_tables.py (+6 -1)
📝 tools/gen_version_consts.py (+2 -8)
📝 tools/generate_entity_tracking.py (+7 -2)
📝 tools/generate_packet_ids.py (+7 -1)
📝 tools/graphics_bench.py (+6 -1)
📝 tools/interaction_lab.py (+1 -1)
📝 tools/lab.py (+23 -4)
📝 tools/lan_e2e.py (+3 -2)
📝 tools/launcher_mcp_e2e.py (+7 -2)
📝 tools/package_native_client.py (+8 -3)
📝 tools/perf_bench.py (+7 -6)
📝 tools/test_block_entity_anim_parity.py (+1 -1)
📝 tools/test_block_entity_render_parity.py (+1 -1)
📝 tools/test_block_particles_parity.py (+1 -1)

...and 47 more files

📄 Description

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

Version ports, port-2 slice 1b: nothing in tools/ names 26.3 by hand any more (docs/version-ports.md, "Regenerate").

What

tools/lab.py gains:

  • lab.VERSION: the version research-lock.json pins (validated like config(), which now uses it);
  • lab.GAME = .local/minecraft/<version>, lab.RESOURCES = .local/horizon-client/<version>;
  • lab.version_info(): the pinned client jar's version.json.

58 tools use them instead of 26.3: every harness's resource folder, jar and decompiled-source paths, the result records of the mod checks ("minecraft": lab.VERSION), the generators' defaults (generate_entity_tracking, gen_block_state_data, gen_flat_tables) and headers (ids.rs's protocol line from the jar), vanilla_client.py's --version and asset index (from the manifest, was "34"), vanilla_login.py's protocol (from the jar), perf_bench.py's options.txt data version and --version, the packaged .desktop comment. Prose (docstrings, scope strings describing what a harness checked) is unchanged.

Why

version_port.py regen builds a candidate worktree pinned to the new version and runs the generators and every harness there; with the version in one place (the lock), they run unchanged against it.

How tested

  • Regenerating ids.rs, lan/tracking.rs and datafix/block_state_data.txt with the new defaults reproduces the committed files byte for byte (after rustfmt).
  • Every changed tool compiles (py_compile); the mechanical replacements were made by pattern, and the leftovers checked by hand.

pr_ready (tools/pr_ready.py --quick --base feat/version-consts on ludovics-mac-mini, against feat/version-consts at 9e0d4c67f, 39 s)

Check Result
Scope ✅ 67 files, +246 −102
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 236 run, FAILED (errors=2) (24 s)
rustfmt ➖ no Rust change
clippy ➖ no Rust change
tests ➖ no crate touched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 301 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 289 more
Label skip-release

The 2 Python test errors fail the same way on plain origin/main on macOS (/private/var tmp paths, no java stub on PATH). Parity: all harnesses are affected; they run once on the integration commit of this PR and #356. Draft until that run is in.

Rebased on main (457a5d7c): tools/lan_e2e.py, added on main since, now reads the pinned version through lab too. CI's earlier parity failure was world_spawn alone hitting the 1500 s --timeout (305 passed), as on #356.

Integration audit (Mac mini)

One integration commit for the stack, as the rules ask:

  • #356 + #357 merged on main (68cbad54): tools/parity.py --all, 306 of 306 harnesses pass. mob_ai passes too, so #290's drowned cases didn't show here. The run was resumed after interruptions, reusing passes. No harness failed at any point.
  • Stack tip (adds #359's command-tree split, the datafix scope fix, and the Python-only #388–#390): every horizon-client probe depends on vanilla.rs, so --changed lists 290 harnesses. I reran the ones the changes reach: command_exec, command_parse, lan, datafix (6 shards), options, world. 11 of 11 runs pass. The "PARITY_RUST_SCOPE not applied" note is gone from datafix.
  • The 26.3 candidate (#359's regen output) passed the 17 port harnesses in #388's forward replay.

Needs Ludovic

Nothing.

🤖 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/357 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/15/2026 **Status:** ✅ Merged **Merged:** 10/21/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/tools-follow-lock` --- ### 📝 Commits (3) - [`ce87bfb`](https://github.com/horizon-rust/horizon/commit/ce87bfb8c76b617bd5c923505eebef5042e95594) Tools read the pinned Minecraft version from research-lock.json - [`eee7786`](https://github.com/horizon-rust/horizon/commit/eee778660907b4c43332e2c2be931369bc61bd08) Generated version facts through lab.version_info; options and world harnesses take the data version from the jar - [`9ff74a5`](https://github.com/horizon-rust/horizon/commit/9ff74a58a1b5043732c93117908c5d8283d46200) lan_e2e.py: the prepared resources of the pinned version (lab) ### 📊 Changes **67 files changed** (+246 additions, -102 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_gen_version_consts.py` (+1 -1) 📝 `tools/agent_control_e2e.py` (+7 -2) 📝 `tools/audio_harness.py` (+1 -1) 📝 `tools/bench_sprite_mips.py` (+6 -1) 📝 `tools/fetch_client_assets.py` (+2 -2) 📝 `tools/gen_block_state_data.py` (+8 -3) 📝 `tools/gen_flat_tables.py` (+6 -1) 📝 `tools/gen_version_consts.py` (+2 -8) 📝 `tools/generate_entity_tracking.py` (+7 -2) 📝 `tools/generate_packet_ids.py` (+7 -1) 📝 `tools/graphics_bench.py` (+6 -1) 📝 `tools/interaction_lab.py` (+1 -1) 📝 `tools/lab.py` (+23 -4) 📝 `tools/lan_e2e.py` (+3 -2) 📝 `tools/launcher_mcp_e2e.py` (+7 -2) 📝 `tools/package_native_client.py` (+8 -3) 📝 `tools/perf_bench.py` (+7 -6) 📝 `tools/test_block_entity_anim_parity.py` (+1 -1) 📝 `tools/test_block_entity_render_parity.py` (+1 -1) 📝 `tools/test_block_particles_parity.py` (+1 -1) _...and 47 more files_ </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Version ports, port-2 slice 1b: nothing in `tools/` names 26.3 by hand any more (docs/version-ports.md, "Regenerate"). ## What `tools/lab.py` gains: - `lab.VERSION`: the version `research-lock.json` pins (validated like `config()`, which now uses it); - `lab.GAME` = `.local/minecraft/<version>`, `lab.RESOURCES` = `.local/horizon-client/<version>`; - `lab.version_info()`: the pinned client jar's `version.json`. 58 tools use them instead of `26.3`: every harness's resource folder, jar and decompiled-source paths, the result records of the mod checks (`"minecraft": lab.VERSION`), the generators' defaults (`generate_entity_tracking`, `gen_block_state_data`, `gen_flat_tables`) and headers (`ids.rs`'s protocol line from the jar), `vanilla_client.py`'s `--version` and asset index (from the manifest, was `"34"`), `vanilla_login.py`'s protocol (from the jar), `perf_bench.py`'s options.txt data version and `--version`, the packaged `.desktop` comment. Prose (docstrings, scope strings describing what a harness checked) is unchanged. ## Why `version_port.py regen` builds a candidate worktree pinned to the new version and runs the generators and every harness there; with the version in one place (the lock), they run unchanged against it. ## How tested - Regenerating `ids.rs`, `lan/tracking.rs` and `datafix/block_state_data.txt` with the new defaults reproduces the committed files byte for byte (after rustfmt). - Every changed tool compiles (`py_compile`); the mechanical replacements were made by pattern, and the leftovers checked by hand. **pr_ready** (`tools/pr_ready.py --quick --base feat/version-consts` on ludovics-mac-mini, against feat/version-consts at 9e0d4c67f, 39 s) | Check | Result | | --- | --- | | Scope | ✅ 67 files, +246 −102 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 236 run, FAILED (errors=2) (24 s) | | rustfmt | ➖ no Rust change | | clippy | ➖ no Rust change | | tests | ➖ no crate touched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 301 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 289 more | | Label | `skip-release` | The 2 Python test errors fail the same way on plain origin/main on macOS (`/private/var` tmp paths, no `java` stub on PATH). Parity: all harnesses are affected; they run once on the integration commit of this PR and #356. Draft until that run is in. Rebased on main (457a5d7c): `tools/lan_e2e.py`, added on main since, now reads the pinned version through `lab` too. CI's earlier `parity` failure was `world_spawn` alone hitting the 1500 s `--timeout` (305 passed), as on #356. ## Integration audit (Mac mini) One integration commit for the stack, as the rules ask: - **#356 + #357 merged on `main` (68cbad54):** `tools/parity.py --all`, **306 of 306 harnesses pass**. `mob_ai` passes too, so #290's drowned cases didn't show here. The run was resumed after interruptions, reusing passes. No harness failed at any point. - **Stack tip (adds #359's command-tree split, the datafix scope fix, and the Python-only #388–#390):** every horizon-client probe depends on `vanilla.rs`, so `--changed` lists 290 harnesses. I reran the ones the changes reach: `command_exec`, `command_parse`, `lan`, `datafix` (6 shards), `options`, `world`. **11 of 11 runs pass.** The "PARITY_RUST_SCOPE not applied" note is gone from datafix. - The 26.3 candidate (#359's regen output) passed the 17 port harnesses in #388's forward replay. ## Needs Ludovic Nothing. 🤖 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 15:56:51 +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#2517
No description provided.