[PR #1244] [MERGED] tools: end-to-end check of a Java mod from the mod browser #3450

Closed
opened 2026-11-03 04:09:38 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: feat/modbrowser-e2e-harness


📝 Commits (9)

  • da996b9 port-pack: check one mod jar (Works, Partly, Doesn't run) from its content and classes
  • 4a350bb port-pack carry: leave out recipes for items it didn't declare
  • 3530560 Launcher: Java mods in the mod browser, checked before install; Modpacks moves into Mods
  • a3f81f3 Launcher: test a Java mod's install, dependencies, id clash and removal offline
  • b8f7924 Mod browser: CurseForge is coming soon
  • b1dc235 tools: end-to-end check of a Java mod from the mod browser
  • 9ae041c Merge origin/main into feat/modbrowser-java-verdicts
  • a5d68dc Merge feat/modbrowser-java-verdicts (now with main) into feat/modbrowser-java-launcher
  • 4786d56 Merge feat/modbrowser-java-launcher (now with main) into feat/modbrowser-e2e-harness

📊 Changes

23 files changed (+2353 additions, -136 deletions)

View changed files

📝 crates/horizon-port-pack/src/carry.rs (+89 -0)
➕ crates/horizon-port-pack/src/check.rs (+411 -0)
➕ crates/horizon-port-pack/src/classes.rs (+642 -0)
📝 crates/horizon-port-pack/src/lib.rs (+2 -0)
📝 crates/horizon-port-pack/src/main.rs (+16 -1)
📝 docs/mod-browser.md (+68 -30)
📝 docs/modpacks.md (+16 -0)
📝 launcher/README.md (+5 -5)
📝 launcher/src/browser.rs (+66 -18)
📝 launcher/src/browser/curseforge.rs (+2 -1)
📝 launcher/src/browser/installed.rs (+33 -10)
📝 launcher/src/browser/installed/tests.rs (+83 -1)
➕ launcher/src/browser/java.rs (+340 -0)
📝 launcher/src/browser/modrinth.rs (+10 -0)
📝 launcher/src/browser/tests.rs (+58 -4)
📝 launcher/src/cli.rs (+71 -9)
📝 launcher/src/main.rs (+1 -4)
📝 launcher/src/modpacks.rs (+2 -1)
📝 launcher/src/modpacks_page.rs (+13 -20)
📝 launcher/src/mods_page.rs (+142 -29)

...and 3 more files

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Step 3 of brief modbrowser-java-1: an end-to-end check of a Java mod from the mod browser. Stacked on #1242 (it drives the launcher's mods CLI); the game it runs needs #1240 (mod items' network ids), without which the crafted and held items are air.

What

tools/mod_browser_harness.py [--mod SLUG] [--query TEXT] [--keep], in a scratch game folder (HORIZON_NO_AUDIO=1, HORIZON_NO_HEARTBEAT=1, offscreen):

  1. horizon-launcher mods search --kind mod macaw finds the mod on Modrinth;
  2. mods check downloads its jar (checks as for every download) and says Works/Partly;
  3. mods install ports it into horizon-mods/ and turns it on;
  4. the game opens a survival world with it (horizon-ctl) and the mod content loads;
  5. a ported block is given, held and placed, and the world then holds it (horizon-ctl block);
  6. a ported recipe with vanilla ingredients is crafted on a crafting table placed by the server: the result slot shows the mod's item, and shift-clicking it puts the count in the inventory.

It first loads the same world with no mod, to time both. One JSON line per step and a summary; exit 1 on a failed step. Docs in docs/mod-browser.md ("End-to-end check").

Measured (Mac mini M4 Pro, offscreen, Macaw's Fences and Walls)

Step Result
search "macaw" 15 results, found
check Partly: 166 blocks, 208 recipes port; 32 blocks with no vanilla block to copy left out, with their 32 recipes; 3.96 s
install horizon-mods/mcwfences, turned on, 3.05 s
world load, no mods / with the mod 5.44 s / 7.32 s (resources 1.1 s / 2.6 s: the content root's first build)
place mcwfences:acacia_hedge held and placed
craft mcwfences:acacia_hedge in the result slot, 4 in the inventory

The run found two bugs, both fixed: mod items had no network id (#1240), and recipes whose block the carry left out crafted air (fixed in #1230's carry).

Self-check

  • The run above passes (exit 0) with the game built from #1240 and the launcher from #1242/#1230.
  • python3 -m py_compile: clean. It only reads the repo; the scratch folder is deleted unless --keep.

Needs Ludovic

Nothing.

🤖 Generated with Claude Code


🔄 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/1244 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/22/2026 **Status:** ✅ Merged **Merged:** 10/22/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/modbrowser-e2e-harness` --- ### 📝 Commits (9) - [`da996b9`](https://github.com/horizon-rust/horizon/commit/da996b9fd13e02ab3e758393b6d428d4ef6f07d0) port-pack: check one mod jar (Works, Partly, Doesn't run) from its content and classes - [`4a350bb`](https://github.com/horizon-rust/horizon/commit/4a350bb0a03c64b34245ddd5e3f526de305988f2) port-pack carry: leave out recipes for items it didn't declare - [`3530560`](https://github.com/horizon-rust/horizon/commit/35305605819cece46b2c53bdc94cc9de5151bd80) Launcher: Java mods in the mod browser, checked before install; Modpacks moves into Mods - [`a3f81f3`](https://github.com/horizon-rust/horizon/commit/a3f81f3a30ec54d2cb84e806334db2db8a14684b) Launcher: test a Java mod's install, dependencies, id clash and removal offline - [`b8f7924`](https://github.com/horizon-rust/horizon/commit/b8f79247b865c2a4bba9d5e65803e280f581ceca) Mod browser: CurseForge is coming soon - [`b1dc235`](https://github.com/horizon-rust/horizon/commit/b1dc23551b93ed2e307c42073b560c0cb7ae6734) tools: end-to-end check of a Java mod from the mod browser - [`9ae041c`](https://github.com/horizon-rust/horizon/commit/9ae041ccd3a2e674616503eae5008a5125d61496) Merge origin/main into feat/modbrowser-java-verdicts - [`a5d68dc`](https://github.com/horizon-rust/horizon/commit/a5d68dc8900d0d01806e606e1eb9bd9d69875e06) Merge feat/modbrowser-java-verdicts (now with main) into feat/modbrowser-java-launcher - [`4786d56`](https://github.com/horizon-rust/horizon/commit/4786d56d5b0ec2cfe195d69f57db06bc821cb800) Merge feat/modbrowser-java-launcher (now with main) into feat/modbrowser-e2e-harness ### 📊 Changes **23 files changed** (+2353 additions, -136 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-port-pack/src/carry.rs` (+89 -0) ➕ `crates/horizon-port-pack/src/check.rs` (+411 -0) ➕ `crates/horizon-port-pack/src/classes.rs` (+642 -0) 📝 `crates/horizon-port-pack/src/lib.rs` (+2 -0) 📝 `crates/horizon-port-pack/src/main.rs` (+16 -1) 📝 `docs/mod-browser.md` (+68 -30) 📝 `docs/modpacks.md` (+16 -0) 📝 `launcher/README.md` (+5 -5) 📝 `launcher/src/browser.rs` (+66 -18) 📝 `launcher/src/browser/curseforge.rs` (+2 -1) 📝 `launcher/src/browser/installed.rs` (+33 -10) 📝 `launcher/src/browser/installed/tests.rs` (+83 -1) ➕ `launcher/src/browser/java.rs` (+340 -0) 📝 `launcher/src/browser/modrinth.rs` (+10 -0) 📝 `launcher/src/browser/tests.rs` (+58 -4) 📝 `launcher/src/cli.rs` (+71 -9) 📝 `launcher/src/main.rs` (+1 -4) 📝 `launcher/src/modpacks.rs` (+2 -1) 📝 `launcher/src/modpacks_page.rs` (+13 -20) 📝 `launcher/src/mods_page.rs` (+142 -29) _...and 3 more files_ </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Step 3 of brief modbrowser-java-1: an end-to-end check of a Java mod from the mod browser. Stacked on #1242 (it drives the launcher's `mods` CLI); the game it runs needs #1240 (mod items' network ids), without which the crafted and held items are air. ## What `tools/mod_browser_harness.py [--mod SLUG] [--query TEXT] [--keep]`, in a scratch game folder (`HORIZON_NO_AUDIO=1`, `HORIZON_NO_HEARTBEAT=1`, offscreen): 1. `horizon-launcher mods search --kind mod macaw` finds the mod on Modrinth; 2. `mods check` downloads its jar (checks as for every download) and says Works/Partly; 3. `mods install` ports it into `horizon-mods/` and turns it on; 4. the game opens a survival world with it (horizon-ctl) and the mod content loads; 5. a ported block is given, held and placed, and the world then holds it (horizon-ctl `block`); 6. a ported recipe with vanilla ingredients is crafted on a crafting table placed by the server: the result slot shows the mod's item, and shift-clicking it puts the count in the inventory. It first loads the same world with no mod, to time both. One JSON line per step and a summary; exit 1 on a failed step. Docs in `docs/mod-browser.md` ("End-to-end check"). ## Measured (Mac mini M4 Pro, offscreen, Macaw's Fences and Walls) | Step | Result | |---|---| | search "macaw" | 15 results, found | | check | Partly: 166 blocks, 208 recipes port; 32 blocks with no vanilla block to copy left out, with their 32 recipes; 3.96 s | | install | `horizon-mods/mcwfences`, turned on, 3.05 s | | world load, no mods / with the mod | 5.44 s / 7.32 s (resources 1.1 s / 2.6 s: the content root's first build) | | place | `mcwfences:acacia_hedge` held and placed | | craft | `mcwfences:acacia_hedge` in the result slot, 4 in the inventory | The run found two bugs, both fixed: mod items had no network id (#1240), and recipes whose block the carry left out crafted air (fixed in #1230's carry). ## Self-check - The run above passes (exit 0) with the game built from #1240 and the launcher from #1242/#1230. - `python3 -m py_compile`: clean. It only reads the repo; the scratch folder is deleted unless `--keep`. ## Needs Ludovic Nothing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:09:38 +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#3450
No description provided.