[PR #5180] [MERGED] horizon-server: the launchd test no longer assumes / in paths #6123

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

📋 Pull Request Information

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

Base: main ← Head: fix/service-test-windows


📝 Commits (1)

  • 095c6c4 horizon-server: the launchd test no longer assumes / in paths

📊 Changes

1 file changed (+12 additions, -1 deletions)

View changed files

📝 crates/horizon-server/src/service.rs (+12 -1)

📄 Description

🤖 Opened by both Akirabane's AI agent (Claude Code) and Akirabane himself, after his review.

What and why

service::tests::units_run_the_supervisor failed on Windows: its second launchd assertion expected /srv/R&D/logs/supervisor.log, but launchd_plist builds that path with dir.join("logs/supervisor.log"), which Windows prints as /srv/R&D\logs/supervisor.log. The code is right (the launchd agent only exists on macOS); the test assumed the separator. CI never ran it there (game-build.yml only builds on windows-latest), so only a Windows contributor running pr_ready saw the tests row go red, whatever their change.

The test now builds the expected string from the same Path::join, with the & escaped as &, so it checks the same thing on every OS. The literal macOS path is still asserted, under #[cfg(unix)], so the computed check can't hide a wrong path. Nothing changes in launchd_plist or in the game.

Fixes #5168

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Players see no change: skip-release, if a maintainer sets it.

Vanilla reference

none (a test only)

Other projects' code

none

Self-check

pr_ready (tools/pr_ready.py --quick on DESKTOP-6PU1HU6, against origin/main at 68ac6f647, 1 min 40 s)

Check Result
Scope ✅ 1 files, +12 −1
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 495 run, FAILED (errors=1, skipped=12) (46 s)
rustfmt ✅ (7 s)
clippy ✅ (33 s)
tests: horizon-server ❌ 54 passed, 1 failed (13 s)
doc tests ➖ no library 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 (--quick): 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)

Checked by hand on Windows 11: cargo test -p horizon-server passes (55 passed, 1 ignored: the test that creates a real scheduled task), twice in a row, and cargo clippy -p horizon-server --all-targets -- -D warnings is clean. In the pr_ready run above one other test, http::tests::a_line_past_the_limit_is_a_400, failed once: it floods a socket and reads the 400 back, so a reset by the server's close under load (the race its own comment names) empties the reply. It passed 10 runs out of 10 on its own afterwards, and it is not touched here. The Python tests fail on my machine for a local reason (a package named tests in my global site-packages shadows the repository's tests/ folder), which is not part of this change; they pass on CI.


🔄 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/5180 **Author:** [@Akirabane](https://github.com/Akirabane) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `fix/service-test-windows` --- ### 📝 Commits (1) - [`095c6c4`](https://github.com/horizon-rust/horizon/commit/095c6c48cd7c5fc2f8b045bdf32aa8a8ef3bec30) horizon-server: the launchd test no longer assumes `/` in paths ### 📊 Changes **1 file changed** (+12 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-server/src/service.rs` (+12 -1) </details> ### 📄 Description > 🤖 Opened by both Akirabane's AI agent (Claude Code) and Akirabane himself, after his review. ## What and why `service::tests::units_run_the_supervisor` failed on Windows: its second launchd assertion expected `/srv/R&amp;D/logs/supervisor.log`, but `launchd_plist` builds that path with `dir.join("logs/supervisor.log")`, which Windows prints as `/srv/R&D\logs/supervisor.log`. The code is right (the launchd agent only exists on macOS); the test assumed the separator. CI never ran it there (`game-build.yml` only builds on `windows-latest`), so only a Windows contributor running `pr_ready` saw the `tests` row go red, whatever their change. The test now builds the expected string from the same `Path::join`, with the `&` escaped as `&amp;`, so it checks the same thing on every OS. The literal macOS path is still asserted, under `#[cfg(unix)]`, so the computed check can't hide a wrong path. Nothing changes in `launchd_plist` or in the game. Fixes #5168 ## Kind - [ ] parity: Horizon now does what vanilla 26.3 does - [ ] bug: a crash or a breakage - [ ] perf: faster, or less memory - [ ] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [x] tooling: tools, CI, tests, harnesses - [ ] docs Players see no change: `skip-release`, if a maintainer sets it. ## Vanilla reference none (a test only) ## Other projects' code none ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on DESKTOP-6PU1HU6, against origin/main at 68ac6f647, 1 min 40 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +12 −1 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 495 run, FAILED (errors=1, skipped=12) (46 s) | | rustfmt | ✅ (7 s) | | clippy | ✅ (33 s) | | tests: horizon-server | ❌ 54 passed, 1 failed (13 s) | | doc tests | ➖ no library 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 (--quick): 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) | Checked by hand on Windows 11: `cargo test -p horizon-server` passes (55 passed, 1 ignored: the test that creates a real scheduled task), twice in a row, and `cargo clippy -p horizon-server --all-targets -- -D warnings` is clean. In the `pr_ready` run above one other test, `http::tests::a_line_past_the_limit_is_a_400`, failed once: it floods a socket and reads the 400 back, so a reset by the server's close under load (the race its own comment names) empties the reply. It passed 10 runs out of 10 on its own afterwards, and it is not touched here. The Python tests fail on my machine for a local reason (a package named `tests` in my global `site-packages` shadows the repository's `tests/` folder), which is not part of this change; they pass on CI. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:12: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#6123
No description provided.