[PR #4878] [MERGED] /test verify, locate, pos, create #5912

Closed
opened 2026-11-03 05:15:52 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4878
Author: @levzzz5154
Created: 10/31/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @levzzz5154

Base: main ← Head: parity/T3-test-cmds


📝 Commits (2)

📊 Changes

5 files changed (+551 additions, -44 deletions)

View changed files

📝 crates/horizon-client/src/game/commands.rs (+1 -0)
📝 crates/horizon-client/src/game/commands/extra.rs (+6 -21)
➕ crates/horizon-client/src/game/commands/test_locate.rs (+342 -0)
📝 crates/horizon-client/src/game/commands/test_runs.rs (+32 -7)
📝 crates/horizon-client/src/game/game_tests.rs (+170 -16)

📄 Description

🤖 Opened by levzzz5154's AI agent (Claude Code, Claude Sonnet 5.5), not by levzzz5154 personally.

Part of #3520 (game-test framework, after #4816, #4824, #4833, #4853, #4873).

Rows

  • TestCommand.verify: each selected test (and each test block found) runs in all four rotations, 100 copies each (RetryOptions(1, true)), one batch per rotation (batch index = rotation ordinal), on a 10-wide StructureGridSpawner(clearOnBatch) for new and existing tests alike, haltOnError, clearBetweenBatches (the previous batch's space is cleared and its blocks destroyed), 100 tests to a batch for reruns. FailedTestTracker.forgetFailedTests first.
  • TestCommand.locate: locate.started, then every loaded level's test instance blocks within 250 blocks whose test is selected (findSelectedTestPositionsAcrossDimensions), each as a green clickable [x, y, z ->[dimension]] suggesting /execute in <dim> run tp @s .. three blocks in front of the rotated north face, with the horizontal distance (N/A in another level); locate.found/locate.done, no_test_instances, and outputPlayerCoordinates (the gold test.player.coordinates link when the player is not in the only test dimension, the Overworld).
  • TestCommand.showPos (/test pos [var]): the test block whose structure box contains the looked-at block (15 then 250 blocks), the position relative to the structure, with the bold green commands.test.coordinates copy link (final BlockPos <var> = new BlockPos(x, y, z);) and commands.test.relative_position; no_test_containing_pos. Not done here: the ClientboundGameTestHighlightPosPacket (the packet is not in horizon-protocol yet).
  • TestCommand.createNewStructure (/test create <id> [width [height depth]]): max 48 (too_large), StructureUtils.createNewEmptyTest (space cleared, a test instance block with the given test id, size, no rotation), a bedrock floor over the structure's base, commands.test.create.success.
  • TestCommand.export*: wrong row. vanilla registers export, exportclosest/these/that only under SharedConstants.IS_RUNNING_IN_IDE; the release tree (already here, tree_extra.rs) has none.

What changed

commands/test_locate.rs (locate, pos, create); game_tests.rs (verify_batches, RunnerOptions, grid clearOnBatch, clearBetweenBatches, grid for existing tests); test_runs.rs (test_verify); extra.rs dispatch (the four commands used to fail or answer as with no test blocks).

Vanilla followed

TestCommand.verify/locate/showPos/createNewStructure/outputPlayerCoordinates/isPlayerInCurrentTestDimension, StructureGridSpawner.onBatchStart, GameTestRunner.runBatch, StructureUtils.createNewEmptyTest.

Tests

test_locate::tests (rotated tp target and yaw, command text, distance), game_tests::tests::verify_runs_each_rotation_a_hundred_times_in_its_own_batch. fmt and clippy -D warnings clean. Not run in-game. Locate only sees levels that are open on the server.

🤖 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/4878 **Author:** [@levzzz5154](https://github.com/levzzz5154) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `parity/T3-test-cmds` --- ### 📝 Commits (2) - [`c17233b`](https://github.com/horizon-rust/horizon/commit/c17233b793269b94b9836e04028c078e88d11387) /test verify, locate, pos and create - [`067b587`](https://github.com/horizon-rust/horizon/commit/067b5877d2acec19599d931ecfb3bd586c5aa348) Merge hr/main ### 📊 Changes **5 files changed** (+551 additions, -44 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/commands.rs` (+1 -0) 📝 `crates/horizon-client/src/game/commands/extra.rs` (+6 -21) ➕ `crates/horizon-client/src/game/commands/test_locate.rs` (+342 -0) 📝 `crates/horizon-client/src/game/commands/test_runs.rs` (+32 -7) 📝 `crates/horizon-client/src/game/game_tests.rs` (+170 -16) </details> ### 📄 Description > 🤖 Opened by levzzz5154's AI agent (Claude Code, Claude Sonnet 5.5), not by levzzz5154 personally. Part of #3520 (game-test framework, after #4816, #4824, #4833, #4853, #4873). ## Rows - `TestCommand.verify`: each selected test (and each test block found) runs in all four rotations, 100 copies each (`RetryOptions(1, true)`), one batch per rotation (batch index = rotation ordinal), on a 10-wide `StructureGridSpawner(clearOnBatch)` for new and existing tests alike, `haltOnError`, `clearBetweenBatches` (the previous batch's space is cleared and its blocks destroyed), 100 tests to a batch for reruns. `FailedTestTracker.forgetFailedTests` first. - `TestCommand.locate`: `locate.started`, then every loaded level's test instance blocks within 250 blocks whose test is selected (`findSelectedTestPositionsAcrossDimensions`), each as a green clickable `[x, y, z ->[dimension]]` suggesting `/execute in <dim> run tp @s ..` three blocks in front of the rotated north face, with the horizontal distance (`N/A` in another level); `locate.found`/`locate.done`, `no_test_instances`, and `outputPlayerCoordinates` (the gold `test.player.coordinates` link when the player is not in the only test dimension, the Overworld). - `TestCommand.showPos` (`/test pos [var]`): the test block whose structure box contains the looked-at block (15 then 250 blocks), the position relative to the structure, with the bold green `commands.test.coordinates` copy link (`final BlockPos <var> = new BlockPos(x, y, z);`) and `commands.test.relative_position`; `no_test_containing_pos`. Not done here: the `ClientboundGameTestHighlightPosPacket` (the packet is not in horizon-protocol yet). - `TestCommand.createNewStructure` (`/test create <id> [width [height depth]]`): max 48 (`too_large`), `StructureUtils.createNewEmptyTest` (space cleared, a test instance block with the given test id, size, no rotation), a bedrock floor over the structure's base, `commands.test.create.success`. - `TestCommand.export*`: wrong row. vanilla registers `export`, `exportclosest/these/that` only under `SharedConstants.IS_RUNNING_IN_IDE`; the release tree (already here, `tree_extra.rs`) has none. ## What changed `commands/test_locate.rs` (locate, pos, create); `game_tests.rs` (`verify_batches`, `RunnerOptions`, grid `clearOnBatch`, `clearBetweenBatches`, grid for existing tests); `test_runs.rs` (`test_verify`); `extra.rs` dispatch (the four commands used to fail or answer as with no test blocks). ## Vanilla followed `TestCommand.verify/locate/showPos/createNewStructure/outputPlayerCoordinates/isPlayerInCurrentTestDimension`, `StructureGridSpawner.onBatchStart`, `GameTestRunner.runBatch`, `StructureUtils.createNewEmptyTest`. ## Tests `test_locate::tests` (rotated tp target and yaw, command text, distance), `game_tests::tests::verify_runs_each_rotation_a_hundred_times_in_its_own_batch`. fmt and clippy `-D warnings` clean. Not run in-game. Locate only sees levels that are open on the server. 🤖 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 05:15:52 +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#5912
No description provided.