[PR #4415] [MERGED] Port ledger: support builds with JAR-only inputs #5614

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4415
Author: @SlaVKsVolks
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @rdbtCVS

Base: main ← Head: contribute/horizon-ledger-jar-20261030


📝 Commits (1)

  • b46c30a fix(port-ledger): support jar-only citation checks

📊 Changes

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

View changed files

➕ tests/test_port_ledger.py (+77 -0)
📝 tools/port_ledger.py (+8 -3)

📄 Description

🤖 Opened by SlaVKsVolks's AI agent (OpenAI Codex, GPT-6.1 Sol), not by SlaVKsVolks personally.

What and why

Fixes #4411. port_ledger.py build --jar <client.jar> crashes with StopIteration if a citation names a member of a class for which no decompiled source is available. The same problem occurs with partial sources.

The ledger now reads declared fields from the class file and checks the known class hierarchy before classifying an unresolved member as stale. When source exists, the existing source-text check remains available. Reading Java source uses a closing file operation, avoiding the ResourceWarning exposed by the partial-source regression.

Kind

  • parity
  • bug
  • perf
  • feature
  • extra
  • tooling
  • docs

Vanilla reference

None: developer tooling only. The real-JAR check used the locally owned, checksum-verified Minecraft 26.3 client JAR; no game files, decompiled sources, or generated ledger are included in this PR.

Self-check

  • The new isolated regression reproduced the StopIteration on both JAR-only and partial-source inputs before the fix. Afterward it verifies declared and inherited fields, inherited methods, genuinely missing citations, partial sources, combined sources and JAR, and source-only input.
  • python -m unittest tests.test_port_ledger tests.test_class_index -v: 10 tests passed.
  • python tools/port_ledger.py build --jar .local/client-26.3.jar --jobs 4: passed with the verified 26.3 JAR; indexed 76,807 vanilla methods. A subsequent where SugarCaneBlock.canSurvive query also returned successfully. This is a tooling check, not game or gameplay-parity acceptance.
  • python tools/check_public_tree.py --history: passed after the commit.
  • git diff --check: passed.

pr_ready (tools/pr_ready.py --base d2186eb9aa022a64a8b26e6989a04e44fba99ee7 on DESKTOP-5RS29HP, against d2186eb9a, 1 min 3 s)

Check Result
Scope ✅ 2 files, +85 −3
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 481 run, OK (12 skipped; 1 min 2 s)
rustfmt ➖ no Rust change
clippy ➖ no Rust change
tests ➖ no crate touched
doc tests ➖ no crate touched
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: complete prepared game data is absent from this checkout; CI selects affected harnesses
Label skip-release

The Python-suite output contains intentional fake harness failures exercised by retry tests; the suite itself returned OK. A previous parity attempt in another Windows checkout failed before starting harnesses because the runner imports fcntl; it was not rerun or claimed as passing here.

🤖 Generated with OpenAI Codex (GPT-6.1 Sol).


🔄 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/4415 **Author:** [@SlaVKsVolks](https://github.com/SlaVKsVolks) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `contribute/horizon-ledger-jar-20261030` --- ### 📝 Commits (1) - [`b46c30a`](https://github.com/horizon-rust/horizon/commit/b46c30af80cd93d16aec4fde8a7ce3bfaef0ad3a) fix(port-ledger): support jar-only citation checks ### 📊 Changes **2 files changed** (+85 additions, -3 deletions) <details> <summary>View changed files</summary> ➕ `tests/test_port_ledger.py` (+77 -0) 📝 `tools/port_ledger.py` (+8 -3) </details> ### 📄 Description > 🤖 Opened by SlaVKsVolks's AI agent (OpenAI Codex, GPT-6.1 Sol), not by SlaVKsVolks personally. ## What and why Fixes #4411. `port_ledger.py build --jar <client.jar>` crashes with `StopIteration` if a citation names a member of a class for which no decompiled source is available. The same problem occurs with partial sources. The ledger now reads declared fields from the class file and checks the known class hierarchy before classifying an unresolved member as stale. When source exists, the existing source-text check remains available. Reading Java source uses a closing file operation, avoiding the `ResourceWarning` exposed by the partial-source regression. ## Kind - [ ] parity - [ ] bug - [ ] perf - [ ] feature - [ ] extra - [x] tooling - [ ] docs ## Vanilla reference None: developer tooling only. The real-JAR check used the locally owned, checksum-verified Minecraft 26.3 client JAR; no game files, decompiled sources, or generated ledger are included in this PR. ## Self-check - The new isolated regression reproduced the `StopIteration` on both JAR-only and partial-source inputs before the fix. Afterward it verifies declared and inherited fields, inherited methods, genuinely missing citations, partial sources, combined sources and JAR, and source-only input. - `python -m unittest tests.test_port_ledger tests.test_class_index -v`: 10 tests passed. - `python tools/port_ledger.py build --jar .local/client-26.3.jar --jobs 4`: passed with the verified 26.3 JAR; indexed 76,807 vanilla methods. A subsequent `where SugarCaneBlock.canSurvive` query also returned successfully. This is a tooling check, not game or gameplay-parity acceptance. - `python tools/check_public_tree.py --history`: passed after the commit. - `git diff --check`: passed. **pr_ready** (`tools/pr_ready.py --base d2186eb9aa022a64a8b26e6989a04e44fba99ee7` on DESKTOP-5RS29HP, against d2186eb9a, 1 min 3 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +85 −3 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 481 run, OK (12 skipped; 1 min 2 s) | | rustfmt | ➖ no Rust change | | clippy | ➖ no Rust change | | tests | ➖ no crate touched | | doc tests | ➖ no crate touched | | 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: complete prepared game data is absent from this checkout; CI selects affected harnesses | | Label | `skip-release` | The Python-suite output contains intentional fake harness failures exercised by retry tests; the suite itself returned OK. A previous parity attempt in another Windows checkout failed before starting harnesses because the runner imports `fcntl`; it was not rerun or claimed as passing here. 🤖 Generated with OpenAI Codex (GPT-6.1 Sol). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:13:47 +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#5614
No description provided.