[PR #5266] [MERGED] fix(port-pack): read legacy Forge mcmod.info identity #6175

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5266
Author: @finalpantasy
Created: 10/31/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @ludovic111

Base: main ← Head: fix/legacy-forge-metadata


📝 Commits (4)

  • 60e8658 fix(port-pack): read legacy Forge mcmod.info identity
  • 681124a Merge main into #5266 (main builds again after #5251)
  • 2518193 Merge main into #5266 (main's launcher i18n strings are in now)
  • 86f3920 Merge main into #5266 (main's launcher strings are complete again after #5397)

📊 Changes

1 file changed (+263 additions, -2 deletions)

View changed files

📝 crates/horizon-port-pack/src/jar.rs (+263 -2)

📄 Description

🤖 Opened by finalpantasy's AI agent (Codex, GPT-6), not by finalpantasy personally.

What and why

Legacy Forge JARs with mcmod.info currently appear in pack inventory under their artifact filename, with empty name and version. Read the first declared mod's ID, name and version from either a root array or an object containing modList.

Preserve NeoForge TOML → Forge TOML → Fabric JSON precedence, existing filename/manifest fallback, and malformed-JSON errors. Legacy license and dependency fields remain uninterpreted. This improves metadata inventory for older Forge packs; it does not execute or port Java mods.

Fixes #5240.

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Vanilla reference

None; pack metadata tooling.

Other projects' code

None. The implementation follows Horizon's existing metadata reader and uses synthetic metadata-only ZIP fixtures; no mod implementation or game assets are included.

Self-check

The full self-check exited 1. Its output follows with the local host name omitted:

pr_ready (tools/pr_ready.py --base upstream/main on Windows (host name omitted), against upstream/main at b0bede7fc, 1 min 20 s)

Check Result
Scope ✅ 1 files, +263 −2
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 498 run, FAILED (errors=122, skipped=11) (50 s)
rustfmt ✅ (10 s)
Rust ⚠️ 1.96.0 is older than CI's stable (1.99): clippy may flag lints CI doesn't, update with rustup update
clippy ❌ failed; likely the old Rust above (2 s)
tests: horizon-port-pack ❌ 101 passed, 1 failed (12 s)
doc tests ✅ 0 passed (1 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ✅ (1 s)
launcher clippy ❌ failed; likely the old Rust above
launcher tests ❌ failed
Parity ➖ not run (no vanilla data here): 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 Clippy failures were dependency-fetch errors (getaddrinfo() thread failed to start), not emitted Rust lint diagnostics; the script's toolchain suggestion does not establish their cause. Python errors were temporary-directory permission failures. A subsequent final-source package run with a private temporary directory passed all 102 library tests, plus binary/doc targets (zero tests); this includes the earlier failed test. Its original temporary failure report was unavailable, so the precise cause of that earlier assertion remains unproven. Workspace/launcher checks and parity have not passed locally.

Follow-up Python validation outside the Windows sandbox with a private temporary directory passed: 498 tests run, 12 skipped. The intermediate private-temp sandbox run still hit denied localhost sockets, child-process creation and local Git updates; those failures disappeared outside the sandbox. No source edits were needed. This does not turn the original full pr_ready run into a pass.

A later full attempt outside the sandbox reached actual Clippy diagnostics on Rust 1.96: manual_range_contains in unchanged horizon-world/src/worldgen/aquifer/noise_based.rs:466, and nonminimal_bool in unchanged launcher/src/backend.rs:1216–1217. It hit the local 600-second process limit while compiling launcher tests; those tests did not complete. Public-tree, formatting, package tests and doc tests passed in that attempt. Two Python tests failed because this runner placed temporary fixtures inside the checkout: dependency filtering excluded the .local fixture, and Git discovered the enclosing repository. Both exact tests passed when rerun with temporary fixtures outside the checkout. No upstream source was edited to work around these harness or lint results. The full local self-check remains incomplete. The PR was opened as a draft; an upstream maintainer subsequently marked it ready for review.

Six added ZIP-based regression tests cover both layouts, first-entry behavior, modern metadata precedence, malformed JSON, filename fallback, and manifest version substitution. Before the implementation, five of these tests failed and the precedence test passed. With the fix, all nine metadata-reader tests and all 102 package tests passed; package all-targets Clippy with warnings denied passed. The maintainer-updated PR head 681124a485b82a27ac4e769756a2f3a2356e6827 passed a fresh exact-head package run: 102 tests passed, with zero binary/doc tests. Its metadata-reader source is byte-identical to the reviewed merged source that passed package all-targets Clippy with warnings denied and formatting checks. The full local self-check remains incomplete as disclosed above.

🤖 Generated with Codex


🔄 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/5266 **Author:** [@finalpantasy](https://github.com/finalpantasy) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/legacy-forge-metadata` --- ### 📝 Commits (4) - [`60e8658`](https://github.com/horizon-rust/horizon/commit/60e865877d926c260e482893afae32b7b9ddf318) fix(port-pack): read legacy Forge mcmod.info identity - [`681124a`](https://github.com/horizon-rust/horizon/commit/681124a485b82a27ac4e769756a2f3a2356e6827) Merge main into #5266 (main builds again after #5251) - [`2518193`](https://github.com/horizon-rust/horizon/commit/25181930449ece489a59fc1d5aff9cff280c0458) Merge main into #5266 (main's launcher i18n strings are in now) - [`86f3920`](https://github.com/horizon-rust/horizon/commit/86f3920a4bcab78ed253075809480e0a6cb1b03b) Merge main into #5266 (main's launcher strings are complete again after #5397) ### 📊 Changes **1 file changed** (+263 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-port-pack/src/jar.rs` (+263 -2) </details> ### 📄 Description > 🤖 Opened by finalpantasy's AI agent (Codex, GPT-6), not by finalpantasy personally. ## What and why Legacy Forge JARs with `mcmod.info` currently appear in pack inventory under their artifact filename, with empty name and version. Read the first declared mod's ID, name and version from either a root array or an object containing `modList`. Preserve NeoForge TOML → Forge TOML → Fabric JSON precedence, existing filename/manifest fallback, and malformed-JSON errors. Legacy license and dependency fields remain uninterpreted. This improves metadata inventory for older Forge packs; it does not execute or port Java mods. Fixes #5240. ## Kind - [ ] parity: Horizon now does what vanilla 26.3 does - [ ] bug: a crash or a breakage - [ ] perf: faster, or less memory - [ ] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [x] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference None; pack metadata tooling. ## Other projects' code None. The implementation follows Horizon's existing metadata reader and uses synthetic metadata-only ZIP fixtures; no mod implementation or game assets are included. ## Self-check The full self-check exited 1. Its output follows with the local host name omitted: **pr_ready** (`tools/pr_ready.py --base upstream/main` on Windows (host name omitted), against upstream/main at b0bede7fc, 1 min 20 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +263 −2 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 498 run, FAILED (errors=122, skipped=11) (50 s) | | rustfmt | ✅ (10 s) | | Rust | ⚠️ 1.96.0 is older than CI's stable (1.99): clippy may flag lints CI doesn't, update with `rustup update` | | clippy | ❌ failed; likely the old Rust above (2 s) | | tests: horizon-port-pack | ❌ 101 passed, 1 failed (12 s) | | doc tests | ✅ 0 passed (1 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ✅ (1 s) | | launcher clippy | ❌ failed; likely the old Rust above | | launcher tests | ❌ failed | | Parity | ➖ not run (no vanilla data here): 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 Clippy failures were dependency-fetch errors (`getaddrinfo() thread failed to start`), not emitted Rust lint diagnostics; the script's toolchain suggestion does not establish their cause. Python errors were temporary-directory permission failures. A subsequent final-source package run with a private temporary directory passed all 102 library tests, plus binary/doc targets (zero tests); this includes the earlier failed test. Its original temporary failure report was unavailable, so the precise cause of that earlier assertion remains unproven. Workspace/launcher checks and parity have not passed locally. Follow-up Python validation outside the Windows sandbox with a private temporary directory passed: 498 tests run, 12 skipped. The intermediate private-temp sandbox run still hit denied localhost sockets, child-process creation and local Git updates; those failures disappeared outside the sandbox. No source edits were needed. This does not turn the original full `pr_ready` run into a pass. A later full attempt outside the sandbox reached actual Clippy diagnostics on Rust 1.96: `manual_range_contains` in unchanged `horizon-world/src/worldgen/aquifer/noise_based.rs:466`, and `nonminimal_bool` in unchanged `launcher/src/backend.rs:1216–1217`. It hit the local 600-second process limit while compiling launcher tests; those tests did not complete. Public-tree, formatting, package tests and doc tests passed in that attempt. Two Python tests failed because this runner placed temporary fixtures inside the checkout: dependency filtering excluded the `.local` fixture, and Git discovered the enclosing repository. Both exact tests passed when rerun with temporary fixtures outside the checkout. No upstream source was edited to work around these harness or lint results. The full local self-check remains incomplete. The PR was opened as a draft; an upstream maintainer subsequently marked it ready for review. Six added ZIP-based regression tests cover both layouts, first-entry behavior, modern metadata precedence, malformed JSON, filename fallback, and manifest version substitution. Before the implementation, five of these tests failed and the precedence test passed. With the fix, all nine metadata-reader tests and all 102 package tests passed; package all-targets Clippy with warnings denied passed. The maintainer-updated PR head `681124a485b82a27ac4e769756a2f3a2356e6827` passed a fresh exact-head package run: 102 tests passed, with zero binary/doc tests. Its metadata-reader source is byte-identical to the reviewed merged source that passed package all-targets Clippy with warnings denied and formatting checks. The full local self-check remains incomplete as disclosed above. 🤖 Generated with [Codex](https://openai.com/codex) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:15:32 +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#6175
No description provided.