[PR #5507] [CLOSED] Launcher: the AppImage test on Windows, and less plumbing around it #6324

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5507
Author: @dacrab
Created: 10/31/2026
Status: ❌ Closed

Base: main ← Head: launcher-appimage-followups


📝 Commits (1)

  • 334fd82 Launcher: the AppImage test on Windows, and less plumbing around it

📊 Changes

2 files changed (+36 additions, -61 deletions)

View changed files

📝 .github/workflows/launcher.yml (+1 -2)
📝 launcher/src/backend.rs (+35 -59)

📄 Description

🤖 Opened by dacrab's AI agent (OpenCode, DeepSeek V4.1 Flash 1017), not by dacrab personally.

Follow-up to #3670: it makes the launcher job green on Windows and leaves less code behind than the merge did.
2 files, +36 −61.

Restacked on main. While this was open, main fixed the completions reference itself (8ef7b133f), so the
branch no longer carries docs/launcher-commands.md; the rebase dropped that hunk.

The Windows failure

backend::tests::only_an_appimage_file_counts (the test as merged in 90d3576) fails on Windows only:
appimage_path_in requires an absolute $APPDIR, and /tmp/.mount_Horizon123 is not absolute there, so the
assertion that a real file under that mount counts fails. The fixtures now come from std::env::temp_dir(), so the
test says the same thing on every platform; the production path is unchanged (it is Linux-only).

What shrank

before after
launcher_asset_running_from(bool): a bool-parameter function whose only caller passes appimage_path().is_some(), existing to be unit-testable inlined into launcher_asset() as a match
an_appimage_updates_with_the_appimage: asserted the cfg const against itself, and against a copy of its own value on Linux, i.e. no behaviour removed; what decides between the two assets is the path test
LAUNCHER_APPIMAGE_ASSET: two #[cfg] items, pub, used once one private cfg! const
only_an_appimage_file_counts: four near-identical assert_eq!s on literals, Windows-unportable one ours() closure over temp-dir fixtures
launcher.yml: version= computed in the macOS branch and again in the else branch computed once, above the if

What I left alone

packaging/linux/appimage.sh (143 lines) and the workflow step that calls it, launcher/README.md,
tools/release_train.py, and the roadmap entries. Each has a job: the AppDir, the patchelf run paths, AppRun,
the desktop entry and icon, the pinned appimagetool with its SHA-256, the --version smoke run before uploading;
then the packaging paths release_train must watch, and the roadmap item the AppImage completes. There is no second
copy of any of it to remove.

Checks

pr_ready (tools/pr_ready.py --quick --base upstream/main on fedora, against upstream/main at a4873dec4, 3 min 18 s)

Check Result
Scope ⚠️ 2 files, +36 −61; mixes CI, launcher
Cargo.lock ✅ unchanged
Public tree ✅ (1 s)
Python tests ✅ 510 passed (2 min 2 s)
rustfmt ➖ no Rust change
clippy ➖ no Rust change
tests ➖ no crate touched
doc tests ➖ no crate touched
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ✅ (3 s)
launcher clippy ✅ (13 s)
launcher tests ✅ 340 passed (58 s)
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)

I also ran the launcher's whole suite (cd launcher && cargo test --locked, integration and doc tests included) on
this same launcher code and it passes.

I can't add labels (no triage rights): this is skip-release, players see no change.

🤖 Generated with OpenCode, model DeepSeek V4.1 Flash 1017.


🔄 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/5507 **Author:** [@dacrab](https://github.com/dacrab) **Created:** 10/31/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `launcher-appimage-followups` --- ### 📝 Commits (1) - [`334fd82`](https://github.com/horizon-rust/horizon/commit/334fd822916c952fd57ac4a9e8b0de62e81b6c3b) Launcher: the AppImage test on Windows, and less plumbing around it ### 📊 Changes **2 files changed** (+36 additions, -61 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/launcher.yml` (+1 -2) 📝 `launcher/src/backend.rs` (+35 -59) </details> ### 📄 Description > 🤖 Opened by dacrab's AI agent (OpenCode, DeepSeek V4.1 Flash 1017), not by dacrab personally. Follow-up to #3670: it makes the launcher job green on Windows and leaves less code behind than the merge did. 2 files, +36 −61. **Restacked on main.** While this was open, main fixed the `completions` reference itself (`8ef7b133f`), so the branch no longer carries `docs/launcher-commands.md`; the rebase dropped that hunk. ## The Windows failure `backend::tests::only_an_appimage_file_counts` (the test as merged in `90d3576`) fails on Windows only: `appimage_path_in` requires an absolute `$APPDIR`, and `/tmp/.mount_Horizon123` is not absolute there, so the assertion that a real file under that mount counts fails. The fixtures now come from `std::env::temp_dir()`, so the test says the same thing on every platform; the production path is unchanged (it is Linux-only). ## What shrank | before | after | |---|---| | `launcher_asset_running_from(bool)`: a bool-parameter function whose only caller passes `appimage_path().is_some()`, existing to be unit-testable | inlined into `launcher_asset()` as a `match` | | `an_appimage_updates_with_the_appimage`: asserted the `cfg` const against itself, and against a copy of its own value on Linux, i.e. no behaviour | removed; what decides between the two assets is the path test | | `LAUNCHER_APPIMAGE_ASSET`: two `#[cfg]` items, `pub`, used once | one private `cfg!` const | | `only_an_appimage_file_counts`: four near-identical `assert_eq!`s on literals, Windows-unportable | one `ours()` closure over temp-dir fixtures | | `launcher.yml`: `version=` computed in the macOS branch and again in the else branch | computed once, above the `if` | ## What I left alone `packaging/linux/appimage.sh` (143 lines) and the workflow step that calls it, `launcher/README.md`, `tools/release_train.py`, and the roadmap entries. Each has a job: the AppDir, the `patchelf` run paths, `AppRun`, the desktop entry and icon, the pinned appimagetool with its SHA-256, the `--version` smoke run before uploading; then the packaging paths release_train must watch, and the roadmap item the AppImage completes. There is no second copy of any of it to remove. ## Checks **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on fedora, against upstream/main at a4873dec4, 3 min 18 s) | Check | Result | | --- | --- | | Scope | ⚠️ 2 files, +36 −61; mixes CI, launcher | | Cargo.lock | ✅ unchanged | | Public tree | ✅ (1 s) | | Python tests | ✅ 510 passed (2 min 2 s) | | rustfmt | ➖ no Rust change | | clippy | ➖ no Rust change | | tests | ➖ no crate touched | | doc tests | ➖ no crate touched | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ✅ (3 s) | | launcher clippy | ✅ (13 s) | | launcher tests | ✅ 340 passed (58 s) | | 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) | I also ran the launcher's whole suite (`cd launcher && cargo test --locked`, integration and doc tests included) on this same launcher code and it passes. I can't add labels (no triage rights): this is `skip-release`, players see no change. 🤖 Generated with [OpenCode](https://opencode.ai), model DeepSeek V4.1 Flash 1017. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:18:16 +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#6324
No description provided.