[PR #1955] [MERGED] Migrate game parity fixtures to the server thread #3889

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

📋 Pull Request Information

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

Base: main ← Head: t3/migrate-parity-server-thread


📝 Commits (2)

  • 2820697 Move parity fixtures onto server execution
  • a4eefb0 Merge remote-tracking branch 'origin/main' into cg15/1955

📊 Changes

16 files changed (+338 additions, -56 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+9 -13)
📝 crates/horizon-client/src/game/command_harness.rs (+114 -27)
📝 crates/horizon-client/src/game/commands.rs (+2 -1)
📝 crates/horizon-client/src/game/commands/extra.rs (+25 -3)
📝 crates/horizon-client/src/game/dispense_fixture.rs (+4 -0)
📝 crates/horizon-client/src/game/integrated.rs (+54 -3)
📝 crates/horizon-client/src/game/levels.rs (+15 -3)
📝 crates/horizon-client/src/game/remote.rs (+17 -0)
📝 crates/horizon-client/src/game/sculk_fixture.rs (+4 -0)
📝 crates/horizon-client/src/game/server_travel.rs (+1 -1)
📝 docs/parity-workflow.md (+28 -0)
📝 tools/command_exec_corpus.py (+22 -1)
📝 tools/lan_e2e.py (+39 -0)
📝 tools/test_command_exec_parity.py (+2 -2)
📝 tools/test_dispenser_parity.py (+1 -1)
📝 tools/test_sculk_parity.py (+1 -1)

📄 Description

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

What and why

Related migration: #1909 moves LAN/friends integration coverage to server-thread hosting. This PR moves the Rust command, dispenser and sculk fixtures onto server execution; its connected sculk regression covers container-open activation and shrieker replication.

The command, dispenser and sculk parity fixtures now execute authoritative work on a server Game, preparing them for removal of --in-frame.

Command scripts join a real headless client through the memory connection, run commands with the connected owner's body and level, advance explicit ticks through tick_server, and use server portal travel. The client acknowledges terrain and teleports without predicting movement. Script and save failures propagate through server shutdown. Dispenser and sculk remain component probes with synthetic worlds, seeded random streams and explicit phase order, constructed on a server thread.

The migration exposed three server defects covered by the command oracle: an unpublished owner's /kick could remove its own connection; returning to a parked dimension retained another dimension's locate generator; and dirty waypoint attributes retained the temporary player slot instead of the guest's connection. These are fixed here.

Fixture setup finishes requested terrain before inspections. The oversized-fill failure case uses a guaranteed unloaded corner, and the random-command group clears preceding loot streams before testing its own sequences. Java oracles, comparison masks and callback assertions are unchanged. A new clock regression checks exact tick advancement and the single connected owner; a connected guest opens a chest and both clients observe the sculk sensor and shrieker activate and reset.

Vanilla reference

26.3 KickCommand.kickPlayers, LocateCommand.locateBiome, and MinecraftServer.createLevels (REA), plus VanillaCommandExecOracle's explicit LivingEntity.refreshDirtyAttributes handling. Existing VanillaDispenserOracle and VanillaSculkOracle retain their component phases and seeded comparisons.

Self-check

  • Command execution: 851/851, followed by five fresh-world repeats, all 851/851; alternating runs set legacy in-frame flags while the fixture still uses its server thread.
  • Invalid server script: nonzero failure reaches the client process.
  • Dispenser: 6,000/6,000 with the existing comparison rules.
  • Sculk: 435/435 scenarios match on every tick.
  • Connected clients with --server-thread: 5/5, zero skipped (machines, fireball, sculk_container, commands, feedback).

pr_ready (tools/pr_ready.py --quick on archlinux, against origin/main at e05933169, 4 min 13 s)

Check Result
Scope ✅ 16 files, +338 −56
Cargo.lock ✅ unchanged
Public tree ✅ (1 s)
Python tests ✅ 287 passed (26 s)
rustfmt ✅ (8 s)
clippy ✅ (8 s)
tests: horizon-client ✅ 1255 passed (3 min 4 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 ➖ 37 affected, to run in CI (--quick): arrow, block_particles, block_removal, breaking_model, command_exec, composter, crafter, cursor_death, dedicated_server, dispenser, enchanting, hardcore_respawn and 25 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 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/1955 **Author:** [@rdbtCVS](https://github.com/rdbtCVS) **Created:** 10/25/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `t3/migrate-parity-server-thread` --- ### 📝 Commits (2) - [`2820697`](https://github.com/horizon-rust/horizon/commit/28206976d8f301e834f47d85071820214a732bb7) Move parity fixtures onto server execution - [`a4eefb0`](https://github.com/horizon-rust/horizon/commit/a4eefb0730314844ba35df38b4535b952f42165e) Merge remote-tracking branch 'origin/main' into cg15/1955 ### 📊 Changes **16 files changed** (+338 additions, -56 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+9 -13) 📝 `crates/horizon-client/src/game/command_harness.rs` (+114 -27) 📝 `crates/horizon-client/src/game/commands.rs` (+2 -1) 📝 `crates/horizon-client/src/game/commands/extra.rs` (+25 -3) 📝 `crates/horizon-client/src/game/dispense_fixture.rs` (+4 -0) 📝 `crates/horizon-client/src/game/integrated.rs` (+54 -3) 📝 `crates/horizon-client/src/game/levels.rs` (+15 -3) 📝 `crates/horizon-client/src/game/remote.rs` (+17 -0) 📝 `crates/horizon-client/src/game/sculk_fixture.rs` (+4 -0) 📝 `crates/horizon-client/src/game/server_travel.rs` (+1 -1) 📝 `docs/parity-workflow.md` (+28 -0) 📝 `tools/command_exec_corpus.py` (+22 -1) 📝 `tools/lan_e2e.py` (+39 -0) 📝 `tools/test_command_exec_parity.py` (+2 -2) 📝 `tools/test_dispenser_parity.py` (+1 -1) 📝 `tools/test_sculk_parity.py` (+1 -1) </details> ### 📄 Description > 🤖 Opened by rdbtCVS's AI agent (OpenAI Codex, GPT-6.1). ## What and why Related migration: [#1909](https://github.com/ludovic111/horizon/pull/1909) moves LAN/friends integration coverage to server-thread hosting. This PR moves the Rust command, dispenser and sculk fixtures onto server execution; its connected sculk regression covers container-open activation and shrieker replication. The command, dispenser and sculk parity fixtures now execute authoritative work on a server `Game`, preparing them for removal of `--in-frame`. Command scripts join a real headless client through the memory connection, run commands with the connected owner's body and level, advance explicit ticks through `tick_server`, and use server portal travel. The client acknowledges terrain and teleports without predicting movement. Script and save failures propagate through server shutdown. Dispenser and sculk remain component probes with synthetic worlds, seeded random streams and explicit phase order, constructed on a server thread. The migration exposed three server defects covered by the command oracle: an unpublished owner's `/kick` could remove its own connection; returning to a parked dimension retained another dimension's locate generator; and dirty waypoint attributes retained the temporary player slot instead of the guest's connection. These are fixed here. Fixture setup finishes requested terrain before inspections. The oversized-fill failure case uses a guaranteed unloaded corner, and the random-command group clears preceding loot streams before testing its own sequences. Java oracles, comparison masks and callback assertions are unchanged. A new clock regression checks exact tick advancement and the single connected owner; a connected guest opens a chest and both clients observe the sculk sensor and shrieker activate and reset. ## Vanilla reference 26.3 `KickCommand.kickPlayers`, `LocateCommand.locateBiome`, and `MinecraftServer.createLevels` (REA), plus `VanillaCommandExecOracle`'s explicit `LivingEntity.refreshDirtyAttributes` handling. Existing `VanillaDispenserOracle` and `VanillaSculkOracle` retain their component phases and seeded comparisons. ## Self-check - Command execution: **851/851**, followed by **five fresh-world repeats**, all 851/851; alternating runs set legacy in-frame flags while the fixture still uses its server thread. - Invalid server script: nonzero failure reaches the client process. - Dispenser: **6,000/6,000** with the existing comparison rules. - Sculk: **435/435** scenarios match on every tick. - Connected clients with `--server-thread`: **5/5**, zero skipped (`machines`, `fireball`, `sculk_container`, `commands`, `feedback`). **pr_ready** (`tools/pr_ready.py --quick` on archlinux, against origin/main at e05933169, 4 min 13 s) | Check | Result | | --- | --- | | Scope | ✅ 16 files, +338 −56 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ (1 s) | | Python tests | ✅ 287 passed (26 s) | | rustfmt | ✅ (8 s) | | clippy | ✅ (8 s) | | tests: horizon-client | ✅ 1255 passed (3 min 4 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 | ➖ 37 affected, to run in CI (--quick): arrow, block_particles, block_removal, breaking_model, command_exec, composter, crafter, cursor_death, dedicated_server, dispenser, enchanting, hardcore_respawn and 25 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 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:13:02 +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#3889
No description provided.