[PR #1453] [MERGED] horizon-world parity probes: one binary, shared helpers, dead examples gone #3534

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

📋 Pull Request Information

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

Base: main ← Head: feat/world-probe-binary


📝 Commits (10+)

  • 2e953c6 Merge #1443 (parity prebuild selection), which the probe binaries rely on
  • c1f8ec8 Merge #1444 (world_spawn shards), which touches the same harness
  • fdae4b8 horizon-world probes: one binary, probe <name>
  • 7092f16 horizon-world probes: one copy of the helpers they shared
  • ab4c246 Delete the 11 examples nothing references
  • ed847d4 Keep the probe list out of the harnesses' dependencies
  • 4a922a5 Document how the runner tracks probe-binary dependencies
  • 38bce65 Pass the probe name where the harness codemod missed it
  • 341576a Merge remote-tracking branch 'origin/main' into feat/world-probe-binary
  • 974e18e Merge remote-tracking branch 'origin/main' into feat/world-probe-binary

📊 Changes

370 files changed (+2044 additions, -4670 deletions)

View changed files

➖ crates/horizon-client/examples/block_facts_bench.rs (+0 -104)
➖ crates/horizon-client/examples/chunk_bench.rs (+0 -216)
➖ crates/horizon-client/examples/entity_geometry_bench.rs (+0 -140)
➖ crates/horizon-client/examples/json_readers_bench.rs (+0 -205)
➖ crates/horizon-client/examples/lan_flat.rs (+0 -144)
➖ crates/horizon-client/examples/load_bench.rs (+0 -153)
➖ crates/horizon-client/examples/save_bench.rs (+0 -128)
➖ crates/horizon-client/examples/save_parity.rs (+0 -265)
➖ crates/horizon-client/examples/streaming_bench.rs (+0 -284)
➖ crates/horizon-client/examples/tick_chunk_membership_bench.rs (+0 -143)
📝 crates/horizon-world/examples/probe/active_effect_tick_fixture.rs (+3 -3)
📝 crates/horizon-world/examples/probe/active_effects_fixture.rs (+3 -3)
📝 crates/horizon-world/examples/probe/anchor_fixture.rs (+2 -2)
📝 crates/horizon-world/examples/probe/attribute_fixture.rs (+10 -16)
📝 crates/horizon-world/examples/probe/attribute_health_fixture.rs (+11 -17)
📝 crates/horizon-world/examples/probe/attribute_map_queries_fixture.rs (+7 -7)
📝 crates/horizon-world/examples/probe/attribute_updates_fixture.rs (+3 -3)
📝 crates/horizon-world/examples/probe/basic_feature_fixture.rs (+2 -2)
📝 crates/horizon-world/examples/probe/biome_chunk_fixture.rs (+2 -2)
📝 crates/horizon-world/examples/probe/biome_generation_fixture.rs (+2 -2)

...and 80 more files

📄 Description

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

What

The 168 horizon-world examples the parity harnesses run become one binary, examples/probe. Harnesses run probe <name> [arguments]. The helpers those examples had copied between them are kept once, and the 11 examples nothing references are deleted.

This branch contains #1443 and #1444. It needs #1443's prebuild (it skips probes that no longer exist), and #1444 touches the same line of test_world_spawn_parity.py. Merge those two first and this diff shrinks to its own commits; merging this one alone merges them too.

Why

Workstream 1 of the review plan (review-1-ci, item 1). Every example links its own copy of the crate's generics, so a horizon-world change relinked 168 binaries in the parity job's prebuild.

How

  • crates/horizon-world/examples/probe/:
    • each former example is a module with pub fn main;
    • main.rs only lists them;
    • dispatch.rs runs the module named by the first argument, and crate::args() gives it the command line it used to see.
  • Shared code goes in probe/support/ (common.rs, shapes.rs, plus the two helpers that already existed). This removes 1,097 duplicated lines in 75 files: bits/f64_bits/f32_bits/f64_hex, tag, position, emit, values, box_values and bounds.
  • The harnesses (217 of them) build --example probe and pass the probe name first. Paths and docs were updated to match.
  • tools/parity.py: a probe binary's dep-info names every probe in it. The runner now keeps only the probes a harness ran, plus what they include! or name (crate::<probe>, support::<module>), plus dispatch.rs. It leaves out main.rs, which only lists the probes. So editing one probe reruns only its harnesses, and adding one reruns none (and the gate's flake check doesn't repeat them all). There is a unit test for this.
  • Deleted, since nothing references them and history keeps them:
    • horizon-client: block_facts_bench, chunk_bench, entity_geometry_bench, json_readers_bench, lan_flat, load_bench, save_bench, save_parity, streaming_bench, tick_chunk_membership_bench;
    • horizon-world: vanilla_diff.
  • The six manual horizon-world tools (benches and profiles) stay standalone examples.

Diff against main + #1443 + #1444: 369 files, +2,043 / −4,668.

Numbers

Build cost, ThinkPad, 3 jobs, the parity profile. "No incremental" is how CI builds (sccache, CARGO_INCREMENTAL=0); "incremental" is a local tools/parity.py run.

horizon-world probes 168 examples 1 binary
rebuild after a horizon-world edit, no incremental (CI) 265 s 163 s
rebuild after editing one probe, no incremental (CI) 1.2 s 98 s
rebuild after a horizon-world edit, incremental 19.1 s 5.0 s
rebuild after editing one probe, incremental 0.5 s 2.2 s

The trade-off: in CI, a change to one probe now recompiles the whole probe binary. But nearly every PR that edits a probe also edits the crate, and that relinked all 168 examples.

Verification

  • Transcripts: the 217 harnesses that run a horizon-world probe were run on main, then on this branch, on the Mac mini, and their logs diffed:

    • 203 logs are byte-identical, and 10 more differ only in timings and Cargo's progress lines;
    • datafix#1 differs only because the first run generated the sample worlds (the second reused them); the results are the same;
    • active_effect_tick, live_attribute_updates and stored_effect_notifications report a different number of matched lines. This happens on unchanged code too: three --fresh runs of active_effect_tick on this branch gave 1,732,406 or 1,732,849 lines from one run to the next. Rust matched vanilla every time.
  • The first run found three harnesses the codemod had missed (block_survival, state_provider, decorated_region). They are fixed in 38bce65c2 and pass, with identical logs.

  • cargo clippy -p horizon-world -p horizon-client --examples -- -D warnings and cargo fmt --check pass.

  • python3 -m unittest tests.test_parity_runner tests.test_pr_ready tests.test_release_train pass, except OracleReuseTests.test_reuses_until_an_input_or_output_changes, which fails the same way on main on the Mac mini (exit 127).

🤖 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/1453 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/23/2026 **Status:** ✅ Merged **Merged:** 10/23/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/world-probe-binary` --- ### 📝 Commits (10+) - [`2e953c6`](https://github.com/horizon-rust/horizon/commit/2e953c625b26454b54905b93ecb8a9d6301fe6d0) Merge #1443 (parity prebuild selection), which the probe binaries rely on - [`c1f8ec8`](https://github.com/horizon-rust/horizon/commit/c1f8ec81d8963ce97db8c9c2dbc9e95a9139414e) Merge #1444 (world_spawn shards), which touches the same harness - [`fdae4b8`](https://github.com/horizon-rust/horizon/commit/fdae4b895c6d3e64464bcafa64b825f15b5ad777) horizon-world probes: one binary, `probe <name>` - [`7092f16`](https://github.com/horizon-rust/horizon/commit/7092f16a06f73d825cc73c6cdf132674a418fc70) horizon-world probes: one copy of the helpers they shared - [`ab4c246`](https://github.com/horizon-rust/horizon/commit/ab4c246cda75268cec6de1968229250ac992111d) Delete the 11 examples nothing references - [`ed847d4`](https://github.com/horizon-rust/horizon/commit/ed847d43dcf1b8411ea05164ec424dbfbec14062) Keep the probe list out of the harnesses' dependencies - [`4a922a5`](https://github.com/horizon-rust/horizon/commit/4a922a5772494d3b55b7c5d855ba8bf8b2da637c) Document how the runner tracks probe-binary dependencies - [`38bce65`](https://github.com/horizon-rust/horizon/commit/38bce65c215b3b51f466e234c70b91b1a67a590d) Pass the probe name where the harness codemod missed it - [`341576a`](https://github.com/horizon-rust/horizon/commit/341576a084bfbe2ad0548b6c3f288ebe1e7a9a27) Merge remote-tracking branch 'origin/main' into feat/world-probe-binary - [`974e18e`](https://github.com/horizon-rust/horizon/commit/974e18e52ada3b6f98e6966139601bcc1c16ccae) Merge remote-tracking branch 'origin/main' into feat/world-probe-binary ### 📊 Changes **370 files changed** (+2044 additions, -4670 deletions) <details> <summary>View changed files</summary> ➖ `crates/horizon-client/examples/block_facts_bench.rs` (+0 -104) ➖ `crates/horizon-client/examples/chunk_bench.rs` (+0 -216) ➖ `crates/horizon-client/examples/entity_geometry_bench.rs` (+0 -140) ➖ `crates/horizon-client/examples/json_readers_bench.rs` (+0 -205) ➖ `crates/horizon-client/examples/lan_flat.rs` (+0 -144) ➖ `crates/horizon-client/examples/load_bench.rs` (+0 -153) ➖ `crates/horizon-client/examples/save_bench.rs` (+0 -128) ➖ `crates/horizon-client/examples/save_parity.rs` (+0 -265) ➖ `crates/horizon-client/examples/streaming_bench.rs` (+0 -284) ➖ `crates/horizon-client/examples/tick_chunk_membership_bench.rs` (+0 -143) 📝 `crates/horizon-world/examples/probe/active_effect_tick_fixture.rs` (+3 -3) 📝 `crates/horizon-world/examples/probe/active_effects_fixture.rs` (+3 -3) 📝 `crates/horizon-world/examples/probe/anchor_fixture.rs` (+2 -2) 📝 `crates/horizon-world/examples/probe/attribute_fixture.rs` (+10 -16) 📝 `crates/horizon-world/examples/probe/attribute_health_fixture.rs` (+11 -17) 📝 `crates/horizon-world/examples/probe/attribute_map_queries_fixture.rs` (+7 -7) 📝 `crates/horizon-world/examples/probe/attribute_updates_fixture.rs` (+3 -3) 📝 `crates/horizon-world/examples/probe/basic_feature_fixture.rs` (+2 -2) 📝 `crates/horizon-world/examples/probe/biome_chunk_fixture.rs` (+2 -2) 📝 `crates/horizon-world/examples/probe/biome_generation_fixture.rs` (+2 -2) _...and 80 more files_ </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## What The 168 `horizon-world` examples the parity harnesses run become one binary, `examples/probe`. Harnesses run `probe <name> [arguments]`. The helpers those examples had copied between them are kept once, and the 11 examples nothing references are deleted. **This branch contains #1443 and #1444.** It needs #1443's prebuild (it skips probes that no longer exist), and #1444 touches the same line of `test_world_spawn_parity.py`. Merge those two first and this diff shrinks to its own commits; merging this one alone merges them too. ## Why Workstream 1 of the review plan (review-1-ci, item 1). Every example links its own copy of the crate's generics, so a `horizon-world` change relinked 168 binaries in the parity job's prebuild. ## How - `crates/horizon-world/examples/probe/`: - each former example is a module with `pub fn main`; - `main.rs` only lists them; - `dispatch.rs` runs the module named by the first argument, and `crate::args()` gives it the command line it used to see. - Shared code goes in `probe/support/` (`common.rs`, `shapes.rs`, plus the two helpers that already existed). This removes 1,097 duplicated lines in 75 files: `bits`/`f64_bits`/`f32_bits`/`f64_hex`, `tag`, `position`, `emit`, `values`, `box_values` and `bounds`. - The harnesses (217 of them) build `--example probe` and pass the probe name first. Paths and docs were updated to match. - `tools/parity.py`: a probe binary's dep-info names every probe in it. The runner now keeps only the probes a harness ran, plus what they `include!` or name (`crate::<probe>`, `support::<module>`), plus `dispatch.rs`. It leaves out `main.rs`, which only lists the probes. So editing one probe reruns only its harnesses, and adding one reruns none (and the gate's flake check doesn't repeat them all). There is a unit test for this. - Deleted, since nothing references them and history keeps them: - `horizon-client`: `block_facts_bench`, `chunk_bench`, `entity_geometry_bench`, `json_readers_bench`, `lan_flat`, `load_bench`, `save_bench`, `save_parity`, `streaming_bench`, `tick_chunk_membership_bench`; - `horizon-world`: `vanilla_diff`. - The six manual `horizon-world` tools (benches and profiles) stay standalone examples. Diff against main + #1443 + #1444: 369 files, +2,043 / −4,668. ## Numbers Build cost, ThinkPad, 3 jobs, the parity profile. "No incremental" is how CI builds (sccache, `CARGO_INCREMENTAL=0`); "incremental" is a local `tools/parity.py` run. | `horizon-world` probes | 168 examples | 1 binary | |---|---|---| | rebuild after a `horizon-world` edit, no incremental (CI) | 265 s | **163 s** | | rebuild after editing one probe, no incremental (CI) | 1.2 s | 98 s | | rebuild after a `horizon-world` edit, incremental | 19.1 s | **5.0 s** | | rebuild after editing one probe, incremental | 0.5 s | 2.2 s | The trade-off: in CI, a change to one probe now recompiles the whole probe binary. But nearly every PR that edits a probe also edits the crate, and that relinked all 168 examples. ## Verification - **Transcripts:** the 217 harnesses that run a `horizon-world` probe were run on main, then on this branch, on the Mac mini, and their logs diffed: - 203 logs are byte-identical, and 10 more differ only in timings and Cargo's progress lines; - `datafix#1` differs only because the first run generated the sample worlds (the second reused them); the results are the same; - `active_effect_tick`, `live_attribute_updates` and `stored_effect_notifications` report a different number of matched lines. This happens on unchanged code too: three `--fresh` runs of `active_effect_tick` on this branch gave 1,732,406 or 1,732,849 lines from one run to the next. Rust matched vanilla every time. - The first run found three harnesses the codemod had missed (`block_survival`, `state_provider`, `decorated_region`). They are fixed in 38bce65c2 and pass, with identical logs. - `cargo clippy -p horizon-world -p horizon-client --examples -- -D warnings` and `cargo fmt --check` pass. - `python3 -m unittest tests.test_parity_runner tests.test_pr_ready tests.test_release_train` pass, except `OracleReuseTests.test_reuses_until_an_input_or_output_changes`, which fails the same way on main on the Mac mini (exit 127). 🤖 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:10:13 +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#3534
No description provided.