[PR #5375] [MERGED] #4124: jump-mining parity scenarios, and what they rule out #6248

Closed
opened 2026-11-03 06:16:20 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5375
Author: @oxi-does-dev
Created: 10/31/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @ludovic111

Base: main ← Head: jump-mining-harness


📝 Commits (1)

  • d1f41bf #4124: jump-mining parity scenarios in the first-person harness

📊 Changes

1 file changed (+12 additions, -0 deletions)

View changed files

📝 tools/test_first_person_parity.py (+12 -0)

📄 Description

Part of #4124 (edited by Ludovic's AI agent so the issue stays open; analysis: the bug itself needs one more experiment or a maintainer's pointer).

What the report says

Mining a block above the player while jumping into reach: in vanilla the
crack state persists across the falls, in Horizon it resets each time the
player lands.

What this PR adds

Three jump-mining scenarios in tools/test_first_person_parity.py: the
attack stays held, the aim is lost for three ticks on the way down and
found again on the next jump, three times, then the block finishes
breaking — with a pick, without a tool, and stone by hand.

All 4,199 cases match the pinned 26.3 client (python3
tools/test_first_person_parity.py, 382,522 output lines).

What that rules out

The scripted-hit harness drives MultiPlayerGameMode (startDestroyBlock /
continueDestroyBlock / stopDestroyBlock) with the exact miss-flicker pattern
the report describes, and Horizon's client logic matches vanilla tick by
tick: sameDestroyTarget resets and a miss calls stopDestroyBlock in both.

I also checked the eye-ray itself (Game::clip_ray vs vanilla's
BlockGetter.trace via slab boxes) and the server's
ServerPlayerGameMode.handleBlockBreakAction / abortDestroyBlock —
nothing keeps progress across an ABORT there either.

Where the divergence can still live

Two suspects, both outside what a scripted-hit harness can see:

  1. The eye-ray under vertical motion — vanilla's pick runs per frame
    from the live eye position and Player.isWithinBlockInteractionRange
    measures an AABB-to-eye distance with a +1.0 buffer, while Game::reach
    clips a flat 4.5 ray; at the reach boundary the two can flicker
    differently while the player falls.
  2. The server's delayed destroy (hasDelayedDestroy,
    delayedTickStart) — visible only on a real server round-trip.

Reproducing against a live pinned client (jump-hold-break above) would pin
it down; the harness here at least locks the client-side logic in.

pr_ready
pr_ready (tools/pr_ready.py on arch, against origin/main at c7dcaf2b7):
| Scope | ✅ 1 file, +12 −0 |
| Cargo.lock | ✅ unchanged |
| Public tree | ✅ |
| Python tests | ✅ 495 passed |
| Parity | ✅ first_person 4,199/4,199 (run without --quick before the branch split) |

🔄 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/5375 **Author:** [@oxi-does-dev](https://github.com/oxi-does-dev) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `jump-mining-harness` --- ### 📝 Commits (1) - [`d1f41bf`](https://github.com/horizon-rust/horizon/commit/d1f41bf7e71d262b0d473d0480e9437e894fb9d1) #4124: jump-mining parity scenarios in the first-person harness ### 📊 Changes **1 file changed** (+12 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `tools/test_first_person_parity.py` (+12 -0) </details> ### 📄 Description Part of #4124 (edited by Ludovic's AI agent so the issue stays open; analysis: the bug itself needs one more experiment or a maintainer's pointer). ## What the report says Mining a block above the player while jumping into reach: in vanilla the crack state persists across the falls, in Horizon it resets each time the player lands. ## What this PR adds Three jump-mining scenarios in `tools/test_first_person_parity.py`: the attack stays held, the aim is lost for three ticks on the way down and found again on the next jump, three times, then the block finishes breaking — with a pick, without a tool, and stone by hand. **All 4,199 cases match the pinned 26.3 client** (python3 tools/test_first_person_parity.py, 382,522 output lines). ## What that rules out The scripted-hit harness drives `MultiPlayerGameMode` (startDestroyBlock / continueDestroyBlock / stopDestroyBlock) with the exact miss-flicker pattern the report describes, and Horizon's client logic matches vanilla tick by tick: `sameDestroyTarget` resets and a miss calls `stopDestroyBlock` in both. I also checked the eye-ray itself (`Game::clip_ray` vs vanilla's `BlockGetter.trace` via slab boxes) and the server's `ServerPlayerGameMode.handleBlockBreakAction` / `abortDestroyBlock` — nothing keeps progress across an ABORT there either. ## Where the divergence can still live Two suspects, both outside what a scripted-hit harness can see: 1. **The eye-ray under vertical motion** — vanilla's `pick` runs per frame from the live eye position and `Player.isWithinBlockInteractionRange` measures an AABB-to-eye distance with a +1.0 buffer, while `Game::reach` clips a flat 4.5 ray; at the reach boundary the two can flicker differently while the player falls. 2. **The server's delayed destroy** (`hasDelayedDestroy`, `delayedTickStart`) — visible only on a real server round-trip. Reproducing against a live pinned client (jump-hold-break above) would pin it down; the harness here at least locks the client-side logic in. <details> <summary>pr_ready</summary> ``` pr_ready (tools/pr_ready.py on arch, against origin/main at c7dcaf2b7): | Scope | ✅ 1 file, +12 −0 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 495 passed | | Parity | ✅ first_person 4,199/4,199 (run without --quick before the branch split) | ``` </details> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:16:20 +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#6248
No description provided.