Merge pull request #1909 from rdbtCVS/t3/server-thread-integration-clean
🤖 Agent: gate verified on e3e08911b (main merged). fmt, clippy -D warnings and horizon-client tests pass. lan_e2e with the server-thread host: 131/133, and cursor/falling pass on rerun in both modes. 14 in-frame checks pass. agent_control_e2e: only manage fails, and it fails the same way on main. 82 of the 83 affected harnesses pass. lan_integration flakes under load and is now named-only (nightly). Queued.
This commit is contained in:
@@ -51,7 +51,7 @@ file selects ~103.
|
||||
| 34 | Multiplayer and LAN screens, friends (44) | `L/multiplayer.rs`, `G/lan_screen.rs`, `G/friends.rs`, `L/friends_screen.rs`, `crates/horizon-friends/`, `crates/horizon-relay/` | lan, world_options; `python3 tools/test_friends.py` |
|
||||
| 35 | Dispensers (43) | `G/dispenser.rs`, `G/dispense_fixture.rs` (the harness side) | dispenser |
|
||||
| 36 | Audio and music (38) | `L/audio.rs`, `L/sound_engine.rs`, `L/sound_events.rs`, `L/music.rs`, `G/music.rs`, `L/ambience.rs`, `G/subtitle_hud.rs` | sound_engine, sound_event, music, situational_music, ambient_sound, subtitle |
|
||||
| 37 | Integrated server and levels (34) | `G/integrated.rs`, `G/levels.rs`, `G/server_travel.rs` | server_dimension_players, `lan_e2e --server-thread` (portals, levels, distance, lava) |
|
||||
| 37 | Integrated server and levels (34) | `G/integrated.rs`, `G/levels.rs`, `G/server_travel.rs` | server_dimension_players, `lan_e2e` (server-thread by default; portals, levels, distance, lava) |
|
||||
| 38 | Command parsing (34) | `L/command/` (`args.rs`, `selector.rs`, `tree_*.rs`, `vanilla.rs`) | command_parse (corpus `tools/command_parse_corpus.py`) |
|
||||
| 39 | Benchmarks and telemetry (34) | `L/benchmark.rs`, `tools/perf_bench.py`, `L/telemetry.rs`, `crates/horizon-telemetry*/`, `crates/horizon-bench/` | `python3 -m unittest tests.test_perf_bench`; [benchmark.md](benchmark.md) |
|
||||
| 40 | Explosions and TNT (31) | `G/explosion.rs`, `G/tnt.rs` | lan_e2e blast; no dedicated harness yet |
|
||||
|
||||
@@ -111,3 +111,53 @@ and shrieker. They supplement the deterministic component comparisons.
|
||||
## Reading vanilla
|
||||
|
||||
Besides the Vineflower sources in `.local/minecraft/<version>/sources/`, `tools/rea_vanilla.py` queries the shipped bytecode through REA (callers through lambdas, overloads, a second decompiler); see [decompilation status](decompilation-status.md#querying-the-shipped-bytecode-with-rea).
|
||||
|
||||
## Player-facing integration and deterministic fixtures
|
||||
|
||||
`python3 tools/lan_e2e.py` runs every LAN check with an integrated server thread,
|
||||
the same path as normal single player. `python3 tools/test_friends.py --client
|
||||
target/fast/horizon-client --relay target/fast/horizon-relay --baseline` covers
|
||||
plain LAN, direct invitations, a local relay and ended invitations in that mode.
|
||||
Both accept `--in-frame` for comparison and retain `--server-thread` for existing
|
||||
callers. Run Linux games under `xvfb-run -a` when no display is available. Each
|
||||
process gets scratch game, launcher, XDG data and config homes; telemetry, audio
|
||||
and launcher self-update are disabled.
|
||||
|
||||
`lan_integration` and `friends_integration` register these suites with `parity.py`.
|
||||
`friends_integration` (under a minute) is selected like any harness when the
|
||||
drivers or game implementation change. `lan_integration` is the whole LAN suite
|
||||
(~40 minutes on a loaded runner, and single checks flake under load), so
|
||||
`tools/parity_hosts.json` lists it under `named_only`: no automatic selection
|
||||
(`--changed`, `--failed`, `--flake-check`, CI, parity-main) picks it; it runs
|
||||
when named and in the nightly audit (`--all`). LAN writes `results.json`
|
||||
with the host mode and each result beside its screenshots and logs. A skipped
|
||||
case is recorded explicitly and does not count as passing coverage.
|
||||
|
||||
The game-binary fixture audit keeps these complementary direct rule tests:
|
||||
|
||||
- `command_harness.rs`: command feedback, styled spans and result callbacks,
|
||||
held player position, explicit ticks and portal completion matching
|
||||
`VanillaCommandExecOracle`. LAN `commands`, `feedback`, `styles`, `levels` and
|
||||
`portals` cover command input, packet feedback and travel across the boundary.
|
||||
- `dispense_fixture.rs`: seeded synthetic worlds, block/event traces, item
|
||||
use/mining and combat hooks matching `VanillaDispenserOracle`. These isolate
|
||||
rule results and RNG order; LAN machines, crafting, clicks, fireball, mining
|
||||
and combat exercise real input and server handling separately. The new
|
||||
`dispenser_input_host` / `dispenser_input_guest` checks press a button and
|
||||
verify authoritative inventory consumption and exactly one drop on both clients.
|
||||
- `sculk_fixture.rs`: scripted events and exact per-tick sculk/warden traces
|
||||
matching `VanillaSculkOracle`; introducing wall-clock network ticks would
|
||||
destroy that deterministic oracle contract. `sculk_input_host` and
|
||||
`sculk_input_guest` separately exercise real footsteps reaching a sensor;
|
||||
failures remain visible rather than changing the oracle trace.
|
||||
- `net_harness.rs`: already a real network client of a dedicated server; keep
|
||||
its handshake, world loading, chat and command packet assertions.
|
||||
|
||||
Library probes, `lan_bot`'s protocol hub fixture, generation/save tests and
|
||||
streaming/mesh tests remain fast deterministic coverage. They do not become
|
||||
full game launches. Setup and authoritative reads use the owning server;
|
||||
interactions stay on the client. `server-hold on|off` provides a prediction-test
|
||||
barrier between server ticks, including player packet handling, while transport
|
||||
threads and control calls remain responsive. `stall MILLISECONDS` stalls only
|
||||
the window to test recovery from a hung frame without process signals interrupting
|
||||
socket reads. Neither mechanism changes normal gameplay.
|
||||
|
||||
Reference in New Issue
Block a user