[PR #3574] [MERGED] horizon-prepare: --complete and --progress json (#3545) #5064

Closed
opened 2026-11-03 05:09:58 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: feat/launch-api-prepare-complete


📝 Commits (10+)

  • da7aa1f horizon-prepare: --output and --check (#3545)
  • 8dfd374 horizon-prepare: name check's extras type for clippy
  • 82cf891 horizon-prepare: --complete and --progress json (#3545)
  • 6f0f282 horizon-prepare: lock a folder while preparing, unstamp before writing (#3545)
  • 83fadad Merge branch 'feat/launch-api-prepare' into feat/launch-api-prepare-complete
  • 8dbde81 Merge branch 'feat/launch-api-client' into feat/launch-api-prepare-complete
  • a91acdd Launch API: document horizon-prepare's output and --progress json (#3545)
  • 8311857 docs: put --complete and --progress json back in native-client.md
  • c83cf8c Merge remote-tracking branch 'upstream/main' into feat/launch-api-prepare
  • 277b7ee Merge main; refill_own_store asks missing_extras too

📊 Changes

14 files changed (+687 additions, -121 deletions)

View changed files

➕ crates/horizon-prepare/src/check.rs (+227 -0)
📝 crates/horizon-prepare/src/exporters.rs (+1 -1)
📝 crates/horizon-prepare/src/java.rs (+8 -1)
📝 crates/horizon-prepare/src/lib.rs (+151 -9)
📝 crates/horizon-prepare/src/main.rs (+173 -24)
📝 crates/horizon-prepare/src/sounds.rs (+43 -29)
📝 crates/horizon-prepare/src/worker.rs (+2 -0)
📝 docs/api/README.md (+1 -1)
📝 docs/api/launch.md (+38 -6)
📝 docs/api/stability.md (+2 -2)
📝 docs/native-client.md (+18 -0)
📝 launcher/src/backend.rs (+14 -45)
📝 tests/test_prepare_output.py (+2 -0)
📝 tools/prepare_output.py (+7 -3)

📄 Description

🤖 Opened by GIGABAIT93's AI agent (Claude Code, Claude Opus 5.5), not by GIGABAIT93 directly.

What and why

The third part of #3545. Builds on #3567 (--output, --check): until that one is merged this diff shows its commits too; the change of its own is the last commit, 82cf8916e (3 files, +149 −8).

  • --complete: prepares, copies the sounds into the same resources, then fails (exit 1) unless --check would pass, printing each gap. One command for resources the game plays with nothing missing: without the sounds step the game is silent, which another launcher can easily miss. Not accepted with the asset commands.
  • --progress json: one JSON object a line on stdout instead of plain text: {"message": …} for each log line, {"fraction": F} (0 to 1) as each stage begins and at the end, {"error": …} on failure (the error also stays on stderr). Any other value is refused (exit 2).
  • The fraction counts the 18 stages of steps(), each opened by Run::stage(); a test keeps STAGES equal to the run.stage() calls in steps(). With --complete the preparation takes 0 to 0.9 and the sounds and check the rest.
  • prepare_with_progress(options, log, progress) is new; prepare keeps its signature, so the launcher is unchanged.
  • docs/native-client.md and the help text describe both.

Tested on Windows: panorama --output O --progress json prints {"message": "Panorama assets ready: …"} then {"fraction": 1.000}; --progress xml exits 2; a preparation that fails prints {"error": "client artifact checksum changed; prepare again with --prepare"}. A full preparation with progress was not run here (it needs Java 25; this machine has 21).

Suggested label: feature.

Vanilla reference

None: Horizon-only tooling (the preparer's command line).

Self-check

Run on Linux (WSL2), against #3567's branch, so it covers this change alone.

pr_ready (tools/pr_ready.py --quick --base origin/feat/launch-api-prepare on GIGABAIT, against origin/feat/launch-api-prepare at 8dfd37428, 57 s)

Check Result
Scope ✅ 3 files, +149 −8
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 408 passed (31 s)
rustfmt ✅ (7 s)
clippy ✅ (2 s)
tests: horizon-prepare ✅ 45 passed (2 s)
doc tests ✅ 0 passed
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ✅ (1 s)
launcher clippy ✅ (6 s)
launcher tests ✅ 249 passed (8 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)

🤖 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/3574 **Author:** [@GIGABAIT93](https://github.com/GIGABAIT93) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/launch-api-prepare-complete` --- ### 📝 Commits (10+) - [`da7aa1f`](https://github.com/horizon-rust/horizon/commit/da7aa1f73b129b2f41c86e4b1f1a000c9f744616) horizon-prepare: --output and --check (#3545) - [`8dfd374`](https://github.com/horizon-rust/horizon/commit/8dfd37428a22fa110e5fd0c99adf08ae6c699b3e) horizon-prepare: name check's extras type for clippy - [`82cf891`](https://github.com/horizon-rust/horizon/commit/82cf8916e2aafda2c9af4b73045b68f24d930ce3) horizon-prepare: --complete and --progress json (#3545) - [`6f0f282`](https://github.com/horizon-rust/horizon/commit/6f0f282cf1023ed15b64296bdcc521fe9660f2f7) horizon-prepare: lock a folder while preparing, unstamp before writing (#3545) - [`83fadad`](https://github.com/horizon-rust/horizon/commit/83fadad7bfd74d2f94e25ec4d313d37d8d219b29) Merge branch 'feat/launch-api-prepare' into feat/launch-api-prepare-complete - [`8dbde81`](https://github.com/horizon-rust/horizon/commit/8dbde815baccbd00e3bda55922f022796de0b9b9) Merge branch 'feat/launch-api-client' into feat/launch-api-prepare-complete - [`a91acdd`](https://github.com/horizon-rust/horizon/commit/a91acdd348bdbc8fd05adff998087fa915f7f8ec) Launch API: document horizon-prepare's output and --progress json (#3545) - [`8311857`](https://github.com/horizon-rust/horizon/commit/8311857928f5c10287b812af8448b7e3601d64a8) docs: put --complete and --progress json back in native-client.md - [`c83cf8c`](https://github.com/horizon-rust/horizon/commit/c83cf8cbed554fd4a26c71e63cc3a312ff21e4f3) Merge remote-tracking branch 'upstream/main' into feat/launch-api-prepare - [`277b7ee`](https://github.com/horizon-rust/horizon/commit/277b7ee5da3677efe02fb99a120066193a4918e2) Merge main; refill_own_store asks missing_extras too ### 📊 Changes **14 files changed** (+687 additions, -121 deletions) <details> <summary>View changed files</summary> ➕ `crates/horizon-prepare/src/check.rs` (+227 -0) 📝 `crates/horizon-prepare/src/exporters.rs` (+1 -1) 📝 `crates/horizon-prepare/src/java.rs` (+8 -1) 📝 `crates/horizon-prepare/src/lib.rs` (+151 -9) 📝 `crates/horizon-prepare/src/main.rs` (+173 -24) 📝 `crates/horizon-prepare/src/sounds.rs` (+43 -29) 📝 `crates/horizon-prepare/src/worker.rs` (+2 -0) 📝 `docs/api/README.md` (+1 -1) 📝 `docs/api/launch.md` (+38 -6) 📝 `docs/api/stability.md` (+2 -2) 📝 `docs/native-client.md` (+18 -0) 📝 `launcher/src/backend.rs` (+14 -45) 📝 `tests/test_prepare_output.py` (+2 -0) 📝 `tools/prepare_output.py` (+7 -3) </details> ### 📄 Description > 🤖 Opened by GIGABAIT93's AI agent (Claude Code, Claude Opus 5.5), not by GIGABAIT93 directly. ## What and why The third part of #3545. **Builds on #3567** (`--output`, `--check`): until that one is merged this diff shows its commits too; the change of its own is the last commit, 82cf8916e (3 files, +149 −8). - `--complete`: prepares, copies the sounds into the same resources, then fails (exit 1) unless `--check` would pass, printing each gap. One command for resources the game plays with nothing missing: without the `sounds` step the game is silent, which another launcher can easily miss. Not accepted with the asset commands. - `--progress json`: one JSON object a line on stdout instead of plain text: `{"message": …}` for each log line, `{"fraction": F}` (0 to 1) as each stage begins and at the end, `{"error": …}` on failure (the error also stays on stderr). Any other value is refused (exit 2). - The fraction counts the 18 stages of `steps()`, each opened by `Run::stage()`; a test keeps `STAGES` equal to the `run.stage()` calls in `steps()`. With `--complete` the preparation takes 0 to 0.9 and the sounds and check the rest. - `prepare_with_progress(options, log, progress)` is new; `prepare` keeps its signature, so the launcher is unchanged. - `docs/native-client.md` and the help text describe both. Tested on Windows: `panorama --output O --progress json` prints `{"message": "Panorama assets ready: …"}` then `{"fraction": 1.000}`; `--progress xml` exits 2; a preparation that fails prints `{"error": "client artifact checksum changed; prepare again with --prepare"}`. A full preparation with progress was not run here (it needs Java 25; this machine has 21). Suggested label: `feature`. ## Vanilla reference None: Horizon-only tooling (the preparer's command line). ## Self-check Run on Linux (WSL2), against #3567's branch, so it covers this change alone. **pr_ready** (`tools/pr_ready.py --quick --base origin/feat/launch-api-prepare` on GIGABAIT, against origin/feat/launch-api-prepare at 8dfd37428, 57 s) | Check | Result | | --- | --- | | Scope | ✅ 3 files, +149 −8 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 408 passed (31 s) | | rustfmt | ✅ (7 s) | | clippy | ✅ (2 s) | | tests: horizon-prepare | ✅ 45 passed (2 s) | | doc tests | ✅ 0 passed | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ✅ (1 s) | | launcher clippy | ✅ (6 s) | | launcher tests | ✅ 249 passed (8 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) | 🤖 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 05:09:58 +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#5064
No description provided.