[PR #1060] [CLOSED] test: cover furnace inventory drops before and after reload (#1055) #3013

Closed
opened 2026-11-02 16:00:49 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1060
Author: @rdbtCVS
Created: 10/20/2026
Status: ❌ Closed

Base: main ← Head: t3/investigate-issue-1055


📝 Commits (1)

  • 47c06e4 test: cover furnace inventory drops before and after reload

📊 Changes

2 files changed (+56 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/game/dispense_fixture.rs (+35 -0)
📝 tools/test_block_removal_parity.py (+21 -0)

📄 Description

What and why

Adds deterministic regression coverage for #1055: mining furnaces must preserve the input, fuel and output stacks, including item components and stack counts. Covers furnaces, blast furnaces and smokers, both lit states, fresh inventories and a chunk serialization/load round trip, with diamond/wooden pickaxes and an empty hand (36 cases).

This is a draft investigation PR, not a confirmed fix. I could not reproduce the reported item loss on base commit defaa7cd. The existing gameplay removal code already spills furnace inventories, so this change only extends the fixture and regression corpus and does not close #1055.

Vanilla reference

BlockEntity.preRemoveSideEffects calls Containers.dropContents for containers. AbstractFurnaceBlockEntity.preRemoveSideEffects calls that superclass method before awarding recipe experience. Checked with tools/rea_vanilla.py; the regression corpus runs against VanillaDispenserOracle through the existing block-removal harness. Horizon's optional chunk round trip occurs before recording the removal and is compared with the same inventory in vanilla.

Validation

  • All 36 deterministic cases matched the rebuilt vanilla oracle: item types, counts, components, positions, motion, events, tool wear and random state. Used the current source-built headless client and the harness's comparator.
  • Live singleplayer: created a furnace with 64 iron ore, 32 coal and 48 iron ingots; mined it with the mouse-driven horizon-ctl break action after it lit. It dropped 64 ore, 31 coal, 48 ingots and the furnace (one coal had been consumed).
  • Saved another populated furnace, exited, reopened the world with --server-thread, and mined it through the integrated server's multiplayer connection. The same complete inventory dropped.

Self-check

pr_ready.py --quick --base origin/main is running. Public-tree checks, Python tests, rustfmt and workspace clippy have passed; client tests are pending. The completed report will be added before handoff.


🔄 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/1060 **Author:** [@rdbtCVS](https://github.com/rdbtCVS) **Created:** 10/20/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `t3/investigate-issue-1055` --- ### 📝 Commits (1) - [`47c06e4`](https://github.com/horizon-rust/horizon/commit/47c06e47fbe7bb3866d36a87c25462afe3fcfa45) test: cover furnace inventory drops before and after reload ### 📊 Changes **2 files changed** (+56 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/dispense_fixture.rs` (+35 -0) 📝 `tools/test_block_removal_parity.py` (+21 -0) </details> ### 📄 Description ## What and why Adds deterministic regression coverage for #1055: mining furnaces must preserve the input, fuel and output stacks, including item components and stack counts. Covers furnaces, blast furnaces and smokers, both lit states, fresh inventories and a chunk serialization/load round trip, with diamond/wooden pickaxes and an empty hand (36 cases). **This is a draft investigation PR, not a confirmed fix.** I could not reproduce the reported item loss on base commit `defaa7cd`. The existing gameplay removal code already spills furnace inventories, so this change only extends the fixture and regression corpus and does not close #1055. ## Vanilla reference `BlockEntity.preRemoveSideEffects` calls `Containers.dropContents` for containers. `AbstractFurnaceBlockEntity.preRemoveSideEffects` calls that superclass method before awarding recipe experience. Checked with `tools/rea_vanilla.py`; the regression corpus runs against `VanillaDispenserOracle` through the existing block-removal harness. Horizon's optional chunk round trip occurs before recording the removal and is compared with the same inventory in vanilla. ## Validation - All 36 deterministic cases matched the rebuilt vanilla oracle: item types, counts, components, positions, motion, events, tool wear and random state. Used the current source-built headless client and the harness's comparator. - Live singleplayer: created a furnace with 64 iron ore, 32 coal and 48 iron ingots; mined it with the mouse-driven `horizon-ctl break` action after it lit. It dropped 64 ore, 31 coal, 48 ingots and the furnace (one coal had been consumed). - Saved another populated furnace, exited, reopened the world with `--server-thread`, and mined it through the integrated server's multiplayer connection. The same complete inventory dropped. ## Self-check `pr_ready.py --quick --base origin/main` is running. Public-tree checks, Python tests, rustfmt and workspace clippy have passed; client tests are pending. The completed report will be added before handoff. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 16:00:49 +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#3013
No description provided.