[PR #5094] [MERGED] Resource-pack tests: run under the temp dir with its links resolved (main's launcher job on macOS) #6071

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

📋 Pull Request Information

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

Base: main ← Head: fix/launcher-test-real-temp-dir


📝 Commits (1)

  • a6f30aa Resource-pack tests: run under the temp dir with its links resolved

📊 Changes

2 files changed (+8 additions, -2 deletions)

View changed files

📝 crates/horizon-port-pack/src/resourcepacks/tests.rs (+5 -1)
📝 launcher/src/modpacks.rs (+3 -1)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Main's launcher job has failed on macOS since b49925118. modpacks::tests::resource_only_profile_can_play_without_enabling_or_overwriting_packs fails with /var: not an ordinary directory. resourcepacks::directory (from #4579) refuses a link anywhere in a destination's ancestry, and macOS's temp dir is under /var, which is a link to /private/var. For the same reason, 7 horizon-port-pack resource-pack tests fail on every Mac (CI's verify runs them on Linux only).

This PR is test-only: those tests now run under the temp dir with its links resolved (temp_dir().canonicalize()). It unblocks every PR whose launcher job runs on macOS (#1171 is one).

For @gravitacia and @levzzz5154, not changed here: the same check affects players. A launcher home with a link above it fails to install packs, for example Fedora Silverblue/Kinoite, where /home → /var/home. A pack that can't be installed is now logged and skipped (b49925118), so it doesn't block launch, but the packs are left out. The check probably only needs to cover the part of the path the launcher owns (from the profile or work dir down). You know the threat it guards against better than I do, so I've left that to you.

pr_ready (tools/pr_ready.py --quick on ludovics-mac-mini, against origin/main at c3905131b, 3 min 58 s)

Check Result
Scope ⚠️ 2 files, +8 −2; mixes game, launcher
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 495 passed (2 min 23 s)
rustfmt ✅ (6 s)
clippy ✅ (37 s)
tests: horizon-port-pack ✅ 97 passed (3 s)
doc tests ✅ 0 passed
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ✅ (1 s)
launcher clippy ✅ (16 s)
launcher tests ✅ 305 passed (29 s)
Parity ➖ 1 affected, to run in CI (--quick): lan_integration
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 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/5094 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/launcher-test-real-temp-dir` --- ### 📝 Commits (1) - [`a6f30aa`](https://github.com/horizon-rust/horizon/commit/a6f30aa7630b4cee2ee2efaf38d9bc16440d8552) Resource-pack tests: run under the temp dir with its links resolved ### 📊 Changes **2 files changed** (+8 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-port-pack/src/resourcepacks/tests.rs` (+5 -1) 📝 `launcher/src/modpacks.rs` (+3 -1) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Main's `launcher` job has failed on macOS since b49925118. `modpacks::tests::resource_only_profile_can_play_without_enabling_or_overwriting_packs` fails with `/var: not an ordinary directory`. `resourcepacks::directory` (from #4579) refuses a link anywhere in a destination's ancestry, and macOS's temp dir is under `/var`, which is a link to `/private/var`. For the same reason, 7 `horizon-port-pack` resource-pack tests fail on every Mac (CI's verify runs them on Linux only). This PR is test-only: those tests now run under the temp dir with its links resolved (`temp_dir().canonicalize()`). It unblocks every PR whose launcher job runs on macOS (#1171 is one). **For @gravitacia and @levzzz5154, not changed here:** the same check affects players. A launcher home with a link above it fails to install packs, for example Fedora Silverblue/Kinoite, where `/home` → `/var/home`. A pack that can't be installed is now logged and skipped (b49925118), so it doesn't block launch, but the packs are left out. The check probably only needs to cover the part of the path the launcher owns (from the profile or work dir down). You know the threat it guards against better than I do, so I've left that to you. **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at c3905131b, 3 min 58 s) | Check | Result | | --- | --- | | Scope | ⚠️ 2 files, +8 −2; mixes game, launcher | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 495 passed (2 min 23 s) | | rustfmt | ✅ (6 s) | | clippy | ✅ (37 s) | | tests: horizon-port-pack | ✅ 97 passed (3 s) | | doc tests | ✅ 0 passed | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ✅ (1 s) | | launcher clippy | ✅ (16 s) | | launcher tests | ✅ 305 passed (29 s) | | Parity | ➖ 1 affected, to run in CI (--quick): lan_integration | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 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 06:11:24 +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#6071
No description provided.