[PR #3741] [MERGED] Mod port harness: compare items' stats with the NeoForge oracle #5185

Closed
opened 2026-11-03 05:10:49 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3741
Author: @UMCEKO
Created: 10/29/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @ludovic111

Base: main ← Head: mods/harness-item-components


📝 Commits (3)

  • f904f44 Mod port harness: compare items' stats with the NeoForge oracle
  • fd41f0e Merge main into mods/harness-item-components
  • a502ecc Mod port harness: drop 1.21.1's player. attribute prefix too

📊 Changes

2 files changed (+78 additions, -3 deletions)

View changed files

📝 crates/horizon-client/examples/mod_port_probe.rs (+31 -1)
📝 tools/mod_port_harness.py (+47 -2)

📄 Description

🤖 Opened by UMCEKO's AI agent (Claude Code), not by UMCEKO.

Stack, part 3 of 7. The PRs come from a fork, so each one targets main and contains the ones before it. Please merge them in order; this PR's own change is its last commit.

  1. #3739
  2. #3740
    → 3. #3741
  3. #3742
  4. #3743
  5. #3744
  6. #3745

What and why

The harness's items check only saw an item exist with its stack size, so a ported sword carried as a minecraft:stick passed. The probe now dumps what Horizon's loaders make of each item: durability, attribute modifiers, tool rules, enchantability, repair items (tags resolved), equipment slot and food. The harness checks them against the oracle's components as a new item_stats check.

Version differences are normalised as docs/modpacks.md says: 1.21.1's generic. attribute ids are read as 26.3's, and vanilla's newer tool rules may sit beside the mod's own.

On Simplest Emerald Gear, today's carry goes from items 9/9, pass to item_stats 4/49, FAIL. That's the honest number: every tool and armour piece is a stick. #3742 fixes it.

Vanilla reference

None (dev tool).

Self-check

pr_ready (tools/pr_ready.py --quick --base mods/oracle-item-components on nixos, against mods/oracle-item-components at df96b6787, 2 min 13 s)

Check Result
Scope ✅ 2 files, +76 −3
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 416 passed (32 s)
rustfmt ✅ (5 s)
clippy ✅ (1 s)
tests: horizon-client ✅ 832 passed (1 min 20 s)
doc tests ✅ 0 passed (15 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
Label skip-release

Tools used

  • headless-computer-mcp (UMCEKO's): runs the game in a private headless Wayland compositor and drives it with a real mouse and keyboard; every screenshot in this stack was taken with it, including the hovered tooltips.
  • tools/neoforge_oracle.py: the real mod jar on NeoForge 21.1.259, the ground truth (extended in this stack to export item components).
  • horizon-port-pack carry with --resources, then tools/mod_port_harness.py with examples/mod_port_probe.rs (extended in this stack to compare item stats and worn armour).
  • horizon-ctl against the real game: /give, /item replace, /attribute and a hit on a NoAI pig.
  • tools/pr_ready.py --quick, run against the PR before this one so the block covers this PR alone.

The test mod is Simplest Emerald Gear 1.0.6 for NeoForge 1.21.1 (MIT): 9 items, no dependencies. Its jar, the oracle facts and the carry stayed on the local machine, outside the repository.

🤖 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/3741 **Author:** [@UMCEKO](https://github.com/UMCEKO) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `mods/harness-item-components` --- ### 📝 Commits (3) - [`f904f44`](https://github.com/horizon-rust/horizon/commit/f904f4404751d355b00787fe5edd170da82c71c4) Mod port harness: compare items' stats with the NeoForge oracle - [`fd41f0e`](https://github.com/horizon-rust/horizon/commit/fd41f0e36f278eccde06c63a6c4948865184b08a) Merge main into mods/harness-item-components - [`a502ecc`](https://github.com/horizon-rust/horizon/commit/a502eccc921cb7a799fb47f5ebcbe71ffbd86226) Mod port harness: drop 1.21.1's player. attribute prefix too ### 📊 Changes **2 files changed** (+78 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/examples/mod_port_probe.rs` (+31 -1) 📝 `tools/mod_port_harness.py` (+47 -2) </details> ### 📄 Description > 🤖 Opened by UMCEKO's AI agent (Claude Code), not by UMCEKO. **Stack, part 3 of 7.** The PRs come from a fork, so each one targets `main` and contains the ones before it. Please merge them in order; this PR's own change is its last commit. 1. #3739 2. #3740 **→** 3. #3741 4. #3742 5. #3743 6. #3744 7. #3745 ## What and why The harness's `items` check only saw an item exist with its stack size, so a ported sword carried as a `minecraft:stick` passed. The probe now dumps what Horizon's loaders make of each item: durability, attribute modifiers, tool rules, enchantability, repair items (tags resolved), equipment slot and food. The harness checks them against the oracle's components as a new `item_stats` check. Version differences are normalised as `docs/modpacks.md` says: 1.21.1's `generic.` attribute ids are read as 26.3's, and vanilla's newer tool rules may sit beside the mod's own. On Simplest Emerald Gear, today's carry goes from `items 9/9, pass` to `item_stats 4/49, FAIL`. That's the honest number: every tool and armour piece is a stick. #3742 fixes it. ## Vanilla reference None (dev tool). ## Self-check **pr_ready** (`tools/pr_ready.py --quick --base mods/oracle-item-components` on nixos, against mods/oracle-item-components at df96b6787, 2 min 13 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +76 −3 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 416 passed (32 s) | | rustfmt | ✅ (5 s) | | clippy | ✅ (1 s) | | tests: horizon-client | ✅ 832 passed (1 min 20 s) | | doc tests | ✅ 0 passed (15 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | `skip-release` | ## Tools used - [headless-computer-mcp](https://github.com/UMCEKO/headless-computer-mcp) (UMCEKO's): runs the game in a private headless Wayland compositor and drives it with a real mouse and keyboard; every screenshot in this stack was taken with it, including the hovered tooltips. - `tools/neoforge_oracle.py`: the real mod jar on NeoForge 21.1.259, the ground truth (extended in this stack to export item components). - `horizon-port-pack carry` with `--resources`, then `tools/mod_port_harness.py` with `examples/mod_port_probe.rs` (extended in this stack to compare item stats and worn armour). - `horizon-ctl` against the real game: `/give`, `/item replace`, `/attribute` and a hit on a NoAI pig. - `tools/pr_ready.py --quick`, run against the PR before this one so the block covers this PR alone. The test mod is [Simplest Emerald Gear](https://modrinth.com/mod/simplest-emerald-gear) 1.0.6 for NeoForge 1.21.1 (MIT): 9 items, no dependencies. Its jar, the oracle facts and the carry stayed on the local machine, outside the repository. 🤖 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 05:10:49 +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#5185
No description provided.