[PR #1184] [MERGED] dedicated_server harness: wait for what each step needs, not a fixed time #3398

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

📋 Pull Request Information

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

Base: main ← Head: fix/dedicated-server-waits


📝 Commits (2)

  • 743cc8e Ender pearls: a server always sends the thrower the teleport
  • dd1525f dedicated_server harness: wait for what each step needs, not a fixed time

📊 Changes

4 files changed (+55 additions, -16 deletions)

View changed files

📝 crates/horizon-client/src/game/creatures.rs (+11 -4)
📝 crates/horizon-client/src/game/lan_actions.rs (+4 -2)
📝 crates/horizon-client/src/motion.rs (+5 -0)
📝 mods/horizon/src/test/java/dev/horizonlab/parity/VanillaProtocolClient.java (+35 -10)

📄 Description

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

What

In VanillaProtocolClient, the dedicated_server client now waits until each step has actually happened before moving on, instead of moving on after a fixed time:

  • Trade: waits until the summoned villager is tracked.
  • Furnace: takes the ingot 1 s after the result slot has it.
  • Snowballs: wait 1 s after the snowball entity was added.
  • Pearl: waits for the teleport and the health update.

Each step keeps its old minimum time and waits up to 30 s more (PATIENCE). The recorded values are compared exactly as before.

The respawn line also leaves out block_update and section_blocks_update. A lava fall keeps flowing while the game runs, so how many of those arrive before the respawn depends on timing.

Stacked on #1183 (the base is its branch). Merge #1183 first; this PR then retargets to main.

Why

This is flakes-1 flake 1, the part #1183 doesn't fix. On a busy desktop, either side's server was sometimes slower than the fixed wait. One side then failed: the villager not seen yet, the off-hand snowball 0, the furnace quick move before the ingot, or the pearl not landed yet.

How tested

  • tools/parity.py dedicated_server --repeat 10 --fresh -j 4 --hosts "" on the desktop, with the pearl fix and this PR, while the secure_chat and world_spawn proofs ran alongside: 10 of 10 passed (39.7 min).
  • Baseline before both fixes: 2 of 4 failed (1 pearl, 1 villager).
  • No Rust is touched here. fmt, clippy and tests for the Rust half are in #1183.

Needs Ludovic

Nothing.

🤖 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/1184 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/22/2026 **Status:** ✅ Merged **Merged:** 10/22/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/dedicated-server-waits` --- ### 📝 Commits (2) - [`743cc8e`](https://github.com/horizon-rust/horizon/commit/743cc8e0696e4d54fc2a9f2f3564dc89a119287f) Ender pearls: a server always sends the thrower the teleport - [`dd1525f`](https://github.com/horizon-rust/horizon/commit/dd1525f045f223a37e9e46395e25048459c290c1) dedicated_server harness: wait for what each step needs, not a fixed time ### 📊 Changes **4 files changed** (+55 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/creatures.rs` (+11 -4) 📝 `crates/horizon-client/src/game/lan_actions.rs` (+4 -2) 📝 `crates/horizon-client/src/motion.rs` (+5 -0) 📝 `mods/horizon/src/test/java/dev/horizonlab/parity/VanillaProtocolClient.java` (+35 -10) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## What In `VanillaProtocolClient`, the dedicated_server client now waits until each step has actually happened before moving on, instead of moving on after a fixed time: - **Trade:** waits until the summoned villager is tracked. - **Furnace:** takes the ingot 1 s after the result slot has it. - **Snowballs:** wait 1 s after the snowball entity was added. - **Pearl:** waits for the teleport and the health update. Each step keeps its old minimum time and waits up to 30 s more (`PATIENCE`). The recorded values are compared exactly as before. The respawn line also leaves out `block_update` and `section_blocks_update`. A lava fall keeps flowing while the game runs, so how many of those arrive before the respawn depends on timing. **Stacked on #1183** (the base is its branch). Merge #1183 first; this PR then retargets to main. ## Why This is flakes-1 flake 1, the part #1183 doesn't fix. On a busy desktop, either side's server was sometimes slower than the fixed wait. One side then failed: the villager not seen yet, the off-hand snowball 0, the furnace quick move before the ingot, or the pearl not landed yet. ## How tested - `tools/parity.py dedicated_server --repeat 10 --fresh -j 4 --hosts ""` on the desktop, with the pearl fix and this PR, while the secure_chat and world_spawn proofs ran alongside: **10 of 10 passed** (39.7 min). - Baseline before both fixes: 2 of 4 failed (1 pearl, 1 villager). - No Rust is touched here. fmt, clippy and tests for the Rust half are in #1183. ## Needs Ludovic Nothing. 🤖 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 04:09:14 +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#3398
No description provided.