[PR #1488] [CLOSED] fix(shaderpack): avoid unstable if-let match guard in pack test #3550

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1488
Author: @TheGaner
Created: 10/23/2026
Status: ❌ Closed

Base: main ← Head: fix/shaderpack-stable-test-guard


📝 Commits (10+)

  • dbb18cd fix(shaderpack): use stable match arm in real-pack test
  • a76cafe Merge remote-tracking branch 'upstream/main' into fix/shaderpack-stable-test-guard
  • 8e94594 test(shaderpack): exercise valid and invalid WGSL from bundled pack
  • 3bb4dca Merge remote-tracking branch 'upstream/main' into fix/shaderpack-stable-test-guard
  • 8cbbd57 Merge remote-tracking branch 'upstream/main' into fix/shaderpack-stable-test-guard
  • 9cfba76 Merge commit 'd6dc08098a' into fix/shaderpack-stable-test-guard
  • de3f69f Merge commit 'd84d7a7e61' into fix/shaderpack-stable-test-guard
  • 01b5296 Merge commit 'd8dd2023dd' into fix/shaderpack-stable-test-guard
  • 0a9bdfa Merge commit '22b2711cf9' into review/shaderpack-source-22b-20261023
  • e9fbf38 Merge commit '59f018eabe' into fix/shaderpack-stable-test-guard

📊 Changes

1 file changed (+35 additions, -19 deletions)

View changed files

📝 crates/horizon-client/src/java_pack.rs (+35 -19)

📄 Description

🤖 Opened and updated by ChatGPT (OpenAI assistant) for TheGaner, not by the upstream maintainer.

What and why

Fix the Java shader-pack integration test's Rust 1.90 compile error (E0658). Upstream's Ok(pack) if let Some(error) = reparse_error(&pack) uses an experimental if let match guard. Replace it with an ordinary Ok(pack) arm and nested if let / else, retaining both the error-reporting/failure-collection path and successful pass-listing path. No game runtime behavior changes.

Add an always-run unit regression using Horizon's bundled Iris-style Java shader-pack fixture: valid compiled WGSL reparses successfully; intentionally invalid fragment WGSL produces an error naming deferred.fsh. This closes a test-coverage gap because real_packs_load returns early when HORIZON_TEST_SHADERPACKS is unset.

Scope: only crates/horizon-client/src/java_pack.rs (+29/-13), no private game files or unrelated changes.

Latest upstream integration

  • Merged, without rebasing or force-pushing, ludovic111/horizon:main at e436116e3813527299cde256fb2bd77e0b5056ad into the PR topic.
  • Updated Fork branch TheGaner:fix/shaderpack-stable-test-guard at 3bb4dca115a1c899d2ddf4ff9f038b612940ee54; latest Source commit is a verified ancestor.
  • Verified the PR diff against this Source revision is one file and the working tree is clean.
  • Maintainer edits are enabled.

Vanilla reference

None: test and stable-Rust compiler compatibility only; gameplay/shaders themselves are not changed.

Self-check — latest merged source (2026-10-23)

Executed python3 tools/pr_ready.py --quick --base upstream/main with pinned Rust 1.90 and evidence in the development workspace:

Gate Result
Public-tree and Rust formatting PASS
Cargo.lock Unchanged
horizon-client scoped tests 1,188 PASS
Rust documentation tests PASS
Bundled valid/invalid WGSL regression PASS (included above)
Whitespace/one-file Git diff PASS
Optional HORIZON_TEST_SHADERPACKS set to an actual bundled Java-pack fixture PASS: loaded and revalidated four shader passes (previous merged Source snapshot)
Clippy (-D warnings) FAIL: 10 diagnostics in unchanged crates/horizon-world sources

The Clippy diagnostics include clippy::nonminimal_bool, manual_range_contains, and overly_complex_bool_expr in horizon-world. No horizon-world file is modified by this PR. They are upstream baseline issues, not regressions from this one-file change. The overall self-check exit code is 1, so this PR intentionally remains a draft; please do not treat partial green checks as complete readiness.

Original Java 26.3 gameplay parity harnesses were not run for this test-only change. CI check-run metadata was not reported for the draft PR when last checked.

Screenshots

Not applicable (no UI or player-facing change).

🤖 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 de3f69fe6871eb676c7bb52c50af144b51fdbd6a contains this Source commit as ancestor via ordinary non-force merges; no direct Source/Fork-main feature edits. GitHub PR shows only the intended 1 changed file(s).
  • Pinned Rust 1.90 cargo test --locked -p horizon-client --lib java_pack::tests:: -- --nocapture on this refreshed topic: 4 passed, 0 failed, exit 0. The valid/invalid WGSL regression remains included. The full source-wide lint check is still dependent on separate upstream worldgen/client lint work; this is not an unrestricted green CI claim.
  • This addendum supplements prior dated evidence, which remains true only for the explicitly named source revisions. Maintainer/review readiness status is unchanged.

Original Source gbuffers_terrain compatibility — 22b2711c (2026-10-23 CDT)

  • Refreshed this one-file PR topic via an ordinary, non-force two-parent merge with original ludovic111/horizon:main at 22b2711cf9557d53d21080828c895dbff6027151; pushed Fork topic head 0a9bdfa90597dbb4e7def83d1f9e1753854236b2. Latest H001 Source and H002 Fork main matched when published. GitHub confirms 1 changed file, mergeable.
  • This Source includes upstream #1277, adding Java shader-pack gbuffers_terrain and gbuffers_water. The original unstable Ok(pack) if let Some(error) match guard was still present. A real merge conflict occurred in crates/horizon-client/src/java_pack.rs; the resolution preserves upstream's new terrain/water geometry summaries and our stable-Rust invalid-WGSL error handling/always-run negative regression. Only one PR file differs from current Source.
  • Verified on Source 22b2711c using pinned Rust 1.90: cargo fmt --all -- --check PASS; cargo test --locked -p horizon-client --lib java_pack::tests:: 4 PASS; cargo test --locked -p horizon-shaderpack --all-targets 35 PASS (16 library + 11 pack + 8 shader translation including new geometry tests); python3 tools/check_public_tree.py PASS; terminal exit 0. Evidence is in contributor workspace reports/shaderpack-source-22b-review-20261023/verification.log (not part of PR).
  • Source-wide strict Clippy still requires independent #1502 and #1534. Hosted workflow checks on a prior head reported action_required, not CI pass; the automated Codex review on the earlier head failed to complete, which is not a code finding. The current head's GitHub CI/review status must be checked separately.

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 e9fbf38710370db4a99bb7c7633c6b735a423aee using TheGaner credentials, without force, reset, rebase, or direct Source write. GitHub reports this PR mergeable with 1 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/1488 **Author:** [@TheGaner](https://github.com/TheGaner) **Created:** 10/23/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/shaderpack-stable-test-guard` --- ### 📝 Commits (10+) - [`dbb18cd`](https://github.com/horizon-rust/horizon/commit/dbb18cd7bdb6eb079f657b32b86026a03910c7e5) fix(shaderpack): use stable match arm in real-pack test - [`a76cafe`](https://github.com/horizon-rust/horizon/commit/a76cafe217bf4ab793d19058e680962aa76e1889) Merge remote-tracking branch 'upstream/main' into fix/shaderpack-stable-test-guard - [`8e94594`](https://github.com/horizon-rust/horizon/commit/8e94594465d5ab46dfb6ea92ffd5101c91f6859a) test(shaderpack): exercise valid and invalid WGSL from bundled pack - [`3bb4dca`](https://github.com/horizon-rust/horizon/commit/3bb4dca115a1c899d2ddf4ff9f038b612940ee54) Merge remote-tracking branch 'upstream/main' into fix/shaderpack-stable-test-guard - [`8cbbd57`](https://github.com/horizon-rust/horizon/commit/8cbbd579b8f65c5b4b405d49f6c1d0dd17bddf24) Merge remote-tracking branch 'upstream/main' into fix/shaderpack-stable-test-guard - [`9cfba76`](https://github.com/horizon-rust/horizon/commit/9cfba768ee99bc567cbef43b7cdd502bc019fc4b) Merge commit 'd6dc08098a30a08be7ec168fa3e6b756aa3ac493' into fix/shaderpack-stable-test-guard - [`de3f69f`](https://github.com/horizon-rust/horizon/commit/de3f69fe6871eb676c7bb52c50af144b51fdbd6a) Merge commit 'd84d7a7e6178ec1a6afab302c4b8ce80e5d2d9ee' into fix/shaderpack-stable-test-guard - [`01b5296`](https://github.com/horizon-rust/horizon/commit/01b5296147ca5a8c66e2af79ca114a19af3e772d) Merge commit 'd8dd2023dd9c6129e9e628a66d61c1b10e1435cf' into fix/shaderpack-stable-test-guard - [`0a9bdfa`](https://github.com/horizon-rust/horizon/commit/0a9bdfa90597dbb4e7def83d1f9e1753854236b2) Merge commit '22b2711cf9557d53d21080828c895dbff6027151' into review/shaderpack-source-22b-20261023 - [`e9fbf38`](https://github.com/horizon-rust/horizon/commit/e9fbf38710370db4a99bb7c7633c6b735a423aee) Merge commit '59f018eabe26093274d34942365d31010c3e3e95' into fix/shaderpack-stable-test-guard ### 📊 Changes **1 file changed** (+35 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/java_pack.rs` (+35 -19) </details> ### 📄 Description > 🤖 Opened and updated by ChatGPT (OpenAI assistant) for TheGaner, not by the upstream maintainer. ## What and why Fix the Java shader-pack integration test's **Rust 1.90 compile error (E0658)**. Upstream's `Ok(pack) if let Some(error) = reparse_error(&pack)` uses an experimental `if let` match guard. Replace it with an ordinary `Ok(pack)` arm and nested `if let` / `else`, retaining both the error-reporting/failure-collection path and successful pass-listing path. No game runtime behavior changes. Add an always-run unit regression using Horizon's *bundled* Iris-style Java shader-pack fixture: valid compiled WGSL reparses successfully; intentionally invalid fragment WGSL produces an error naming `deferred.fsh`. This closes a test-coverage gap because `real_packs_load` returns early when `HORIZON_TEST_SHADERPACKS` is unset. **Scope:** only `crates/horizon-client/src/java_pack.rs` (+29/-13), no private game files or unrelated changes. ## Latest upstream integration - Merged, **without rebasing or force-pushing**, `ludovic111/horizon:main` at `e436116e3813527299cde256fb2bd77e0b5056ad` into the PR topic. - Updated Fork branch `TheGaner:fix/shaderpack-stable-test-guard` at `3bb4dca115a1c899d2ddf4ff9f038b612940ee54`; latest Source commit is a verified ancestor. - Verified the PR diff against this Source revision is **one file** and the working tree is clean. - Maintainer edits are enabled. ## Vanilla reference None: test and stable-Rust compiler compatibility only; gameplay/shaders themselves are not changed. ## Self-check — latest merged source (2026-10-23) Executed `python3 tools/pr_ready.py --quick --base upstream/main` with pinned Rust 1.90 and evidence in the development workspace: | Gate | Result | |---|---| | Public-tree and Rust formatting | PASS | | Cargo.lock | Unchanged | | `horizon-client` scoped tests | **1,188 PASS** | | Rust documentation tests | PASS | | Bundled valid/invalid WGSL regression | **PASS** (included above) | | Whitespace/one-file Git diff | PASS | | Optional `HORIZON_TEST_SHADERPACKS` set to an actual bundled Java-pack fixture | **PASS: loaded and revalidated four shader passes** (previous merged Source snapshot) | | Clippy (`-D warnings`) | **FAIL: 10 diagnostics in unchanged `crates/horizon-world` sources** | The Clippy diagnostics include `clippy::nonminimal_bool`, `manual_range_contains`, and `overly_complex_bool_expr` in `horizon-world`. No `horizon-world` file is modified by this PR. They are **upstream baseline issues**, not regressions from this one-file change. **The overall self-check exit code is 1**, so this PR intentionally remains a draft; please do not treat partial green checks as complete readiness. Original Java 26.3 gameplay parity harnesses were not run for this test-only change. CI check-run metadata was not reported for the draft PR when last checked. ## Screenshots Not applicable (no UI or player-facing change). 🤖 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 `de3f69fe6871eb676c7bb52c50af144b51fdbd6a` contains this Source commit as ancestor via ordinary non-force merges; no direct Source/Fork-main feature edits. GitHub PR shows only the intended 1 changed file(s). - Pinned Rust 1.90 `cargo test --locked -p horizon-client --lib java_pack::tests:: -- --nocapture` on this refreshed topic: **4 passed, 0 failed, exit 0**. The valid/invalid WGSL regression remains included. The full source-wide lint check is still dependent on separate upstream worldgen/client lint work; this is not an unrestricted green CI claim. - This addendum supplements prior dated evidence, which remains true only for the explicitly named source revisions. Maintainer/review readiness status is unchanged. ## Original Source gbuffers_terrain compatibility — 22b2711c (2026-10-23 CDT) - Refreshed this one-file PR topic via an ordinary, **non-force two-parent merge** with original `ludovic111/horizon:main` at `22b2711cf9557d53d21080828c895dbff6027151`; pushed Fork topic head `0a9bdfa90597dbb4e7def83d1f9e1753854236b2`. Latest H001 Source and H002 Fork `main` matched when published. GitHub confirms **1 changed file, mergeable**. - This Source includes upstream [#1277](https://github.com/ludovic111/horizon/pull/1277), adding Java shader-pack `gbuffers_terrain` and `gbuffers_water`. The original unstable `Ok(pack) if let Some(error)` match guard **was still present**. A real merge conflict occurred in `crates/horizon-client/src/java_pack.rs`; the resolution preserves upstream's new terrain/water geometry summaries **and** our stable-Rust invalid-WGSL error handling/always-run negative regression. Only one PR file differs from current Source. - **Verified on Source 22b2711c using pinned Rust 1.90:** `cargo fmt --all -- --check` PASS; `cargo test --locked -p horizon-client --lib java_pack::tests::` **4 PASS**; `cargo test --locked -p horizon-shaderpack --all-targets` **35 PASS** (16 library + 11 pack + 8 shader translation including new geometry tests); `python3 tools/check_public_tree.py` PASS; terminal **exit 0**. Evidence is in contributor workspace `reports/shaderpack-source-22b-review-20261023/verification.log` (not part of PR). - Source-wide strict Clippy still requires independent #1502 and #1534. Hosted workflow `checks` on a prior head reported `action_required`, **not** CI pass; the automated Codex review on the earlier head failed to complete, which is not a code finding. The current head's GitHub CI/review status must be checked separately. ### 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 `e9fbf38710370db4a99bb7c7633c6b735a423aee` using `TheGaner` credentials, **without force, reset, rebase, or direct Source write**. GitHub reports this PR mergeable with 1 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:21 +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#3550
No description provided.