[PR #7320] [MERGED] port map: rest-021's path check and right-to-left mirror are ported #7490

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

📋 Pull Request Information

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

Base: main ← Head: chore/vol-c-rest-021


📝 Commits (2)

  • d7cb03a port_map: the path check and the right-to-left mirror are ported
  • d1a1161 port_map: rest-021's notes name the code that decides them

📊 Changes

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

View changed files

📝 tools/port_map/rest-021.tsv (+17 -17)

📄 Description

Rows of tools/port_map/rest-021.tsv (135 rows, map-check clean against 26.3): the util odds and ends — Ease, EasingType, FileUtil, Crypt, CubicSpline, DependencySorter, ByIdMap.

Verdicts

row was now where
FileUtil.isPathPortable skip:other port crates/horizon-client/src/game/structure_blocks.rs::portable_path
FormattedCharSequence.decorateOutput missing inline crates/horizon-client-render/src/bidi.rs::reorder

Both were filed as absent. The tree has them:

  • portable_path (structure_blocks.rs:50) is the check of a path under structures/ — no empty, . or .. segment — and its doc names FileUtil.isPathPortable. Vanilla also tests each part's characters (isPathPartPortable); this does not, which the note now says.
  • bidi.rs is the right-to-left pipeline (FormattedBidiReorder.reorder): reorder shapes the letters, reorders them by the Unicode bidirectional algorithm and mirrors the code points of a right-to-left run. That mirror is what decorateOutput wraps a sink in. The one difference, in the note: vanilla's sink mirrors every code point when the default language reads right to left, Horizon's mirrors the code points of an RTL run.

Notes repaired

  • The eleven Ease rows (inBack, inElastic, inExpo, inOutBounce, inOutCirc, inOutQuad, inOutQuart, inOutQuint, outBounce, outElastic, outExpo) said only that named easings come through the registry. They now name both ends: environment.rs::Environment::load_dimension reads a track's ease as constant or cubic_bezier and treats anything else as linear, and none of the four shipped timelines (day.json, early_game.json, moon.json, villager_schedule.json) names an easing — they use constant, cubic_bezier or no ease at all (day.json's moon_angle, star_angle and sun_angle are the cubic ones).
  • FormattedCharSequence.backward was skipped for having "no caller in the 26.3 source"; it does have one, SubStringSource.substring, which is skip:ui in rest-011.tsv (the HUD draws each span with its own style instead of slicing a run).
  • EasingType.CubicBezierControls.validate now names what takes the values unchecked: environment.rs::Environment::load_dimension reads the four control points as given, where vanilla refuses one outside [0;1] when a timeline loads.
  • Crypt.rsaPublicKeyToString and Crypt.pemRsaPrivateKeyToString now say what reaches them: they are the writer halves of the codec Crypt's static initialiser builds, and that initialiser is their only caller. Horizon reads a PEM key pair (auth.rs::pem_der, parse_certificates) and writes none back, so the gap is real but unreached.

Checked and left alone, so the next reader does not redo them: ByIdMap.continuous (skip:java — the per-enum by_id tables match their own ids), DirectoryLock.create (the two-byte snowman in save.rs::SessionLock::acquire), BlockUtil.packDifferenceInPositionInternal (the fixed radius of 8, with the dragon egg's (16, 8, 16) packed inline in level/interact.rs::Sim::dragon_egg_teleport), and FileUtil.sanitizeName (vanilla replaces only SharedConstants.ILLEGAL_FILE_CHARACTERS, which the . / " in the class's constant pool bear out).

Map-check:

PORT_LEDGER_OUT=... python3 tools/port_ledger.py map-check tools/port_map/rest-021.tsv
135 rows, no problems.

Proven: both verdicts, read at the cite — portable_path's three refused segments, reorder's mirror on an RTL level — and every note, from load_dimension's ease match and its four as_f64 control points, from the four timeline files in the client jar, and from the ledger's caller lists for the two Crypt writers and SubStringSource.substring. Every where cell resolves under map-check.

Not proven: that a datapack timeline naming an easing other than constant or cubic_bezier is a case worth porting (I left those rows missing, not skip:data); and the mirror's per-code-point difference is read, not run — I did not exercise RTL text through bidi.rs.


🔄 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/7320 **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-c-rest-021` --- ### 📝 Commits (2) - [`d7cb03a`](https://github.com/horizon-rust/horizon/commit/d7cb03a1a7e1f2f95c730821e33cb49bfae533ef) port_map: the path check and the right-to-left mirror are ported - [`d1a1161`](https://github.com/horizon-rust/horizon/commit/d1a116192b9eda74bb316c20ddc1915444602533) port_map: rest-021's notes name the code that decides them ### 📊 Changes **1 file changed** (+17 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `tools/port_map/rest-021.tsv` (+17 -17) </details> ### 📄 Description Rows of `tools/port_map/rest-021.tsv` (135 rows, map-check clean against 26.3): the `util` odds and ends — `Ease`, `EasingType`, `FileUtil`, `Crypt`, `CubicSpline`, `DependencySorter`, `ByIdMap`. **Verdicts** | row | was | now | where | | --- | --- | --- | --- | | `FileUtil.isPathPortable` | skip:other | port | `crates/horizon-client/src/game/structure_blocks.rs::portable_path` | | `FormattedCharSequence.decorateOutput` | missing | inline | `crates/horizon-client-render/src/bidi.rs::reorder` | Both were filed as absent. The tree has them: - `portable_path` (`structure_blocks.rs:50`) is the check of a path under `structures/` — no empty, `.` or `..` segment — and its doc names `FileUtil.isPathPortable`. Vanilla also tests each part's characters (`isPathPartPortable`); this does not, which the note now says. - `bidi.rs` is the right-to-left pipeline (`FormattedBidiReorder.reorder`): `reorder` shapes the letters, reorders them by the Unicode bidirectional algorithm and mirrors the code points of a right-to-left run. That mirror is what `decorateOutput` wraps a sink in. The one difference, in the note: vanilla's sink mirrors every code point when the default language reads right to left, Horizon's mirrors the code points of an RTL run. **Notes repaired** - The eleven `Ease` rows (`inBack`, `inElastic`, `inExpo`, `inOutBounce`, `inOutCirc`, `inOutQuad`, `inOutQuart`, `inOutQuint`, `outBounce`, `outElastic`, `outExpo`) said only that named easings come through the registry. They now name both ends: `environment.rs::Environment::load_dimension` reads a track's `ease` as `constant` or `cubic_bezier` and treats anything else as linear, and none of the four shipped timelines (`day.json`, `early_game.json`, `moon.json`, `villager_schedule.json`) names an easing — they use `constant`, `cubic_bezier` or no ease at all (`day.json`'s `moon_angle`, `star_angle` and `sun_angle` are the cubic ones). - `FormattedCharSequence.backward` was skipped for having "no caller in the 26.3 source"; it does have one, `SubStringSource.substring`, which is skip:ui in `rest-011.tsv` (the HUD draws each span with its own style instead of slicing a run). - `EasingType.CubicBezierControls.validate` now names what takes the values unchecked: `environment.rs::Environment::load_dimension` reads the four control points as given, where vanilla refuses one outside `[0;1]` when a timeline loads. - `Crypt.rsaPublicKeyToString` and `Crypt.pemRsaPrivateKeyToString` now say what reaches them: they are the writer halves of the codec `Crypt`'s static initialiser builds, and that initialiser is their only caller. Horizon reads a PEM key pair (`auth.rs::pem_der`, `parse_certificates`) and writes none back, so the gap is real but unreached. Checked and left alone, so the next reader does not redo them: `ByIdMap.continuous` (`skip:java` — the per-enum `by_id` tables match their own ids), `DirectoryLock.create` (the two-byte snowman in `save.rs::SessionLock::acquire`), `BlockUtil.packDifferenceInPositionInternal` (the fixed radius of 8, with the dragon egg's `(16, 8, 16)` packed inline in `level/interact.rs::Sim::dragon_egg_teleport`), and `FileUtil.sanitizeName` (vanilla replaces only `SharedConstants.ILLEGAL_FILE_CHARACTERS`, which the `.` `/` `"` in the class's constant pool bear out). Map-check: ``` PORT_LEDGER_OUT=... python3 tools/port_ledger.py map-check tools/port_map/rest-021.tsv 135 rows, no problems. ``` **Proven:** both verdicts, read at the cite — `portable_path`'s three refused segments, `reorder`'s `mirror` on an RTL level — and every note, from `load_dimension`'s `ease` match and its four `as_f64` control points, from the four timeline files in the client jar, and from the ledger's caller lists for the two `Crypt` writers and `SubStringSource.substring`. Every `where` cell resolves under map-check. **Not proven:** that a datapack timeline naming an easing other than constant or cubic_bezier is a case worth porting (I left those rows `missing`, not `skip:data`); and the mirror's per-code-point difference is read, not run — I did not exercise RTL text through `bidi.rs`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:40:06 +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#7490
No description provided.