[GH-ISSUE #5240] Pack inventory ignores legacy Forge mcmod.info identity #1606

Closed
opened 2026-11-02 15:48:20 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @finalpantasy on GitHub (Oct 31, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5240

Originally assigned to: @finalpantasy on GitHub.

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

horizon-port-pack::jar::read ignores legacy Forge mcmod.info. For a metadata-only JAR with a valid declared mod ID, name and version, it silently falls back to the artifact filename as the mod ID and leaves name/version empty. This makes inventory identity unreliable for older Forge packs, including 1.7.10 packs.

Reproduced against crates/horizon-port-pack/src/jar.rs Git blob 86e936e447fc79b0314dc7b213a3a1db942aaa0f, matching current main when checked. The probe compiled that unchanged module and invoked jar::read directly on three wholly synthetic JARs; no game files or mod implementation were used.

Two failing metadata forms:

[{"modid":"synthetic_legacy","name":"Synthetic Legacy","version":"1.2.3"}]
{"modListVersion":2,"modList":[{"modid":"synthetic_legacy","name":"Synthetic Legacy","version":"1.2.3"}]}

For legacy-array-artifact-9.9.jar, actual identity is mod_id="legacy-array-artifact-9.9", name="", version=""; the object-form fixture has the equivalent filename fallback. Expected identity is synthetic_legacy, Synthetic Legacy, 1.2.3. A third JAR containing fabric.mod.json correctly returns its declared identity using the same compiled reader.

The reader currently checks NeoForge/Forge TOML and Fabric JSON, then defaults; it never checks mcmod.info. I plan a narrow fix for these legacy metadata forms with synthetic JAR regression tests, preserving existing metadata precedence and leaving unknown licenses unknown. This does not claim Java execution, complete legacy dependency discovery, or a working port of any pack.

Duplicate search found no matching issue or PR for mcmod.info/legacy Forge metadata.

🤖 Generated with Codex

Originally created by @finalpantasy on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5240 Originally assigned to: @finalpantasy on GitHub. > 🤖 Filed by finalpantasy's AI agent (Codex, GPT-6), not by finalpantasy personally. `horizon-port-pack::jar::read` ignores legacy Forge `mcmod.info`. For a metadata-only JAR with a valid declared mod ID, name and version, it silently falls back to the artifact filename as the mod ID and leaves name/version empty. This makes inventory identity unreliable for older Forge packs, including 1.7.10 packs. Reproduced against `crates/horizon-port-pack/src/jar.rs` Git blob `86e936e447fc79b0314dc7b213a3a1db942aaa0f`, matching current main when checked. The probe compiled that unchanged module and invoked `jar::read` directly on three wholly synthetic JARs; no game files or mod implementation were used. Two failing metadata forms: ```json [{"modid":"synthetic_legacy","name":"Synthetic Legacy","version":"1.2.3"}] ``` ```json {"modListVersion":2,"modList":[{"modid":"synthetic_legacy","name":"Synthetic Legacy","version":"1.2.3"}]} ``` For `legacy-array-artifact-9.9.jar`, actual identity is `mod_id="legacy-array-artifact-9.9", name="", version=""`; the object-form fixture has the equivalent filename fallback. Expected identity is `synthetic_legacy`, `Synthetic Legacy`, `1.2.3`. A third JAR containing `fabric.mod.json` correctly returns its declared identity using the same compiled reader. The reader currently checks NeoForge/Forge TOML and Fabric JSON, then defaults; it never checks `mcmod.info`. I plan a narrow fix for these legacy metadata forms with synthetic JAR regression tests, preserving existing metadata precedence and leaving unknown licenses unknown. This does not claim Java execution, complete legacy dependency discovery, or a working port of any pack. Duplicate search found no matching issue or PR for `mcmod.info`/legacy Forge metadata. 🤖 Generated with [Codex](https://openai.com/codex)
Author
Owner

@finalpantasy commented on GitHub (Oct 31, 2026):

🤖 Agent: /claim

I will add narrowly scoped legacy metadata parsing and synthetic JAR regression tests, preserving existing format precedence and unknown-license handling.

<!-- gh-comment-id:6545880249 --> @finalpantasy commented on GitHub (Oct 31, 2026): 🤖 Agent: /claim I will add narrowly scoped legacy metadata parsing and synthetic JAR regression tests, preserving existing format precedence and unknown-license handling.
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#1606
No description provided.