[PR #468] [MERGED] [tools] parity harnesses: free ports instead of fixed ones #2587

Closed
opened 2026-11-02 15:57:25 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: fix/parity-free-ports


📝 Commits (1)

  • e27efc1 [tools] parity harnesses: free ports instead of fixed ones

📊 Changes

5 files changed (+36 additions, -10 deletions)

View changed files

📝 tools/datafix_scene_12.py (+1 -1)
📝 tools/datafix_worlds.py (+7 -2)
📝 tools/test_save_roundtrip_parity.py (+9 -2)
📝 tools/upgrade_world.py (+8 -2)
📝 tools/vanilla_world_check.py (+11 -3)

📄 Description

Fixes #461

What

The light harness ran its vanilla server on a fixed port (25671, the default of tools/vanilla_world_check.py), so two parity runs on one machine failed with FAILED TO BIND TO PORT ... Address already in use.

  • tools/vanilla_world_check.py: --port now defaults to a free port picked by the OS (same free_port() as test_dedicated_server_parity.py); --port N still works. light picks this up with no change of its own.
  • Other server ports that were not fixed but could still collide (derived from the pid or a random number) now ask the OS for a free port too: tools/test_save_roundtrip_parity.py, tools/datafix_worlds.py (+ datafix_scene_12.py), tools/upgrade_world.py.
  • Left alone on purpose: the server-port=+25570 etc. values in test_server_files_parity.py (properties-file parsing test data, no server binds them) and the LAN discovery port 4445 (fixed by the vanilla protocol).

How tested

  • python3 tools/test_light_parity.py alone: passes.
  • Two light runs at once from two worktrees (separate .local, both --keep): both pass, servers started on *:53379 and *:53378 at the same second; no FAILED TO BIND.
  • python3 tools/parity.py --changed origin/main: 8 passed, 0 failed (datafix x6, light, save_roundtrip).
  • upgrade_world.py is not covered by a harness; it compiles and its port line is the same change.

Python only; no Rust touched. Nothing needed from Ludovic.

🤖 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/468 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/16/2026 **Status:** ✅ Merged **Merged:** 10/16/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/parity-free-ports` --- ### 📝 Commits (1) - [`e27efc1`](https://github.com/horizon-rust/horizon/commit/e27efc16bac0b5dcf64868242325d46529647002) [tools] parity harnesses: free ports instead of fixed ones ### 📊 Changes **5 files changed** (+36 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `tools/datafix_scene_12.py` (+1 -1) 📝 `tools/datafix_worlds.py` (+7 -2) 📝 `tools/test_save_roundtrip_parity.py` (+9 -2) 📝 `tools/upgrade_world.py` (+8 -2) 📝 `tools/vanilla_world_check.py` (+11 -3) </details> ### 📄 Description Fixes #461 ## What The `light` harness ran its vanilla server on a fixed port (25671, the default of `tools/vanilla_world_check.py`), so two parity runs on one machine failed with `FAILED TO BIND TO PORT ... Address already in use`. - `tools/vanilla_world_check.py`: `--port` now defaults to a free port picked by the OS (same `free_port()` as `test_dedicated_server_parity.py`); `--port N` still works. `light` picks this up with no change of its own. - Other server ports that were not fixed but could still collide (derived from the pid or a random number) now ask the OS for a free port too: `tools/test_save_roundtrip_parity.py`, `tools/datafix_worlds.py` (+ `datafix_scene_12.py`), `tools/upgrade_world.py`. - Left alone on purpose: the `server-port=+25570` etc. values in `test_server_files_parity.py` (properties-file parsing test data, no server binds them) and the LAN discovery port 4445 (fixed by the vanilla protocol). ## How tested - `python3 tools/test_light_parity.py` alone: passes. - Two `light` runs at once from two worktrees (separate `.local`, both `--keep`): both pass, servers started on `*:53379` and `*:53378` at the same second; no `FAILED TO BIND`. - `python3 tools/parity.py --changed origin/main`: 8 passed, 0 failed (datafix x6, light, save_roundtrip). - `upgrade_world.py` is not covered by a harness; it compiles and its port line is the same change. Python only; no Rust touched. Nothing needed from Ludovic. 🤖 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-02 15:57:25 +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#2587
No description provided.