[PR #7346] [MERGED] Port map: rest-013's language key, registry load and chunk failure reports are ports #7538

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

📋 Pull Request Information

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

Base: main ← Head: chore/vol-e-rest-013


📝 Commits (3)

  • f98f97d Port map: rest-013's language-key and registry-load rows are ports
  • 3577b3a Port map: the chunk failure reports are in chunk_io, and two notes are answered
  • da13f6f Port map: the forced feature packs are enabled_ids

📊 Changes

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

View changed files

📝 tools/port_map/rest-013.tsv (+9 -9)

📄 Description

Rows of tools/port_map/rest-013.tsv (142 rows, map-check clean against 26.3). Two rows said a method needs no port although the code ports it, one row was filed missing with an unsure: note for a function that names it in its own doc, and one where cell pointed at the wrong function. Two unsure: notes are now answered.

Verdicts

row was now where
Identifier.toLanguageKey skip:other inline crates/horizon-client/src/title/buffet.rs::display_name
ResourceManagerRegistryLoadTask.load skip:data inline crates/horizon-client/src/lan/data.rs::file_order
MinecraftServer.reportChunkLoadFailure missing port crates/horizon-client/src/chunk_io.rs::report_load_failure
MinecraftServer.reportChunkSaveFailure port (save.rs::Persistent::save_finished) port crates/horizon-client/src/chunk_io.rs::report_save_failure
  • Identifier.toLanguageKey is namespace + "." + path (26.3's Identifier, and the two overloads add a prefix and a suffix). Horizon has no helper for the bare form; display_name spells it out as biome.<namespace>.<path>, and it also turns / into ..
  • ResourceManagerRegistryLoadTask.load lists the registry's files, reads each with the element codec and registers them sorted by key before loading tags. lan/data.rs does the same for the registries the configuration phase syncs: walk reads the prepared folder's *.json, pack_entries puts a world's pack files over them, file_order (data.rs:136) registers them in the file order listMatchingResources keys them by, and the tags follow in load_tags.
  • MinecraftServer.reportChunkLoadFailure logs Failed to load chunk {},{}, records the exception, stores a chunk IO crash report and warns on low disk space. chunk_io.rs::report_load_failure (chunk_io.rs:58) logs the same line, calls warn_on_low_disk_space, and records the failed chunk for the toast. The row said no chunk-load failure log could be found; it is the fn whose doc names reportChunkLoadFailure.
  • reportChunkSaveFailure pointed at save.rs::Persistent::save_finished, which is the local save path's own "failed to save chunk" warning. The fn that ports the server method is chunk_io.rs::report_save_failure (chunk_io.rs:65): log, low-disk warning and the pending record.

Notes answered

  • Identifier.resolveAgainst stays missing, without the unsure:. Vanilla's method resolves namespace/path under a root, normalises, and throws when the result leaves the root. Nothing here does that: the resource readers join the two straight onto their folder (horizon-client-render/src/audio.rs:406 is root.join("assets").join(namespace).join(&path)), and from_parts accepts a .. namespace, so a pack's file name is what keeps a read inside the folder.
  • PlayerAdvancements.setSelectedTab stays missing, without the unsure:. Its only effect besides the field is player.connection.send(new ClientboundSelectAdvancementsTabPacket(...)) when the tab changes; the host keeps no selected tab, and only the SELECT_ADVANCEMENTS_TAB id exists.

Map-check:

PORT_LEDGER_OUT=/tmp/led-volE python3 tools/port_ledger.py map-check tools/port_map/rest-013.tsv
142 rows, no problems.

Proven: the vanilla side, read from the 26.3 classes (Identifier.toLanguageKey, ResourceManagerRegistryLoadTask.load, MinecraftServer.reportChunkLoadFailure/reportChunkSaveFailure, Identifier.resolveAgainst, PlayerAdvancements.setSelectedTab), and the Horizon side at the cites: display_name's key build, walk/pack_entries/file_order and the tag load after them, the two chunk_io functions with their log lines and the low-disk call, and audio.rs:406's unguarded join. Every where cell resolves under map-check.

Not proven: that file_order reproduces vanilla's registration order for every registry — it sorts on <path>.json then namespace, which is the order listMatchingResources keys files by, but I did not diff the resulting entry order against a server's. I also did not test a pack that names a .. namespace or path through a real load.


🔄 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/7346 **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/vol-e-rest-013` --- ### 📝 Commits (3) - [`f98f97d`](https://github.com/horizon-rust/horizon/commit/f98f97dc2de4a1df0717f9410a77c03e12b60c53) Port map: rest-013's language-key and registry-load rows are ports - [`3577b3a`](https://github.com/horizon-rust/horizon/commit/3577b3a24d95588d41bfa44a56e8d52a3427b211) Port map: the chunk failure reports are in chunk_io, and two notes are answered - [`da13f6f`](https://github.com/horizon-rust/horizon/commit/da13f6f60618987c99e93ab6f2b3f4257f4bef19) Port map: the forced feature packs are enabled_ids ### 📊 Changes **1 file changed** (+9 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `tools/port_map/rest-013.tsv` (+9 -9) </details> ### 📄 Description Rows of `tools/port_map/rest-013.tsv` (142 rows, map-check clean against 26.3). Two rows said a method needs no port although the code ports it, one row was filed `missing` with an `unsure:` note for a function that names it in its own doc, and one `where` cell pointed at the wrong function. Two `unsure:` notes are now answered. **Verdicts** | row | was | now | where | | --- | --- | --- | --- | | `Identifier.toLanguageKey` | skip:other | inline | `crates/horizon-client/src/title/buffet.rs::display_name` | | `ResourceManagerRegistryLoadTask.load` | skip:data | inline | `crates/horizon-client/src/lan/data.rs::file_order` | | `MinecraftServer.reportChunkLoadFailure` | missing | port | `crates/horizon-client/src/chunk_io.rs::report_load_failure` | | `MinecraftServer.reportChunkSaveFailure` | port (`save.rs::Persistent::save_finished`) | port | `crates/horizon-client/src/chunk_io.rs::report_save_failure` | - `Identifier.toLanguageKey` is `namespace + "." + path` (26.3's `Identifier`, and the two overloads add a prefix and a suffix). Horizon has no helper for the bare form; `display_name` spells it out as `biome.<namespace>.<path>`, and it also turns `/` into `.`. - `ResourceManagerRegistryLoadTask.load` lists the registry's files, reads each with the element codec and registers them sorted by key before loading tags. `lan/data.rs` does the same for the registries the configuration phase syncs: `walk` reads the prepared folder's `*.json`, `pack_entries` puts a world's pack files over them, `file_order` (data.rs:136) registers them in the file order `listMatchingResources` keys them by, and the tags follow in `load_tags`. - `MinecraftServer.reportChunkLoadFailure` logs `Failed to load chunk {},{}`, records the exception, stores a chunk IO crash report and warns on low disk space. `chunk_io.rs::report_load_failure` (chunk_io.rs:58) logs the same line, calls `warn_on_low_disk_space`, and records the failed chunk for the toast. The row said no chunk-load failure log could be found; it is the fn whose doc names `reportChunkLoadFailure`. - `reportChunkSaveFailure` pointed at `save.rs::Persistent::save_finished`, which is the local save path's own "failed to save chunk" warning. The fn that ports the server method is `chunk_io.rs::report_save_failure` (chunk_io.rs:65): log, low-disk warning and the pending record. **Notes answered** - `Identifier.resolveAgainst` stays `missing`, without the `unsure:`. Vanilla's method resolves `namespace`/`path` under a root, normalises, and throws when the result leaves the root. Nothing here does that: the resource readers join the two straight onto their folder (`horizon-client-render/src/audio.rs:406` is `root.join("assets").join(namespace).join(&path)`), and `from_parts` accepts a `..` namespace, so a pack's file name is what keeps a read inside the folder. - `PlayerAdvancements.setSelectedTab` stays `missing`, without the `unsure:`. Its only effect besides the field is `player.connection.send(new ClientboundSelectAdvancementsTabPacket(...))` when the tab changes; the host keeps no selected tab, and only the `SELECT_ADVANCEMENTS_TAB` id exists. Map-check: ``` PORT_LEDGER_OUT=/tmp/led-volE python3 tools/port_ledger.py map-check tools/port_map/rest-013.tsv 142 rows, no problems. ``` **Proven:** the vanilla side, read from the 26.3 classes (`Identifier.toLanguageKey`, `ResourceManagerRegistryLoadTask.load`, `MinecraftServer.reportChunkLoadFailure`/`reportChunkSaveFailure`, `Identifier.resolveAgainst`, `PlayerAdvancements.setSelectedTab`), and the Horizon side at the cites: `display_name`'s key build, `walk`/`pack_entries`/`file_order` and the tag load after them, the two `chunk_io` functions with their log lines and the low-disk call, and `audio.rs:406`'s unguarded join. Every `where` cell resolves under map-check. **Not proven:** that `file_order` reproduces vanilla's registration order for every registry — it sorts on `<path>.json` then namespace, which is the order `listMatchingResources` keys files by, but I did not diff the resulting entry order against a server's. I also did not test a pack that names a `..` namespace or path through a real load. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 07:19:20 +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#7538
No description provided.