[PR #5646] [MERGED] Command-exec parity: an orb boxed in, and group failures counted by position #6412

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5646
Author: @JustKarkat
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: test/experience-orb-stuck-case


📝 Commits (3)

  • 564206a Command-exec corpus: an orb boxed in, out of a block
  • ad13f8c Command-exec parity: a group's failures, counted by position
  • 938f032 Merge main into #5646

📊 Changes

2 files changed (+31 additions, -3 deletions)

View changed files

📝 tools/command_exec_corpus.py (+25 -0)
📝 tools/test_command_exec_parity.py (+6 -3)

📄 Description

🤖 Opened by JustKarkat's AI agent (ZCode), not by JustKarkat personally.

Two test-only commits split out of #5601 at the maintainer review's suggestion, so the fix PR keeps its own scope.

1. An orb boxed in, out of a block

The review of #5601 noticed the "experience orb fall" group never reaches the one path of ExperienceOrb.tick that draws a random — the push out of a block — and asked for a case that pins it.

experience orb stuck: a 3x3 block placed over a settled orb leaves it colliding with only its top face free, 25 blocks from the player and so out of the 8 block follow radius. The server nudges it up (Entity.moveTowardsClosestSpace, nextFloat() * 0.2 + 0.1) with gravity skipped while its box is inside blocks, and it comes to rest on top of the block. The draw's magnitude only decides how many ticks the escape takes, so every checkpoint after it is the same either way — nothing here depends on the random matching between the two implementations.

  • With #5601's fix in: 4/4 commands match to the digit, stable over three reruns.
  • Mutation-checked: with the push disabled the group fails — rust leaves the orb boxed in at y 215 where vanilla rests it at 216.
  • On today's main: 2/4, because the push is what #5601 adds. This PR is a draft until #5601 merges, then it is a plain green test-only change.

2. Group failures counted by position

Found while adding the case. The per-group summary charged a group with every mismatch whose command text also appeared in it, so two groups probing the same thing (the orb groups' identical data get entity @e[type=minecraft:experience_orb,...] lines) each showed the other's failures — the fall group read 1/10 while its own commands all matched. The per-group ranges are already positions, so count by those.

With #5601 in, the whole corpus is 973/973 commands match.

🤖 Commits carry Co-Authored-By: JustKarkat's AI agent (ZCode) <noreply@anthropic.com>.


🔄 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/5646 **Author:** [@JustKarkat](https://github.com/JustKarkat) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `test/experience-orb-stuck-case` --- ### 📝 Commits (3) - [`564206a`](https://github.com/horizon-rust/horizon/commit/564206afb79ddb15459dea563dd85cb4e099dd91) Command-exec corpus: an orb boxed in, out of a block - [`ad13f8c`](https://github.com/horizon-rust/horizon/commit/ad13f8c39c37124142650dd9f91e629e77478b5f) Command-exec parity: a group's failures, counted by position - [`938f032`](https://github.com/horizon-rust/horizon/commit/938f0323ac83377c41247719f5ff87d069da6d96) Merge main into #5646 ### 📊 Changes **2 files changed** (+31 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `tools/command_exec_corpus.py` (+25 -0) 📝 `tools/test_command_exec_parity.py` (+6 -3) </details> ### 📄 Description > 🤖 Opened by JustKarkat's AI agent (ZCode), not by JustKarkat personally. Two test-only commits split out of #5601 at the maintainer review's suggestion, so the fix PR keeps its own scope. ## 1. An orb boxed in, out of a block The review of #5601 noticed the "experience orb fall" group never reaches the one path of `ExperienceOrb.tick` that draws a random — the push out of a block — and asked for a case that pins it. `experience orb stuck`: a 3x3 block placed over a settled orb leaves it colliding with only its top face free, 25 blocks from the player and so out of the 8 block follow radius. The server nudges it up (`Entity.moveTowardsClosestSpace`, `nextFloat() * 0.2 + 0.1`) with gravity skipped while its box is inside blocks, and it comes to rest on top of the block. The draw's magnitude only decides how many ticks the escape takes, so every checkpoint after it is the same either way — nothing here depends on the random matching between the two implementations. - With #5601's fix in: **4/4 commands match to the digit**, stable over three reruns. - Mutation-checked: with the push disabled the group fails — rust leaves the orb boxed in at y 215 where vanilla rests it at 216. - On today's `main`: 2/4, because the push is what #5601 adds. **This PR is a draft until #5601 merges**, then it is a plain green test-only change. ## 2. Group failures counted by position Found while adding the case. The per-group summary charged a group with every mismatch whose *command text* also appeared in it, so two groups probing the same thing (the orb groups' identical `data get entity @e[type=minecraft:experience_orb,...]` lines) each showed the other's failures — the fall group read 1/10 while its own commands all matched. The per-group ranges are already positions, so count by those. With #5601 in, the whole corpus is **973/973 commands match**. > 🤖 Commits carry `Co-Authored-By: JustKarkat's AI agent (ZCode) <noreply@anthropic.com>`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:20:11 +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#6412
No description provided.