[PR #2629] [MERGED] playhorizon: window harnesses count ticks; remote.sh runs on CPUs 0-3, CI keeps 4-7 #4486

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

📋 Pull Request Information

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

Base: main ← Head: fix/window-harnesses-under-load


📝 Commits (4)

  • 8b87d12 parity: world_reopen and server_player_sculk count ticks, not request round trips
  • 4168590 Merge remote-tracking branch 'origin/main' into fix/window-harnesses-under-load
  • cb20bb5 remote.sh: runs get CPUs 0-3 by default; benchmarks hold them with --exclusive
  • a2f62b1 parity_hosts: playhorizon's workers run on CPUs 0-3, 3 harnesses at a time

📊 Changes

6 files changed (+63 additions, -26 deletions)

View changed files

📝 docs/parity-workflow.md (+2 -2)
📝 docs/release-flow.md (+3 -3)
📝 tools/parity_hosts.json (+3 -3)
📝 tools/remote.sh (+26 -11)
📝 tools/test_server_player_sculk_parity.py (+18 -5)
📝 tools/test_world_reopen_parity.py (+11 -2)

📄 Description

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

#2215's parity job on playhorizon failed world_reopen (all three reopens) and server_player_sculk. Both pass on the Mac mini. Two causes:

1. CPUs. playhorizon's CI runner is pinned to CPUs 4-7, but tools/remote.sh pinned agents' runs to 4-7 as well. A 5 s sample showed CPUs 4-7 at 100% and CPUs 0-3 at 7-13% (load ~22), so the games in the harnesses lost ticks.

  • remote.sh now defaults to --cpus 0-3, and CI keeps 4-7.
  • Every run takes a lock on its CPU set, shared by ordinary runs.
  • A benchmark asks for its CPUs explicitly with --cpus 0-3 --exclusive and says so in its PR. It takes the lock alone, so it refuses to start while another run uses those CPUs (exit 75), and later runs wait until it ends.
  • parity.py --hosts playhorizon workers (tools/parity_hosts.json) now start under taskset -c 0-3, 3 harnesses at a time instead of 6 unpinned.
  • Docs: docs/parity-workflow.md and docs/release-flow.md.

2. The harnesses measured wall-clock round trips, not game state.

  • world_reopen: it recorded the minecarts 20 ticks after spawn, before the mineshaft's last chest minecart had arrived. Every reopen then counted 4 against 3. It now waits for loaded before its first count, as it already did after each reopen, and reads the list only once it stops changing (two equal readings 40 ticks apart). A doubled cart, the bug it guards against (#374), still fails it.
  • server_player_sculk: the sensor is active for only 30 ticks, and polling it with separate horizon-ctl requests missed that window on a slow host. Both clients now sample it every tick from inside one horizon-ctl script, during the walk and after it. The check still asserts that the sensor was inactive before the walk.

Runs on playhorizon:

  • With the old pinning (CPUs 4-7 shared with a running CI job, load ~22): parity.py --repeat 3 world_reopen server_player_sculk passed 6 of 6.
  • With the new default (CPUs 0-3): world_reopen ×2 passed. --exclusive exits 75 while another run holds CPUs 0-3 and runs once they are free.

🤖 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/2629 **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/window-harnesses-under-load` --- ### 📝 Commits (4) - [`8b87d12`](https://github.com/horizon-rust/horizon/commit/8b87d128e6a3b7fd6966e46b8489065f53c444a3) parity: world_reopen and server_player_sculk count ticks, not request round trips - [`4168590`](https://github.com/horizon-rust/horizon/commit/416859022186b1712b301e997a5706d62e1682a0) Merge remote-tracking branch 'origin/main' into fix/window-harnesses-under-load - [`cb20bb5`](https://github.com/horizon-rust/horizon/commit/cb20bb508bec1083f48073519ff5f5e835f40a6a) remote.sh: runs get CPUs 0-3 by default; benchmarks hold them with --exclusive - [`a2f62b1`](https://github.com/horizon-rust/horizon/commit/a2f62b15450a884242f2d6f4184eb0386bf8fb4c) parity_hosts: playhorizon's workers run on CPUs 0-3, 3 harnesses at a time ### 📊 Changes **6 files changed** (+63 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `docs/parity-workflow.md` (+2 -2) 📝 `docs/release-flow.md` (+3 -3) 📝 `tools/parity_hosts.json` (+3 -3) 📝 `tools/remote.sh` (+26 -11) 📝 `tools/test_server_player_sculk_parity.py` (+18 -5) 📝 `tools/test_world_reopen_parity.py` (+11 -2) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. #2215's parity job on playhorizon failed `world_reopen` (all three reopens) and `server_player_sculk`. Both pass on the Mac mini. Two causes: **1. CPUs.** playhorizon's CI runner is pinned to CPUs 4-7, but `tools/remote.sh` pinned agents' runs to 4-7 as well. A 5 s sample showed CPUs 4-7 at 100% and CPUs 0-3 at 7-13% (load ~22), so the games in the harnesses lost ticks. - `remote.sh` now defaults to `--cpus 0-3`, and CI keeps 4-7. - Every run takes a lock on its CPU set, shared by ordinary runs. - A benchmark asks for its CPUs explicitly with `--cpus 0-3 --exclusive` and says so in its PR. It takes the lock alone, so it refuses to start while another run uses those CPUs (exit 75), and later runs wait until it ends. - `parity.py --hosts playhorizon` workers (`tools/parity_hosts.json`) now start under `taskset -c 0-3`, 3 harnesses at a time instead of 6 unpinned. - Docs: `docs/parity-workflow.md` and `docs/release-flow.md`. **2. The harnesses measured wall-clock round trips, not game state.** - `world_reopen`: it recorded the minecarts 20 ticks after spawn, before the mineshaft's last chest minecart had arrived. Every reopen then counted 4 against 3. It now waits for `loaded` before its first count, as it already did after each reopen, and reads the list only once it stops changing (two equal readings 40 ticks apart). A doubled cart, the bug it guards against (#374), still fails it. - `server_player_sculk`: the sensor is active for only 30 ticks, and polling it with separate `horizon-ctl` requests missed that window on a slow host. Both clients now sample it every tick from inside one `horizon-ctl` script, during the walk and after it. The check still asserts that the sensor was inactive before the walk. Runs on playhorizon: - With the old pinning (CPUs 4-7 shared with a running CI job, load ~22): `parity.py --repeat 3 world_reopen server_player_sculk` passed 6 of 6. - With the new default (CPUs 0-3): `world_reopen` ×2 passed. `--exclusive` exits 75 while another run holds CPUs 0-3 and runs once they are free. 🤖 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:31 +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#4486
No description provided.