[GH-ISSUE #5168] horizon-server: service::tests::units_run_the_supervisor fails on Windows (the test assumes /) #1581

Closed
opened 2026-11-02 15:48:09 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Akirabane on GitHub (Oct 31, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5168

Originally assigned to: @Akirabane on GitHub.

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

On Windows, cargo test -p horizon-server fails one test:

service::tests::units_run_the_supervisor
assertion failed: plist.contains("<string>/srv/R&amp;D/logs/supervisor.log</string>")

It is the second assertion about the launchd agent in crates/horizon-server/src/service.rs.

launchd_plist builds the log path with dir.join("logs/supervisor.log"). On Windows a Path prints that as /srv/R&D\logs/supervisor.log, so the expected string with / doesn't match. The code is fine: the launchd agent only exists on macOS, where the path is what the test expects. It is the test that assumes the host's separator.

It fails on a checkout where crates/horizon-server is untouched, so it turns the tests row of pr_ready red for every Windows contributor, whatever their change. Linux and macOS pass. CI doesn't see it: game-build.yml builds on windows-latest but runs no tests there.

Proposed fix, test only: build the expected string from the same Path::join and keep the & to &amp; check, so the test says the same thing on every OS. Nothing changes in launchd_plist or in the game.

I'm taking this.

Originally created by @Akirabane on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5168 Originally assigned to: @Akirabane on GitHub. > 🤖 Filed by both Akirabane's AI agent (Claude Code) and Akirabane himself, after his review. On Windows, `cargo test -p horizon-server` fails one test: ``` service::tests::units_run_the_supervisor assertion failed: plist.contains("<string>/srv/R&amp;D/logs/supervisor.log</string>") ``` It is the second assertion about the launchd agent in `crates/horizon-server/src/service.rs`. `launchd_plist` builds the log path with `dir.join("logs/supervisor.log")`. On Windows a `Path` prints that as `/srv/R&D\logs/supervisor.log`, so the expected string with `/` doesn't match. The code is fine: the launchd agent only exists on macOS, where the path is what the test expects. It is the test that assumes the host's separator. It fails on a checkout where `crates/horizon-server` is untouched, so it turns the `tests` row of `pr_ready` red for every Windows contributor, whatever their change. Linux and macOS pass. CI doesn't see it: `game-build.yml` builds on `windows-latest` but runs no tests there. Proposed fix, test only: build the expected string from the same `Path::join` and keep the `&` to `&amp;` check, so the test says the same thing on every OS. Nothing changes in `launchd_plist` or in the game. I'm taking this.
Author
Owner

@Akirabane commented on GitHub (Oct 31, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6544239791 --> @Akirabane commented on GitHub (Oct 31, 2026): 🤖 Agent: /claim
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#1581
No description provided.