[PR #1666] [MERGED] Make execution roles explicit #3671

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1666
Author: @rdbtCVS
Created: 10/24/2026
Status: ✅ Merged
Merged: 10/25/2026
Merged by: @ludovic111

Base: main ← Head: t3/explicit-execution-roles


📝 Commits (1)

  • 0d1736d Make startup and world-loading execution roles explicit

📊 Changes

6 files changed (+76 additions, -27 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+20 -12)
➕ crates/horizon-client/src/game/execution_role.rs (+39 -0)
📝 crates/horizon-client/src/game/integrated.rs (+3 -7)
📝 crates/horizon-client/src/game/levels.rs (+2 -2)
📝 crates/horizon-client/src/game/world_loading.rs (+1 -1)
📝 docs/server-levels.md (+11 -5)

📄 Description

🤖 Opened by rdbtCVS's AI agent (OpenAI Codex, GPT-6.1).

What and why

Introduce explicit Client, IntegratedServer and DedicatedServer execution roles, selected before constructing each Game. Startup dispatch, server-thread world selection, chunk meshing, loading progress and opening server dimensions now use the role instead of inferring it from dedicated-server arguments.

Connection state remains in remote: joining or leaving a server does not change the client's role. --in-frame, --no-server-thread and HORIZON_SERVER_THREAD=0 still select client-side in-frame simulation. Both server roles avoid spawning another integrated server and skip presentation work.

The integrated server retains its legacy options.dedicated marker for gameplay conditionals outside this scope. Unrelated conditionals and the coverage blockers in #1567 are untouched. Adds a role-selection regression test and updates the server-level documentation. Six files, +76 / −27 lines; no intended player-visible behavior change.

Vanilla reference

Internal execution-role refactor; no vanilla gameplay rule changes or new oracle needed. Existing client / integrated-server / dedicated-server behavior is preserved. No vanilla sources were required for this structural change.

Self-check

pr_ready (tools/pr_ready.py on archlinux, against origin/main at de840da0e, 57 s)

Check Result
Scope ✅ 6 files, +76 −27
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ➖ no Python change
rustfmt ✅ (7 s)
clippy ✅ (16 s)
tests: horizon-client ✅ 1198 passed (30 s)
doc tests ✅ 0 passed (4 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (no vanilla data here): 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)

git diff --check also passed. Runtime parity and real-client integration runs were not performed: this checkout has no prepared vanilla data. Those checks remain for CI; this PR does not address existing coverage blockers.

🤖 Generated with OpenAI Codex.


🔄 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/1666 **Author:** [@rdbtCVS](https://github.com/rdbtCVS) **Created:** 10/24/2026 **Status:** ✅ Merged **Merged:** 10/25/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `t3/explicit-execution-roles` --- ### 📝 Commits (1) - [`0d1736d`](https://github.com/horizon-rust/horizon/commit/0d1736da8ffd016b4e66624d4ea87c34015cf1a7) Make startup and world-loading execution roles explicit ### 📊 Changes **6 files changed** (+76 additions, -27 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+20 -12) ➕ `crates/horizon-client/src/game/execution_role.rs` (+39 -0) 📝 `crates/horizon-client/src/game/integrated.rs` (+3 -7) 📝 `crates/horizon-client/src/game/levels.rs` (+2 -2) 📝 `crates/horizon-client/src/game/world_loading.rs` (+1 -1) 📝 `docs/server-levels.md` (+11 -5) </details> ### 📄 Description > 🤖 Opened by rdbtCVS's AI agent (OpenAI Codex, GPT-6.1). ## What and why Introduce explicit `Client`, `IntegratedServer` and `DedicatedServer` execution roles, selected before constructing each `Game`. Startup dispatch, server-thread world selection, chunk meshing, loading progress and opening server dimensions now use the role instead of inferring it from dedicated-server arguments. Connection state remains in `remote`: joining or leaving a server does not change the client's role. `--in-frame`, `--no-server-thread` and `HORIZON_SERVER_THREAD=0` still select client-side in-frame simulation. Both server roles avoid spawning another integrated server and skip presentation work. The integrated server retains its legacy `options.dedicated` marker for gameplay conditionals outside this scope. Unrelated conditionals and the coverage blockers in #1567 are untouched. Adds a role-selection regression test and updates the server-level documentation. Six files, +76 / −27 lines; no intended player-visible behavior change. ## Vanilla reference Internal execution-role refactor; no vanilla gameplay rule changes or new oracle needed. Existing client / integrated-server / dedicated-server behavior is preserved. No vanilla sources were required for this structural change. ## Self-check **pr_ready** (`tools/pr_ready.py` on archlinux, against origin/main at de840da0e, 57 s) | Check | Result | | --- | --- | | Scope | ✅ 6 files, +76 −27 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ➖ no Python change | | rustfmt | ✅ (7 s) | | clippy | ✅ (16 s) | | tests: horizon-client | ✅ 1198 passed (30 s) | | doc tests | ✅ 0 passed (4 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (no vanilla data here): 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) | `git diff --check` also passed. Runtime parity and real-client integration runs were not performed: this checkout has no prepared vanilla data. Those checks remain for CI; this PR does not address existing coverage blockers. 🤖 Generated with [OpenAI Codex](https://openai.com/codex/). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:11:19 +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#3671
No description provided.