Run the horizon-client parity probes from one binary
81 client examples that harnesses run become modules of examples/probe: harnesses run `probe <name> ...` (or `cargo run --example probe -- <name>`), and the shared helpers (audio_common, hud_fixture, chat_screen_fixture) move with them. The benchmarks and manual tools stay standalone examples. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -26,7 +26,7 @@ Vanilla oracle runs are reused as well. `tools/parity_shim.py` stands in for `ja
|
||||
|
||||
Probes build into `.local/parity-target/` with release optimisation but no LTO and 16 codegen units. On ludodesktop that rebuilds every `horizon-world` probe in 3 seconds after a one-line change, against 122 seconds with the release profile. Rust gives these settings identical results (no fast-math; overflow checks as in release), and the full harness suite passes under them. Probes that harnesses build in the dev profile get `opt-level = 3` too, keeping their overflow checks and debug assertions. Harnesses must locate binaries through `cargo metadata` or `lab.cargo_target()`, never a hard-coded `target/`.
|
||||
|
||||
The `horizon-world` probes are one binary, `cargo build --release -p horizon-world --example probe`: a harness runs `probe <name> [arguments]`, and `<name>` is a module in `crates/horizon-world/examples/probe/` (add it to the `mod` list and the `probes!` list in its `main.rs`; read arguments with `crate::args()`, which drops the name). Code several probes share goes in `examples/probe/support/`. Linking one binary instead of ~170 examples is most of what a probe build used to cost. The runner counts only the probes a harness ran, the probes and support modules they name and `dispatch.rs` as its dependencies, not `main.rs`, which only lists the probes: editing one probe reruns only its harnesses, and adding one reruns none.
|
||||
The probes of `horizon-world` and of `horizon-client` are one binary per crate, `cargo build --release -p <crate> --example probe`: a harness runs `probe <name> [arguments]`, and `<name>` is a module in `crates/<crate>/examples/probe/` (add it to the `mod` list and the `probes!` list in its `main.rs`; read arguments with `crate::args()` or `crate::args_os()`, which drop the name). Code several probes share goes in `examples/probe/support/` or a module of its own. Linking one binary instead of ~250 examples is most of what a probe build used to cost. The runner counts only the probes a harness ran, the probes and support modules they name, their own subdirectories and `dispatch.rs` as its dependencies, not `main.rs`, which only lists the probes: editing one probe reruns only its harnesses, and adding one reruns none.
|
||||
|
||||
Passes are shared between worktrees. A harness's key depends only on the content of its dependencies, not on where they are, so every pass is also written to `parity-shared/` beside the shared vanilla data (`PARITY_SHARED` overrides it). A worktree whose files match those a harness passed with, in any worktree, counts that pass without running the harness: after merging the integration branch, an agent's gate only runs the harnesses its own changes affect.
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ emit for the same scenes.
|
||||
`FluidRenderer.tesselate`, then `RenderShape.MODEL` blocks through
|
||||
`ModelBlockRenderer.tesselateBlock` with smooth lighting on, culling on,
|
||||
cutout leaves, `BlockColors.createDefault()` and `state.getSeed(pos)`.
|
||||
- **Horizon side**: `crates/horizon-client/examples/section_mesh_fixture.rs`
|
||||
- **Horizon side**: `crates/horizon-client/examples/probe/section_mesh_fixture.rs`
|
||||
loads the prepared resources (`Assets`, `BlockFacts`, `Biomes`,
|
||||
`load_visibility`, `MeshTables`), builds the same blocks and light in real
|
||||
client `Chunk`s (a 3x3 chunk region), sets every biome's colours to the
|
||||
|
||||
+2
-2
@@ -1471,7 +1471,7 @@ the `hp` text when they no longer fit; and the header and footer wrapped by
|
||||
the list in single player unless a `list` objective is set.
|
||||
`tools/test_tab_list_parity.py` runs vanilla's own `extractRenderState` frame
|
||||
after frame (`VanillaTabListOracle`: stand-in connection, level and options,
|
||||
real `Scoreboard`) against `examples/tab_list_fixture` and compares every fill,
|
||||
real `Scoreboard`) against `examples/probe/tab_list_fixture.rs` and compares every fill,
|
||||
styled text run, sprite and face blit (as `hud_layout::GuiDraw` calls, painted
|
||||
like the rest of the HUD): **1,000 cases, 3,476 frames and 844,758
|
||||
calls match**. The game draws the same layout while the player-list key is
|
||||
@@ -1492,7 +1492,7 @@ nearest first. `WorldBorder::warning_strength` feeds `hud_overlays::vignette`
|
||||
the border's warning strength at the camera. `tools/test_world_border_render_parity.py` drives vanilla's border,
|
||||
renderer and vignette (`VanillaWorldBorderRenderOracle`, with a stand-in GPU
|
||||
device, dynamic-uniform writer and render pass) against
|
||||
`examples/world_border_render_fixture`: **1,500 cases and 16,859 frames match
|
||||
`examples/probe/world_border_render_fixture.rs`: **1,500 cases and 16,859 frames match
|
||||
bit for bit** (8,513 with the wall drawn). The game draws the wall with
|
||||
`RenderPipelines.WORLD_BORDER`'s overlay blend and the mipmapped forcefield
|
||||
texture, and follows the server's border packets. One border is kept for all
|
||||
|
||||
Reference in New Issue
Block a user