[PR #1187] [MERGED] world_spawn harness: vanilla creates the world on one worker #3401

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

📋 Pull Request Information

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

Base: main ← Head: fix/world-spawn-one-worker


📝 Commits (1)

  • 0ae1ab2 world_spawn harness: vanilla's server creates the world on one worker

📊 Changes

1 file changed (+15 additions, -22 deletions)

View changed files

📝 tools/test_world_spawn_parity.py (+15 -22)

📄 Description

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

What

The world_spawn harness now runs vanilla's server with one worker thread (-Dmax.bg.threads=1, honoured by Util.maxAllowedExecutorThreads). With that, vanilla decorates chunks in its scheduler's order, the order Horizon follows (decoration_order::vanilla_order), so every vanilla run gives the same spawn. The retry loop (RETRIES, the "vanilla itself gave several spawns" report) is removed. Vanilla's one spawn is compared exactly.

Why

This is flakes-1 flake 2. Trees of neighbouring chunks overlap on chunk corners, and whichever chunk is decorated first wins. With several workers, vanilla's order changes from run to run. Seed -2080727421395798566 spawned at Y 64, 66 or 72 over 10 default runs; Horizon gives 72. The old harness passed if any of up to 4 vanilla runs matched, so it still failed when none of them gave 72: DIFF -2080727421395798566: vanilla 144 64 112 / horizon 144 72 112.

How tested

  • One worker, 10 vanilla runs per seed that varied before. All four seeds were deterministic in every run:
    • -2080727421395798566: 72 in 10 of 10, matching Horizon
    • -8171837717659076940: (0, 67, 0)
    • -5296387317982839690: (-16, 73, 16)
    • -211473008665507967: (0, 66, 112)
  • Full harness: tools/parity.py world_spawn --repeat 2 --fresh -j 4 --hosts "" on the desktop, under load from the other flake proofs. Both runs passed, 60 of 60 seeds each (2608 s and 2132 s).
  • Why not 10 full repeats: a full run takes 35 to 45 minutes, so I ran two. The flaky part is vanilla's own world creation, and the single-thread runs above prove that part directly, 10 of 10 per varying seed.
  • No Rust is touched.

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/1187 **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/world-spawn-one-worker` --- ### 📝 Commits (1) - [`0ae1ab2`](https://github.com/horizon-rust/horizon/commit/0ae1ab2e70e68338128dc852be51df9e37969acc) world_spawn harness: vanilla's server creates the world on one worker ### 📊 Changes **1 file changed** (+15 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `tools/test_world_spawn_parity.py` (+15 -22) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## What The world_spawn harness now runs vanilla's server with one worker thread (`-Dmax.bg.threads=1`, honoured by `Util.maxAllowedExecutorThreads`). With that, vanilla decorates chunks in its scheduler's order, the order Horizon follows (`decoration_order::vanilla_order`), so every vanilla run gives the same spawn. The retry loop (`RETRIES`, the "vanilla itself gave several spawns" report) is removed. Vanilla's one spawn is compared exactly. ## Why This is flakes-1 flake 2. Trees of neighbouring chunks overlap on chunk corners, and whichever chunk is decorated first wins. With several workers, vanilla's order changes from run to run. Seed -2080727421395798566 spawned at Y 64, 66 or 72 over 10 default runs; Horizon gives 72. The old harness passed if any of up to 4 vanilla runs matched, so it still failed when none of them gave 72: `DIFF -2080727421395798566: vanilla 144 64 112 / horizon 144 72 112`. ## How tested - **One worker, 10 vanilla runs per seed** that varied before. All four seeds were deterministic in every run: - -2080727421395798566: 72 in 10 of 10, matching Horizon - -8171837717659076940: (0, 67, 0) - -5296387317982839690: (-16, 73, 16) - -211473008665507967: (0, 66, 112) - **Full harness:** `tools/parity.py world_spawn --repeat 2 --fresh -j 4 --hosts ""` on the desktop, under load from the other flake proofs. Both runs passed, 60 of 60 seeds each (2608 s and 2132 s). - **Why not 10 full repeats:** a full run takes 35 to 45 minutes, so I ran two. The flaky part is vanilla's own world creation, and the single-thread runs above prove that part directly, 10 of 10 per varying seed. - No Rust is touched. ## 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:16 +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#3401
No description provided.