[PR #1534] [MERGED] fix(client): preserve behavior while clearing Rust 1.90 Clippy errors #3565

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

📋 Pull Request Information

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

Base: main ← Head: fix/client-clippy-baseline-20261023


📝 Commits (7)

  • 14461c1 fix(client): preserve behavior while clearing Rust 1.90 Clippy errors
  • 8f081ae Merge remote-tracking branch 'upstream/main' into fix/client-clippy-baseline-20261023
  • 077c4c9 Merge remote-tracking branch 'upstream/main' into fix/client-clippy-baseline-20261023
  • 3e04df4 Merge commit 'd84d7a7e61' into fix/client-clippy-baseline-20261023
  • 51de8af Merge commit 'd8dd2023dd' into fix/client-clippy-baseline-20261023
  • 6b55abd Merge commit '22b2711cf9' into fix/client-clippy-baseline-20261023
  • 040ac1b Merge commit '59f018eabe' into fix/client-clippy-baseline-20261023

📊 Changes

20 files changed (+90 additions, -63 deletions)

View changed files

📝 crates/horizon-client/examples/probe/first_person_probe.rs (+1 -1)
📝 crates/horizon-client/src/containers.rs (+7 -7)
📝 crates/horizon-client/src/game.rs (+5 -5)
📝 crates/horizon-client/src/game/chat.rs (+2 -5)
📝 crates/horizon-client/src/game/debug_keys.rs (+1 -1)
📝 crates/horizon-client/src/game/dragon.rs (+24 -4)
📝 crates/horizon-client/src/game/explosion.rs (+1 -1)
📝 crates/horizon-client/src/game/lan_vehicles.rs (+3 -1)
📝 crates/horizon-client/src/game/remote.rs (+2 -3)
📝 crates/horizon-client/src/items.rs (+13 -13)
📝 crates/horizon-client/src/mobs/ai.rs (+4 -4)
📝 crates/horizon-client/src/mobs/axolotl.rs (+10 -7)
📝 crates/horizon-client/src/mobs/bee.rs (+1 -1)
📝 crates/horizon-client/src/mobs/living.rs (+3 -3)
📝 crates/horizon-client/src/mobs/monster_brain.rs (+1 -1)
📝 crates/horizon-client/src/mobs/raider.rs (+1 -1)
📝 crates/horizon-client/src/mobs/villager_brain.rs (+3 -3)
📝 crates/horizon-client/src/mobs/warden.rs (+1 -1)
📝 crates/horizon-client/src/particles.rs (+1 -1)
📝 crates/horizon-client/src/streaming.rs (+6 -0)

📄 Description

🤖 Proposed by ChatGPT (OpenAI assistant) for TheGaner; not authored by an upstream maintainer.

Purpose

Clear the next set of stable-Rust 1.90 horizon-client Clippy errors surfaced after fixing the shader-pack match guard and worldgen lint issues in #1488 and #1502. These are behavior-preserving cleanup changes to 20 client-only source/example files; no project release/version policy or external game assets change.

Correctness-sensitive changes

  • Simplify boolean conditions in mobs, interaction, particles, container UI, game input, and LAN checks while retaining short-circuit evaluation order.
  • Remove recursive-method self parameters only where the receiver was used solely to recurse. RNG calls and input evaluation remain in their original order.
  • Preserve axolotl test RNG draw order explicitly: the second random draw is still consumed under the original first-gate condition even though a constant makes its outcome irrelevant to the boolean. The existing random-stream parity test passes.
  • Preserve ender dragon NaN/unordered squared-distance semantics when replacing manual range tests. Added a regression covering NaN, ±infinity and exact 100/22500 boundaries.
  • Keep the nine large Proto values heap resident by retaining Box<[Proto; 9]> with one narrow documented Clippy #[expect]; no global lint suppression.

Latest upstream integration

  • Updated to latest live-checked original ludovic111/horizon:main 1cd0dd8c5dfc1208aa96e65b49485541a0f34bb9 through ordinary non-rebasing merges. This newest Source revision changes only the Java differential harness and parity tooling; the Rust source, manifests, lockfile, toolchain and third-party inputs were byte-identical to the fully tested prior Source 7f60a55c.
  • Fork topic: TheGaner/horizon:fix/client-clippy-baseline-20261023 at 077c4c92145286a780eebc64a1381797935b771d; latest Source SHA verified as ancestor, Fork main verified identical to Source main, topic clean, PR diff exactly 20 files under crates/horizon-client/.
  • Maintainer edits are enabled.

Verification (pinned Rust 1.90, local independent review)

The project still has two independent upstream-wide blockers in Source (experimental if let match guard and worldgen warnings). To verify this topic without bundling those fixes into its PR, an unpublished clean review tree combined this topic with existing PRs #1488 and #1502:

Check Result
cargo fmt --all -- --check PASS
cargo clippy --locked -p horizon-client --all-targets -- -D warnings PASS / exit 0 on Source 7f60 with both dependency fixes
cargo test --locked -p horizon-client --all-targets -- --test-threads=4 1,203 tests PASS, 29 ignored, 0 fail across 18 suites / exit 0 on the same Source
Dragon floating point and axolotl RNG regression tests PASS
Public-tree and Git whitespace checks PASS
Cargo.lock Unchanged

The prior Source 0b56 checkpoint also passed the same controlled tests (1,199 pass / 29 ignored) and strict Clippy.

Latest Source 1cd0dd8c evidence: After those tests, latest original Source was merged again via standard two-parent merge. A path-level and tree-input comparison confirmed the new upstream commit modifies only VanillaProtocolClient.java, tools/parity.py, and tools/test_dedicated_server_parity.py, not the Rust inputs measured above. The test results remain applicable to the unchanged Rust source but have not been rerun on the new overall commit SHA; original Java 26.3 differential parity must be checked separately.

Important limitations: the standalone Source checkout still needs #1488 and #1502 to pass the full strict workspace gate. An older combined review on Source 455a had one default-thread client-suite SIGSEGV; a controlled 4-thread retry passed, but that intermittent issue is not proven resolved. Full original Java 26.3 differential, physical GPU tests, and hosted CI have not been established for this contribution. Do not interpret the local combined test pass as an unrestricted upstream green check.

Evidence (contributor workspace, not in PR): reports/client-clippy-baseline-20261023/VERIFICATION.md, source7f60-clippy.log, source7f60-client-all-target-tests.log.

Keep this as a draft until the dependent PRs and the full required repository checks are green or maintainers resolve the baseline gating strategy. No direct original-Source push, force, or Accepted promotion.

🤖 Generated with ChatGPT (OpenAI assistant).

Source-current checkpoint — d84d7a7 (2026-10-23 CDT)

  • Latest live-verified original Source H001 and Fork H002 main: d84d7a7e6178ec1a6afab302c4b8ce80e5d2d9ee. Topic branch 3e04df41c82d147236e54c43c1d7f7b907d26f88 contains this Source commit as ancestor via ordinary non-force merges; no direct Source/Fork-main feature edits. GitHub PR shows only the intended 20 changed file(s).
  • The latest Source delta since the fully tested 7f60a55c checkpoint affects only Java differential tooling (1cd0dd8c) and horizon-prepare Netty artifact logic (d84d7a7), not the changed client/worldgen Rust source or client manifests/lockfile. The controlled Rust combined review at 7f60 passed 1,203 all-target client tests, 29 ignored, strict Clippy and Rustfmt; the full client suite was not re-executed at d84d7a7 SHA. Related #1488 targeted tests and #1502 strict lint/focused regressions did pass on refreshed d84d7a7 topics. Original Java differential and hosted CI remain open gates.
  • This addendum supplements prior dated evidence, which remains true only for the explicitly named source revisions. Maintainer/review readiness status is unchanged.

Source-current validation: 59f018ea (2026-10-23 CDT)

  • Refreshed this focused PR topic through an ordinary two-parent merge with original Source ludovic111/horizon:main at 59f018eabe26093274d34942365d31010c3e3e95; fast-forward pushed the user Fork head 040ac1bec4ac539e6f95779147ce6cbf87ecaec4 using TheGaner credentials, without force, reset, rebase, or direct Source write. GitHub reports this PR mergeable with 20 changed file(s).
  • Independent 31-file combined review eddebd9aaa3ffcbf1af73259ac508794dd3806ff contains this PR and the related two focused PRs, with Source above as ancestor. Using pinned Rust 1.90, combined gates PASS: cargo fmt --all -- --check; strict cargo clippy --locked -p horizon-client --all-targets -- -D warnings; strict cargo clippy --locked -p horizon-world --all-targets -- -D warnings; 17 test_pr_ready.py Python regressions; 3 worldgen edge-backoff tests; 35 shaderpack tests; 4 client Java-pack tests; 1,076 client library tests passed / 26 ignored with one thread; public-tree check, final exit 0. Evidence log (not shipped in this PR): reports/client-clippy-baseline-20261023/source-59f018-combined-gates.log.
  • Prior intermittent native SIGSEGV in an earlier combined graphics-arena test session remains unresolved and is not claimed fixed by this PR. The current one-thread native suite passed; unrestricted concurrency stability, GPU live runtime, original 13 Java26.3 differential suites, and hosted CI green status are not established by this log. PR draft/reviewer status remains unchanged. Subsequent Source commits, if any, require renewed freshness review.

🔄 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/1534 **Author:** [@TheGaner](https://github.com/TheGaner) **Created:** 10/24/2026 **Status:** ✅ Merged **Merged:** 10/24/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/client-clippy-baseline-20261023` --- ### 📝 Commits (7) - [`14461c1`](https://github.com/horizon-rust/horizon/commit/14461c1d96443877e21fdd7fbc6be810d0c73dd6) fix(client): preserve behavior while clearing Rust 1.90 Clippy errors - [`8f081ae`](https://github.com/horizon-rust/horizon/commit/8f081ae4607a4f77924aa44e05d94837e68ab3a1) Merge remote-tracking branch 'upstream/main' into fix/client-clippy-baseline-20261023 - [`077c4c9`](https://github.com/horizon-rust/horizon/commit/077c4c92145286a780eebc64a1381797935b771d) Merge remote-tracking branch 'upstream/main' into fix/client-clippy-baseline-20261023 - [`3e04df4`](https://github.com/horizon-rust/horizon/commit/3e04df41c82d147236e54c43c1d7f7b907d26f88) Merge commit 'd84d7a7e6178ec1a6afab302c4b8ce80e5d2d9ee' into fix/client-clippy-baseline-20261023 - [`51de8af`](https://github.com/horizon-rust/horizon/commit/51de8afe95e0531ad5671ec1a40ec87853832f0c) Merge commit 'd8dd2023dd9c6129e9e628a66d61c1b10e1435cf' into fix/client-clippy-baseline-20261023 - [`6b55abd`](https://github.com/horizon-rust/horizon/commit/6b55abd66a9543ed8859684dbdaae55027fbcf62) Merge commit '22b2711cf9557d53d21080828c895dbff6027151' into fix/client-clippy-baseline-20261023 - [`040ac1b`](https://github.com/horizon-rust/horizon/commit/040ac1bec4ac539e6f95779147ce6cbf87ecaec4) Merge commit '59f018eabe26093274d34942365d31010c3e3e95' into fix/client-clippy-baseline-20261023 ### 📊 Changes **20 files changed** (+90 additions, -63 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/examples/probe/first_person_probe.rs` (+1 -1) 📝 `crates/horizon-client/src/containers.rs` (+7 -7) 📝 `crates/horizon-client/src/game.rs` (+5 -5) 📝 `crates/horizon-client/src/game/chat.rs` (+2 -5) 📝 `crates/horizon-client/src/game/debug_keys.rs` (+1 -1) 📝 `crates/horizon-client/src/game/dragon.rs` (+24 -4) 📝 `crates/horizon-client/src/game/explosion.rs` (+1 -1) 📝 `crates/horizon-client/src/game/lan_vehicles.rs` (+3 -1) 📝 `crates/horizon-client/src/game/remote.rs` (+2 -3) 📝 `crates/horizon-client/src/items.rs` (+13 -13) 📝 `crates/horizon-client/src/mobs/ai.rs` (+4 -4) 📝 `crates/horizon-client/src/mobs/axolotl.rs` (+10 -7) 📝 `crates/horizon-client/src/mobs/bee.rs` (+1 -1) 📝 `crates/horizon-client/src/mobs/living.rs` (+3 -3) 📝 `crates/horizon-client/src/mobs/monster_brain.rs` (+1 -1) 📝 `crates/horizon-client/src/mobs/raider.rs` (+1 -1) 📝 `crates/horizon-client/src/mobs/villager_brain.rs` (+3 -3) 📝 `crates/horizon-client/src/mobs/warden.rs` (+1 -1) 📝 `crates/horizon-client/src/particles.rs` (+1 -1) 📝 `crates/horizon-client/src/streaming.rs` (+6 -0) </details> ### 📄 Description > 🤖 Proposed by ChatGPT (OpenAI assistant) for TheGaner; not authored by an upstream maintainer. ## Purpose Clear the next set of stable-Rust 1.90 `horizon-client` Clippy errors surfaced after fixing the shader-pack match guard and worldgen lint issues in **#1488** and **#1502**. These are behavior-preserving cleanup changes to 20 client-only source/example files; no project release/version policy or external game assets change. ## Correctness-sensitive changes - Simplify boolean conditions in mobs, interaction, particles, container UI, game input, and LAN checks while retaining short-circuit evaluation order. - Remove recursive-method `self` parameters only where the receiver was used solely to recurse. RNG calls and input evaluation remain in their original order. - Preserve **axolotl test RNG draw order** explicitly: the second random draw is still consumed under the original first-gate condition even though a constant makes its outcome irrelevant to the boolean. The existing random-stream parity test passes. - Preserve **ender dragon NaN/unordered squared-distance semantics** when replacing manual range tests. Added a regression covering NaN, ±infinity and exact 100/22500 boundaries. - Keep the nine large `Proto` values heap resident by retaining `Box<[Proto; 9]>` with one narrow documented Clippy `#[expect]`; no global lint suppression. ## Latest upstream integration - Updated to latest live-checked original `ludovic111/horizon:main` **`1cd0dd8c5dfc1208aa96e65b49485541a0f34bb9`** through ordinary non-rebasing merges. This newest Source revision changes only the Java differential harness and parity tooling; the Rust source, manifests, lockfile, toolchain and third-party inputs were byte-identical to the fully tested prior Source `7f60a55c`. - Fork topic: `TheGaner/horizon:fix/client-clippy-baseline-20261023` at **`077c4c92145286a780eebc64a1381797935b771d`**; latest Source SHA verified as ancestor, Fork `main` verified identical to Source `main`, topic clean, PR diff exactly 20 files under `crates/horizon-client/`. - Maintainer edits are enabled. ## Verification (pinned Rust 1.90, local independent review) The project still has two independent upstream-wide blockers in Source (experimental `if let` match guard and worldgen warnings). To verify this topic *without bundling those fixes into its PR*, an **unpublished** clean review tree combined this topic with existing PRs **#1488** and **#1502**: | Check | Result | |---|---| | `cargo fmt --all -- --check` | PASS | | `cargo clippy --locked -p horizon-client --all-targets -- -D warnings` | **PASS / exit 0** on Source 7f60 with both dependency fixes | | `cargo test --locked -p horizon-client --all-targets -- --test-threads=4` | **1,203 tests PASS, 29 ignored, 0 fail across 18 suites / exit 0** on the same Source | | Dragon floating point and axolotl RNG regression tests | PASS | | Public-tree and Git whitespace checks | PASS | | Cargo.lock | Unchanged | The prior Source 0b56 checkpoint also passed the same controlled tests (1,199 pass / 29 ignored) and strict Clippy. **Latest Source 1cd0dd8c evidence:** After those tests, latest original Source was merged again via standard two-parent merge. A path-level and tree-input comparison confirmed the new upstream commit modifies only `VanillaProtocolClient.java`, `tools/parity.py`, and `tools/test_dedicated_server_parity.py`, **not** the Rust inputs measured above. The test results remain applicable to the unchanged Rust source but **have not been rerun on the new overall commit SHA**; original Java 26.3 differential parity must be checked separately. **Important limitations:** the *standalone Source checkout* still needs #1488 and #1502 to pass the full strict workspace gate. An older combined review on Source 455a had one default-thread client-suite SIGSEGV; a controlled 4-thread retry passed, but that intermittent issue is not proven resolved. Full original Java 26.3 differential, physical GPU tests, and hosted CI have not been established for this contribution. Do not interpret the local combined test pass as an unrestricted upstream green check. Evidence (contributor workspace, not in PR): `reports/client-clippy-baseline-20261023/VERIFICATION.md`, `source7f60-clippy.log`, `source7f60-client-all-target-tests.log`. **Keep this as a draft until the dependent PRs and the full required repository checks are green or maintainers resolve the baseline gating strategy.** No direct original-Source push, force, or Accepted promotion. 🤖 Generated with ChatGPT (OpenAI assistant). ## Source-current checkpoint — d84d7a7 (2026-10-23 CDT) - Latest live-verified original Source H001 and Fork H002 main: `d84d7a7e6178ec1a6afab302c4b8ce80e5d2d9ee`. Topic branch `3e04df41c82d147236e54c43c1d7f7b907d26f88` contains this Source commit as ancestor via ordinary non-force merges; no direct Source/Fork-main feature edits. GitHub PR shows only the intended 20 changed file(s). - The latest Source delta since the fully tested `7f60a55c` checkpoint affects only Java differential tooling (`1cd0dd8c`) and `horizon-prepare` Netty artifact logic (`d84d7a7`), **not the changed client/worldgen Rust source or client manifests/lockfile**. The controlled Rust combined review at 7f60 passed **1,203 all-target client tests**, 29 ignored, strict Clippy and Rustfmt; **the full client suite was not re-executed at d84d7a7 SHA**. Related #1488 targeted tests and #1502 strict lint/focused regressions did pass on refreshed d84d7a7 topics. Original Java differential and hosted CI remain open gates. - This addendum supplements prior dated evidence, which remains true only for the explicitly named source revisions. Maintainer/review readiness status is unchanged. ### Source-current validation: 59f018ea (2026-10-23 CDT) - Refreshed this **focused PR topic** through an ordinary two-parent merge with original Source `ludovic111/horizon:main` at `59f018eabe26093274d34942365d31010c3e3e95`; fast-forward pushed the user Fork head `040ac1bec4ac539e6f95779147ce6cbf87ecaec4` using `TheGaner` credentials, **without force, reset, rebase, or direct Source write**. GitHub reports this PR mergeable with 20 changed file(s). - Independent *31-file combined review* `eddebd9aaa3ffcbf1af73259ac508794dd3806ff` contains this PR and the related two focused PRs, with Source above as ancestor. Using pinned Rust 1.90, combined gates **PASS**: `cargo fmt --all -- --check`; strict `cargo clippy --locked -p horizon-client --all-targets -- -D warnings`; strict `cargo clippy --locked -p horizon-world --all-targets -- -D warnings`; 17 `test_pr_ready.py` Python regressions; 3 worldgen edge-backoff tests; 35 shaderpack tests; 4 client Java-pack tests; **1,076 client library tests passed / 26 ignored** with one thread; public-tree check, final **exit 0**. Evidence log (not shipped in this PR): `reports/client-clippy-baseline-20261023/source-59f018-combined-gates.log`. - Prior intermittent native SIGSEGV in an earlier combined graphics-arena test session **remains unresolved** and is not claimed fixed by this PR. The current one-thread native suite passed; unrestricted concurrency stability, GPU live runtime, original 13 Java26.3 differential suites, and **hosted CI green status** are not established by this log. PR draft/reviewer status remains unchanged. Subsequent Source commits, if any, require renewed freshness review. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:10:28 +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#3565
No description provided.