[PR #1131] [MERGED] A release says its version: horizon-server, horizon-prepare, crash reports and user agents report 0.2.x #3078

Closed
opened 2026-11-02 16:01:20 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: feat/version-sources


📝 Commits (1)

  • 30cdd62 Version sources: a release build says its version (0.2.3), not 0.1.0 or a folder name

📊 Changes

12 files changed (+94 additions, -19 deletions)

View changed files

📝 .github/workflows/release.yml (+14 -3)
📝 crates/horizon-client/src/auth.rs (+1 -1)
📝 crates/horizon-client/src/bin/horizon-ctl/mcp.rs (+1 -1)
📝 crates/horizon-client/src/crash.rs (+23 -6)
📝 crates/horizon-client/src/telemetry.rs (+1 -1)
📝 crates/horizon-core/src/lib.rs (+1 -0)
➕ crates/horizon-core/src/release.rs (+32 -0)
📝 crates/horizon-prepare/src/main.rs (+8 -1)
📝 crates/horizon-server-files/src/profiles.rs (+2 -2)
📝 crates/horizon-server/src/api.rs (+1 -1)
📝 crates/horizon-server/src/main.rs (+8 -1)
📝 launcher/src/perf.rs (+2 -2)

📄 Description

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

Part 5 of 7 of the switch to 0.2 (design: #1126, docs/versioning.md). Safe to merge now: builds from source say what they said; only release builds change, and those are frozen.

What

A release build now says its version: release.yml builds every game release with HORIZON_VERSION = the tag without its v (as launcher.yml already does with HORIZON_LAUNCHER_VERSION), so there are no version-bump commits and a 0.2 build says 0.2.0, not 0.1.0 or a date.

Where Before After (release build)
horizon-server --version, /api/v1/status version 0.1.0 0.2.3
horizon-prepare --version 0.1.0 0.2.3
Horizon/<v> user agent (Microsoft auth, profile lookups) Horizon/0.1.0 Horizon/0.2.3
horizon-ctl MCP serverInfo.version 0.1.0 0.2.3
Crash report "Horizon Version", telemetry version the launcher's folder name (v2026.10.19.15 (client 0.1.0)) v0.2.3, wherever it is installed
Launcher benchmark telemetry Cargo.toml's 0.1.5 the release's version
  • horizon_core::release::{RELEASE, VERSION} (new module; horizon_core::version stays Minecraft's, generated by gen_version_consts.py). horizon-server and horizon-prepare don't depend on horizon-core and have the same three-line const.
  • Releases from before 0.2 (no version built in) still report their folder name.
  • release.yml: decide outputs version; the build job sets HORIZON_VERSION; "Every program starts" now checks that horizon-prepare and horizon-server --version say it, and the server archive's horizon-server too.
  • Cargo.toml versions are unchanged (builds from source say 0.1.0): bumping them changes Cargo.lock and reruns every parity harness for no player-visible gain.

Proof

cargo fmt --all -- --check (and launcher/)                                   ok
cargo clippy -p horizon-core -p horizon-server-files -p horizon-server -p horizon-prepare -p horizon-client --all-targets -- -D warnings   ok
launcher: cargo clippy --features gpui/runtime_shaders --all-targets -- -D warnings                                                    ok
cargo test -p horizon-core release::            1 passed
cargo test -p horizon-client --lib crash::      6 passed, without and with HORIZON_VERSION=0.2.0 (new: a_release_reports_its_built_in_version)
cargo test -p horizon-server -p horizon-prepare -p horizon-server-files   all pass
HORIZON_VERSION=0.2.0 cargo build -p horizon-server -p horizon-prepare:  "horizon-server 0.2.0", "horizon-prepare 0.2.0"; without: "horizon-server 0.1.0"
actionlint release.yml                           only the shellcheck warning main already has

Parity: tools/parity.py server_files (covers horizon-server-files, where the user agent changed): PASS (785 s) on this branch. The other touched lines (consts, user-agent strings, the crash report version) are outside what the vanilla harnesses compare; the CI parity job reruns the harnesses whose probes compile horizon-core and horizon-client.

🤖 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/1131 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/21/2026 **Status:** ✅ Merged **Merged:** 10/22/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/version-sources` --- ### 📝 Commits (1) - [`30cdd62`](https://github.com/horizon-rust/horizon/commit/30cdd6298a6b13b51a34d59b30b80825f11ae7ef) Version sources: a release build says its version (0.2.3), not 0.1.0 or a folder name ### 📊 Changes **12 files changed** (+94 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/release.yml` (+14 -3) 📝 `crates/horizon-client/src/auth.rs` (+1 -1) 📝 `crates/horizon-client/src/bin/horizon-ctl/mcp.rs` (+1 -1) 📝 `crates/horizon-client/src/crash.rs` (+23 -6) 📝 `crates/horizon-client/src/telemetry.rs` (+1 -1) 📝 `crates/horizon-core/src/lib.rs` (+1 -0) ➕ `crates/horizon-core/src/release.rs` (+32 -0) 📝 `crates/horizon-prepare/src/main.rs` (+8 -1) 📝 `crates/horizon-server-files/src/profiles.rs` (+2 -2) 📝 `crates/horizon-server/src/api.rs` (+1 -1) 📝 `crates/horizon-server/src/main.rs` (+8 -1) 📝 `launcher/src/perf.rs` (+2 -2) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. **Part 5 of 7 of the switch to 0.2** (design: #1126, docs/versioning.md). Safe to merge now: builds from source say what they said; only release builds change, and those are frozen. ## What A release build now says its version: release.yml builds every game release with `HORIZON_VERSION` = the tag without its `v` (as launcher.yml already does with `HORIZON_LAUNCHER_VERSION`), so there are no version-bump commits and a 0.2 build says `0.2.0`, not `0.1.0` or a date. | Where | Before | After (release build) | | --- | --- | --- | | `horizon-server --version`, `/api/v1/status` `version` | `0.1.0` | `0.2.3` | | `horizon-prepare --version` | `0.1.0` | `0.2.3` | | `Horizon/<v>` user agent (Microsoft auth, profile lookups) | `Horizon/0.1.0` | `Horizon/0.2.3` | | `horizon-ctl` MCP `serverInfo.version` | `0.1.0` | `0.2.3` | | Crash report "Horizon Version", telemetry `version` | the launcher's folder name (`v2026.10.19.15 (client 0.1.0)`) | `v0.2.3`, wherever it is installed | | Launcher benchmark telemetry | Cargo.toml's `0.1.5` | the release's version | - `horizon_core::release::{RELEASE, VERSION}` (new module; `horizon_core::version` stays Minecraft's, generated by `gen_version_consts.py`). `horizon-server` and `horizon-prepare` don't depend on horizon-core and have the same three-line const. - Releases from before 0.2 (no version built in) still report their folder name. - `release.yml`: `decide` outputs `version`; the build job sets `HORIZON_VERSION`; "Every program starts" now checks that `horizon-prepare` and `horizon-server --version` say it, and the server archive's `horizon-server` too. - Cargo.toml versions are unchanged (builds from source say `0.1.0`): bumping them changes Cargo.lock and reruns every parity harness for no player-visible gain. ## Proof ``` cargo fmt --all -- --check (and launcher/) ok cargo clippy -p horizon-core -p horizon-server-files -p horizon-server -p horizon-prepare -p horizon-client --all-targets -- -D warnings ok launcher: cargo clippy --features gpui/runtime_shaders --all-targets -- -D warnings ok cargo test -p horizon-core release:: 1 passed cargo test -p horizon-client --lib crash:: 6 passed, without and with HORIZON_VERSION=0.2.0 (new: a_release_reports_its_built_in_version) cargo test -p horizon-server -p horizon-prepare -p horizon-server-files all pass HORIZON_VERSION=0.2.0 cargo build -p horizon-server -p horizon-prepare: "horizon-server 0.2.0", "horizon-prepare 0.2.0"; without: "horizon-server 0.1.0" actionlint release.yml only the shellcheck warning main already has ``` Parity: `tools/parity.py server_files` (covers horizon-server-files, where the user agent changed): **PASS** (785 s) on this branch. The other touched lines (consts, user-agent strings, the crash report version) are outside what the vanilla harnesses compare; the CI parity job reruns the harnesses whose probes compile horizon-core and horizon-client. 🤖 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-02 16:01:20 +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#3078
No description provided.