[PR #2598] [MERGED] test_friends: put the guest on cleared, flat ground before it walks #4462

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

📋 Pull Request Information

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

Base: main ← Head: fix/friends-guest-spot


📝 Commits (1)

  • 6087b01 test_friends: put the guest on cleared, flat ground before it walks

📊 Changes

1 file changed (+21 additions, -1 deletions)

View changed files

📝 tools/test_friends.py (+21 -1)

📄 Description

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

friends_integration has failed on parity-main since 4be5c8eb5. This fixes the harness; the game is right.

Why it fails

Since #2501, a player new to the world spawns at a random free spot near the world spawn (vanilla's PlayerSpawnFinder.findSpawn, within respawn_radius). Before, every guest landed exactly on the world spawn. tools/test_friends.py relied on that spot: the guest walks south, then aims at a block two blocks east. From a random spot it often stands against a hill:

  • it moves less than the 1 block the host must see (guest movement on the host);
  • or terrain hides the block (the guest aiming at the block).

The fix

Before the movement checks, the host clears a flat stone floor beside itself (7 × 11 blocks, 4 high) and teleports the guest there (/tp, so the server has the last word). The block check then waits for the guest to stand still before it reads where it is.

Checks (Mac mini)

tools/test_friends.py --baseline runs result
main (aef652c8a) 4 4 failed (3 × guest movement, 1 × aiming)
main with #2501 reverted 2 2 passed
this branch, server thread 4 4 passed
this branch, --in-frame 1 passed

parity.py friends_integration: passed (22 s). lan_integration (also selected, as it shares the driver) is running here; result to follow in a comment.

pr_ready (--quick): 1 file, +21 −1; Python tests 320 passed; no Rust change.

🤖 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/2598 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/friends-guest-spot` --- ### 📝 Commits (1) - [`6087b01`](https://github.com/horizon-rust/horizon/commit/6087b01f667ec9ca453b95fee6ae2658eb67fc9c) test_friends: put the guest on cleared, flat ground before it walks ### 📊 Changes **1 file changed** (+21 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tools/test_friends.py` (+21 -1) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. `friends_integration` has failed on `parity-main` since 4be5c8eb5. This fixes the harness; the game is right. ## Why it fails Since #2501, a player new to the world spawns at a random free spot near the world spawn (vanilla's `PlayerSpawnFinder.findSpawn`, within `respawn_radius`). Before, every guest landed exactly on the world spawn. `tools/test_friends.py` relied on that spot: the guest walks south, then aims at a block two blocks east. From a random spot it often stands against a hill: - it moves less than the 1 block the host must see (`guest movement on the host`); - or terrain hides the block (`the guest aiming at the block`). ## The fix Before the movement checks, the host clears a flat stone floor beside itself (7 × 11 blocks, 4 high) and teleports the guest there (`/tp`, so the server has the last word). The block check then waits for the guest to stand still before it reads where it is. ## Checks (Mac mini) | `tools/test_friends.py --baseline` | runs | result | |---|---|---| | main (aef652c8a) | 4 | 4 failed (3 × guest movement, 1 × aiming) | | main with #2501 reverted | 2 | 2 passed | | this branch, server thread | 4 | 4 passed | | this branch, `--in-frame` | 1 | passed | `parity.py friends_integration`: passed (22 s). `lan_integration` (also selected, as it shares the driver) is running here; result to follow in a comment. **pr_ready** (`--quick`): 1 file, +21 −1; Python tests 320 passed; no Rust change. 🤖 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:17: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#4462
No description provided.