[PR #1799] [MERGED] Fix Windows resource pack cache recovery #3772

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1799
Author: @cristibctr
Created: 10/25/2026
Status: ✅ Merged
Merged: 10/26/2026
Merged by: @ludovic111

Base: main ← Head: codex/fix-1649-resource-pack-cache


📝 Commits (1)

  • c756a37 Fix stale Windows resource pack overlays

📊 Changes

1 file changed (+73 additions, -2 deletions)

View changed files

📝 crates/horizon-client/src/packs/cache.rs (+73 -2)

📄 Description

🤖 Opened by cristibctr's AI agent (OpenAI Codex), not by cristibctr himself.

What and why

Fixes #1649.

Windows overlays created before #1688 can omit untouched vanilla directories, including blockstates and models. The copy fix in #1688 kept cache version 3, so an existing incomplete overlay can still pass cache validation and fail reload with unbound gallery block state.

Bump the overlay cache version to rebuild those entries. Add a Windows regression test for texture-only folder and ZIP packs: preserve base resources, repair an incomplete version 3 overlay, and reuse the repaired cache. Also open the existing timestamp test file with write access, as Windows requires.

Vanilla reference

Horizon-only filesystem cache repair; no vanilla gameplay behavior changes. No new vanilla classes or methods are ported.

Baseline comparison

Verified in a separate clean worktree at base commit 3a419877b, on Windows with Rust 1.95.0:

Check Base commit PR
Clippy: horizon-world 12 errors Same 12 errors
crash::tests::stacks_start_at_the_panicking_frame Fails: Windows path formatting Same failure
save::tests::session_lock_is_exclusive Fails: Windows locked-file read, OS error 33 Same failure
Focused pack tests — 22 passed, 1 ignored

The reported Clippy and two remaining test failures are reproducible without this PR. Clippy uses -D warnings, so style warnings such as collapsible_match and manual_range_contains stop the check.

The upstream GitHub workflow currently requires maintainer approval for this fork (action_required); no GitHub check results have been reported yet. The failures below are local Windows results. Upstream verify runs on Ubuntu, so its result remains unverified.

Self-check

  • Windows, Rust 1.95.0: cargo test --locked -p horizon-client --lib packs::: 22 passed, 1 ignored.
  • The new regression test fails before the version bump and passes after it.
  • Full self-check: 1,079 tests passed; existing failures remain in crash::tests::stacks_start_at_the_panicking_frame and save::tests::session_lock_is_exclusive.
  • Clippy fails on existing warnings in horizon-world, including collapsible_match and manual_range_contains.
  • Vanilla harnesses and visual game checks were not run because this checkout has no prepared vanilla resources.

pr_ready (tools/pr_ready.py --base HEAD on the-vice, against HEAD at 3a419877b, 1 min 2 s)

Check Result
Scope ✅ 1 files, +73 −2
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ➖ no Python change
rustfmt ✅ (8 s)
clippy ❌ failed (19 s)
tests: horizon-client ❌ 1079 passed, 2 failed (29 s)
doc tests ✅ 0 passed (3 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (no vanilla data here): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 Generated with OpenAI Codex


🔄 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/1799 **Author:** [@cristibctr](https://github.com/cristibctr) **Created:** 10/25/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `codex/fix-1649-resource-pack-cache` --- ### 📝 Commits (1) - [`c756a37`](https://github.com/horizon-rust/horizon/commit/c756a372a3cc5a2a58719187dedfedaef0f39884) Fix stale Windows resource pack overlays ### 📊 Changes **1 file changed** (+73 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/packs/cache.rs` (+73 -2) </details> ### 📄 Description > 🤖 Opened by cristibctr's AI agent (OpenAI Codex), not by cristibctr himself. ## What and why Fixes #1649. Windows overlays created before #1688 can omit untouched vanilla directories, including blockstates and models. The copy fix in #1688 kept cache version 3, so an existing incomplete overlay can still pass cache validation and fail reload with `unbound gallery block state`. Bump the overlay cache version to rebuild those entries. Add a Windows regression test for texture-only folder and ZIP packs: preserve base resources, repair an incomplete version 3 overlay, and reuse the repaired cache. Also open the existing timestamp test file with write access, as Windows requires. ## Vanilla reference Horizon-only filesystem cache repair; no vanilla gameplay behavior changes. No new vanilla classes or methods are ported. ## Baseline comparison Verified in a separate clean worktree at base commit `3a419877b`, on Windows with Rust 1.95.0: | Check | Base commit | PR | | --- | --- | --- | | Clippy: `horizon-world` | 12 errors | Same 12 errors | | `crash::tests::stacks_start_at_the_panicking_frame` | Fails: Windows path formatting | Same failure | | `save::tests::session_lock_is_exclusive` | Fails: Windows locked-file read, OS error 33 | Same failure | | Focused pack tests | — | 22 passed, 1 ignored | The reported Clippy and two remaining test failures are reproducible without this PR. Clippy uses `-D warnings`, so style warnings such as `collapsible_match` and `manual_range_contains` stop the check. The upstream GitHub workflow currently requires maintainer approval for this fork (`action_required`); no GitHub check results have been reported yet. The failures below are local Windows results. Upstream `verify` runs on Ubuntu, so its result remains unverified. ## Self-check - Windows, Rust 1.95.0: `cargo test --locked -p horizon-client --lib packs::`: 22 passed, 1 ignored. - The new regression test fails before the version bump and passes after it. - Full self-check: 1,079 tests passed; existing failures remain in `crash::tests::stacks_start_at_the_panicking_frame` and `save::tests::session_lock_is_exclusive`. - Clippy fails on existing warnings in `horizon-world`, including `collapsible_match` and `manual_range_contains`. - Vanilla harnesses and visual game checks were not run because this checkout has no prepared vanilla resources. **pr_ready** (`tools/pr_ready.py --base HEAD` on the-vice, against HEAD at 3a419877b, 1 min 2 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +73 −2 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ➖ no Python change | | rustfmt | ✅ (8 s) | | clippy | ❌ failed (19 s) | | tests: horizon-client | ❌ 1079 passed, 2 failed (29 s) | | doc tests | ✅ 0 passed (3 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (no vanilla data here): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 Generated with [OpenAI Codex](https://openai.com/codex/) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:12:12 +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#3772
No description provided.