[PR #5584] [MERGED] Launcher: play one launch as another signed-in account (#4952) #6367

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5584
Author: @Solenopsisbot
Created: 10/31/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: accounts/play-account


📝 Commits (2)

  • f91628d Launcher: play one launch as another signed-in account
  • 6cc03b3 launcher: client_as's doc names only --account

📊 Changes

6 files changed (+147 additions, -11 deletions)

View changed files

📝 docs/agent-control.md (+1 -1)
📝 docs/launcher-commands.md (+1 -0)
📝 launcher/src/account.rs (+52 -3)
📝 launcher/src/account/tests.rs (+41 -0)
📝 launcher/src/backend.rs (+10 -2)
📝 launcher/src/cli.rs (+42 -5)

📄 Description

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

What and why

Part of #4952 (several accounts from one instance at the same time). This is the per-launch --account choice among signed-in accounts alone, as asked when #5023 was closed. The offline name is gone.

The launcher keeps several Microsoft accounts but plays the one account select picked, which is global. horizon-launcher play --account WHO plays one launch as a signed-in account (name or UUID) and leaves account select's choice as it was, so two terminals can start two games of one instance as two accounts.

  • The owner gate runs as for any launch. What the services renew (tokens, names, skins) is still saved.
  • account::session_for_game_as runs the gate as that account (launch_as), then puts the accounts' choice of player back before saving them.
  • An account that isn't in the launcher is refused. A Java instance refuses the flag, as it refuses --world.

#5513 (--player-dir) gives each such game its own options, logs and server list in a shared game folder.

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

Vanilla reference

None: the launcher's own accounts.

Self-check

pr_ready (tools/pr_ready.py on cytonic, against origin/main at c9d8e3efa, 7 min 30 s)

Check Result
Scope ✅ 6 files, +147 −11
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 510 passed (55 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 ✅ (2 s)
launcher clippy ✅ (4 s)
launcher tests ✅ 342 passed (4 s)
Parity ❌ 7 affected, 5 passed, failed: lan_auth (6 min 24 s)

lan_auth failed on a timeout, not a check. Its cargo test -p horizon-client --lib took more than 180 s compiling from cold in a fresh worktree. Rerun with the build warm, tools/parity.py lan_auth passes (9 s).

New tests:

  • account::tests::a_launch_as_another_account_leaves_the_selected_one: playing as a second account leaves account select's choice alone, and so does refusing an account that isn't in the launcher. No network needed.
  • cli::tests::play_takes_an_account_for_one_launch.

🤖 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/5584 **Author:** [@Solenopsisbot](https://github.com/Solenopsisbot) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `accounts/play-account` --- ### 📝 Commits (2) - [`f91628d`](https://github.com/horizon-rust/horizon/commit/f91628df1043501f39591c6e5e8e6ce3035ba5cb) Launcher: play one launch as another signed-in account - [`6cc03b3`](https://github.com/horizon-rust/horizon/commit/6cc03b30db000c5804015cda69e9bcf4070e12fc) launcher: client_as's doc names only --account ### 📊 Changes **6 files changed** (+147 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `docs/agent-control.md` (+1 -1) 📝 `docs/launcher-commands.md` (+1 -0) 📝 `launcher/src/account.rs` (+52 -3) 📝 `launcher/src/account/tests.rs` (+41 -0) 📝 `launcher/src/backend.rs` (+10 -2) 📝 `launcher/src/cli.rs` (+42 -5) </details> ### 📄 Description > 🤖 Opened by Solenopsisbot's AI agent (Claude Code, Claude Opus 5.5), not by Solenopsisbot personally. ## What and why Part of #4952 (several accounts from one instance at the same time). This is the per-launch `--account` choice among signed-in accounts alone, as asked when #5023 was closed. The offline name is gone. The launcher keeps several Microsoft accounts but plays the one `account select` picked, which is global. `horizon-launcher play --account WHO` plays **one launch** as a signed-in account (name or UUID) and leaves `account select`'s choice as it was, so two terminals can start two games of one instance as two accounts. - The owner gate runs as for any launch. What the services renew (tokens, names, skins) is still saved. - `account::session_for_game_as` runs the gate as that account (`launch_as`), then puts the accounts' choice of player back before saving them. - An account that isn't in the launcher is refused. A Java instance refuses the flag, as it refuses `--world`. #5513 (`--player-dir`) gives each such game its own options, logs and server list in a shared game folder. ## Kind - [ ] parity: Horizon now does what vanilla 26.3 does - [ ] bug: a crash or a breakage - [ ] perf: faster, or less memory - [x] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [ ] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference None: the launcher's own accounts. ## Self-check **pr_ready** (`tools/pr_ready.py` on cytonic, against origin/main at c9d8e3efa, 7 min 30 s) | Check | Result | | --- | --- | | Scope | ✅ 6 files, +147 −11 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 510 passed (55 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 | ✅ (2 s) | | launcher clippy | ✅ (4 s) | | launcher tests | ✅ 342 passed (4 s) | | Parity | ❌ 7 affected, 5 passed, failed: lan_auth (6 min 24 s) | `lan_auth` failed on a timeout, not a check. Its `cargo test -p horizon-client --lib` took more than 180 s compiling from cold in a fresh worktree. Rerun with the build warm, `tools/parity.py lan_auth` passes (9 s). New tests: - `account::tests::a_launch_as_another_account_leaves_the_selected_one`: playing as a second account leaves `account select`'s choice alone, and so does refusing an account that isn't in the launcher. No network needed. - `cli::tests::play_takes_an_account_for_one_launch`. 🤖 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 06:19:17 +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#6367
No description provided.