[PR #7002] [MERGED] Clear stale rest-019.tsv rows main already implements #7262

Closed
opened 2026-11-03 06:36:40 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7002
Author: @MSedgeMC
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: chore/ledger-rest-019-rows


📝 Commits (1)

  • b46c36f rest-019: two pack rows main already ports, and a citation cut to the fn

📊 Changes

1 file changed (+7 additions, -7 deletions)

View changed files

📝 tools/port_map/rest-019.tsv (+7 -7)

📄 Description

Two rows of tools/port_map/rest-019.tsv said missing for behaviour upstream/main has. Three more citations in the file named fns the resource-reload refactor replaced, so map-check could not resolve them; those verdicts are unchanged and only the fn they name is.

  • PackFormat.IntermediaryFormat.validatePackFormatForRange — "vanilla refuses a pack_format outside its min to max range, or a multi-version pack below format 15; Horizon does not check". It does: crates/horizon-client-render/src/packs.rs::validate_pack_format_for_range (doc line 209 names the method) refuses a main format outside the declared range, and a main format below 15. validate_new_format and validate_old_format both call it with the pack's declared range.
  • PackRepository.isAbleToClearAnyPack — "when a pack fails at runtime vanilla clears the selected packs with a toast; Horizon keeps them and shows the error in Options". crates/horizon-client-render/src/packs.rs::able_to_clear_any_pack is the same test, and crates/horizon-client/src/game/packs.rs::selection_reload_failed runs vanilla's rollbackResourcePacks path on it: clear the selection, save, reload again, SystemToast.addOrUpdate with resourcePack.load_fail, and only the Options > Packs error when no pack is left to drop.
  • PackFormat.lastPreMinorVersion — verdict unchanged (inline), citation cut from crates/horizon-client-render/src/packs.rs to crates/horizon-client-render/src/packs.rs::last_pre_minor, the fn whose doc names the method.
  • ReloadableResourceManager.createReload and SimplePreparableReloadListener.reload, SimpleReloadInstance.prepareTasks — cited Game::stage_selected_packs, which is now Game::spawn_pack_reload (starts the worker) plus stage_pack (the staging half). SimpleReloadInstance.of cited Game::reload_selected_packs, now PackReload::spawn with drive_pack_reload applying.

Proven:

  • python3 tools/port_ledger.py map-check tools/port_map/rest-019.tsv over the tree with this patch, against the ledger built with python3 tools/port_ledger.py build --jar /data/home/horizon/.local/minecraft/26.3/jars/server.jar → 118 rows, no problems.
  • grep -n 'fn validate_pack_format_for_range' -B3 crates/horizon-client-render/src/packs.rs → 209: /// \PackFormat.IntermediaryFormat.validatePackFormatForRange`.over210: fn validate_pack_format_for_range(main_format: i64, min: i64, max: i64), whose two errors are the ones javap -p -c -constantsshows onnet.minecraft.server.packs.metadata.pack.PackFormat$IntermediaryFormat.validatePackFormatForRange: format < min || format > max→ "Pack declared support for versions … but declared main format is …",format < 15` → "Multi-version packs cannot support minimum version of less than 15, since this will leave versions in range unable to load pack.", else null.
  • grep -n 'able_to_clear_any_pack' crates/horizon-client-render/src/packs.rs crates/horizon-client/src/game/packs.rs → packs.rs:928 (!enabled(all, selected).is_empty(), doc: clearing the selection keeps only the required vanilla pack) and game/packs.rs:209 inside selection_reload_failed (clear, save, spawn_pack_reload, resourcePack.load_fail toast, else the Options error).
  • javap -p -c -constants on PackRepository.isAbleToClearAnyPack → !rebuildSelected(List.of()).equals(selected), the same "some selected pack still exists" test.
  • grep -n 'fn last_pre_minor' -B2 crates/horizon-client-render/src/packs.rs → 162: /// for the resource pack format (64) or the data pack one (81). over 163: fn last_pre_minor, and javap on PackFormat.lastPreMinorVersion is the same 64/81 switch (MatchException on any other pack type).
  • grep -n 'fn spawn_pack_reload\|fn stage_pack\|fn spawn(' crates/horizon-client/src/game/packs.rs → 239: pub(super) fn spawn_pack_reload, 440: pub(super) fn stage_pack, 542: fn spawn( on PackReload ("a pack reload whose CPU half runs on a worker … Game::drive_pack_reload applies it"); git log -S 'fn stage_selected_packs' → 5aa2da496, which replaced it with spawn_pack_reload and moved the staging body out to stage_pack.

Not proven:

  • I did not run the game: neither a rejected pack.mcmeta nor a mid-game pack failure was reproduced on screen.
  • The twelve OldUsersConverter rows were checked by search only — no .txt userlist reader, no .converted rename and no name-to-uuid owner conversion anywhere under crates/, and the class is named nowhere — so they stay missing, as do PackFormat.IntermediaryFormat.effectiveMinMajorVersion (only the overlay validateHolderList path uses it, which packs.rs::overlay_applies does without) and PackRepository.getRequestedFeatureFlags (the union over the repository's selected packs has no fn; world_loading.rs unions the picked feature packs into a new world's enabled_features, which is the world data's figure).
  • I read no row outside the ones above against the tree, so the rest of the file's verdicts are unchanged and unchecked here beyond what map-check resolves.

🔄 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/7002 **Author:** [@MSedgeMC](https://github.com/MSedgeMC) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `chore/ledger-rest-019-rows` --- ### 📝 Commits (1) - [`b46c36f`](https://github.com/horizon-rust/horizon/commit/b46c36f11a94c6104f24a2bc603d9badb9175da0) rest-019: two pack rows main already ports, and a citation cut to the fn ### 📊 Changes **1 file changed** (+7 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `tools/port_map/rest-019.tsv` (+7 -7) </details> ### 📄 Description Two rows of `tools/port_map/rest-019.tsv` said `missing` for behaviour `upstream/main` has. Three more citations in the file named fns the resource-reload refactor replaced, so `map-check` could not resolve them; those verdicts are unchanged and only the fn they name is. - `PackFormat.IntermediaryFormat.validatePackFormatForRange` — "vanilla refuses a pack_format outside its min to max range, or a multi-version pack below format 15; Horizon does not check". It does: `crates/horizon-client-render/src/packs.rs::validate_pack_format_for_range` (doc line 209 names the method) refuses a main format outside the declared range, and a main format below 15. `validate_new_format` and `validate_old_format` both call it with the pack's declared range. - `PackRepository.isAbleToClearAnyPack` — "when a pack fails at runtime vanilla clears the selected packs with a toast; Horizon keeps them and shows the error in Options". `crates/horizon-client-render/src/packs.rs::able_to_clear_any_pack` is the same test, and `crates/horizon-client/src/game/packs.rs::selection_reload_failed` runs vanilla's `rollbackResourcePacks` path on it: clear the selection, save, reload again, `SystemToast.addOrUpdate` with `resourcePack.load_fail`, and only the Options > Packs error when no pack is left to drop. - `PackFormat.lastPreMinorVersion` — verdict unchanged (`inline`), citation cut from `crates/horizon-client-render/src/packs.rs` to `crates/horizon-client-render/src/packs.rs::last_pre_minor`, the fn whose doc names the method. - `ReloadableResourceManager.createReload` and `SimplePreparableReloadListener.reload`, `SimpleReloadInstance.prepareTasks` — cited `Game::stage_selected_packs`, which is now `Game::spawn_pack_reload` (starts the worker) plus `stage_pack` (the staging half). `SimpleReloadInstance.of` cited `Game::reload_selected_packs`, now `PackReload::spawn` with `drive_pack_reload` applying. **Proven:** - `python3 tools/port_ledger.py map-check tools/port_map/rest-019.tsv` over the tree with this patch, against the ledger built with `python3 tools/port_ledger.py build --jar /data/home/horizon/.local/minecraft/26.3/jars/server.jar` → `118 rows, no problems.` - `grep -n 'fn validate_pack_format_for_range' -B3 crates/horizon-client-render/src/packs.rs` → `209: /// \`PackFormat.IntermediaryFormat.validatePackFormatForRange\`.` over `210: fn validate_pack_format_for_range(main_format: i64, min: i64, max: i64)`, whose two errors are the ones `javap -p -c -constants` shows on `net.minecraft.server.packs.metadata.pack.PackFormat$IntermediaryFormat.validatePackFormatForRange`: `format < min || format > max` → "Pack declared support for versions … but declared main format is …", `format < 15` → "Multi-version packs cannot support minimum version of less than 15, since this will leave versions in range unable to load pack.", else null. - `grep -n 'able_to_clear_any_pack' crates/horizon-client-render/src/packs.rs crates/horizon-client/src/game/packs.rs` → `packs.rs:928` (`!enabled(all, selected).is_empty()`, doc: clearing the selection keeps only the required vanilla pack) and `game/packs.rs:209` inside `selection_reload_failed` (clear, save, `spawn_pack_reload`, `resourcePack.load_fail` toast, else the Options error). - `javap -p -c -constants` on `PackRepository.isAbleToClearAnyPack` → `!rebuildSelected(List.of()).equals(selected)`, the same "some selected pack still exists" test. - `grep -n 'fn last_pre_minor' -B2 crates/horizon-client-render/src/packs.rs` → `162: /// for the resource pack format (64) or the data pack one (81).` over `163: fn last_pre_minor`, and `javap` on `PackFormat.lastPreMinorVersion` is the same 64/81 switch (MatchException on any other pack type). - `grep -n 'fn spawn_pack_reload\|fn stage_pack\|fn spawn(' crates/horizon-client/src/game/packs.rs` → `239: pub(super) fn spawn_pack_reload`, `440: pub(super) fn stage_pack`, `542: fn spawn(` on `PackReload` ("a pack reload whose CPU half runs on a worker … `Game::drive_pack_reload` applies it"); `git log -S 'fn stage_selected_packs'` → `5aa2da496`, which replaced it with `spawn_pack_reload` and moved the staging body out to `stage_pack`. **Not proven:** - I did not run the game: neither a rejected `pack.mcmeta` nor a mid-game pack failure was reproduced on screen. - The twelve `OldUsersConverter` rows were checked by search only — no `.txt` userlist reader, no `.converted` rename and no name-to-uuid owner conversion anywhere under `crates/`, and the class is named nowhere — so they stay `missing`, as do `PackFormat.IntermediaryFormat.effectiveMinMajorVersion` (only the overlay `validateHolderList` path uses it, which `packs.rs::overlay_applies` does without) and `PackRepository.getRequestedFeatureFlags` (the union over the repository's selected packs has no fn; `world_loading.rs` unions the picked feature packs into a new world's `enabled_features`, which is the world data's figure). - I read no row outside the ones above against the tree, so the rest of the file's verdicts are unchanged and unchecked here beyond what `map-check` resolves. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:36:40 +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#7262
No description provided.