[PR #5330] [MERGED] Data packs: content_overlay follows the selected pack order #6213

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

📋 Pull Request Information

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

Base: main ← Head: fix-5027


📝 Commits (2)

  • fe76e51 Data packs: content_overlay follows the selected pack order
  • 9dbdda0 Merge main into #5330

📊 Changes

1 file changed (+46 additions, -15 deletions)

View changed files

📝 crates/horizon-client/src/game/functions.rs (+46 -15)

📄 Description

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

Fixes #5027

content_overlay built its pack list from the discovery order (alphabetical), so the recipes, loot tables, advancements and tags of a world's data packs ignored the selected priority order, and /reload kept it. rebuild_store (functions) already walked stack.enabled in the selected order. Both now share PackStack::enabled_packs(), which maps the enabled ids, in order, to their packs; the built-in pack stays first (lowest priority) in rebuild_store and out of content_overlay, as before.

Vanilla: PackRepository keeps an ordered selected list (getSelectedPacks / openAllSelected); a later selected pack overrides an earlier one.

Regression test content_overlay_follows_enabled_order: two data packs override the same recipe, the winner follows datapacks.json in both orders (the b-then-a order fails on the old code). One file, +46 −15.

#5069 is open and touches the same content_overlay lines (it adds an enabled_features parameter); the conflict is a few lines.

Known failures, not caused by this PR

The lan_bot integration tests (crates/horizon-client/tests/lan_bot.rs) fail the same way on upstream/main without this change. I ran cargo test -p horizon-client --test lan_bot on upstream/main at 737540db2 and on this branch (rebased on it): both give the same 8 failures, 6 passed:

  • a_move_behind_a_use_on_a_block_and_its_swing_waits_for_the_next_tick
  • a_move_behind_an_attack_and_its_swing_waits_for_the_next_tick
  • a_respawned_guest_is_immune_until_its_client_loads_the_world
  • guests_see_each_other_and_the_world_entities
  • recipe_settings_packets_update_only_the_players_book_and_survive_save
  • sprint_commands_survive_keyboard_input_changes
  • status_and_join
  • the_prediction_records_each_client_tick_and_the_server_ticks_it_had_seen

The pr_ready run below (against 571ec1b76) listed 7 of them: a_move_behind_an_attack_and_its_swing_waits_for_the_next_tick passed in that run and fails in the two later ones, so it is flaky; the set is otherwise identical.

Parity: pr_ready says "42 affected, 40 passed". There is no failed harness in it: 42 harnesses depend on the changed file, and 40 had no pass for their current inputs, so those 40 ran and all 40 passed (an earlier, interrupted pr_ready run had already recorded a pass for the other 2 with the same inputs). Parity: pass.

pr_ready

pr_ready (tools/pr_ready.py --base upstream/main on tiffany, against upstream/main at 571ec1b76, 32 min 7 s)

Check Result
Scope ✅ 1 files, +46 −15
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 499 passed (39 s)
rustfmt ✅ (7 s)
clippy ✅ (1 min 33 s)
tests: horizon-client ❌ 1395 passed, 7 failed (3 min 46 s)
doc tests ✅ 0 passed (2 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ✅ 42 affected, 40 passed (25 min 42 s)
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Reviewed before opening by a separate read-only Sonnet 5.5 agent: "SIN DEFECTO".

🤖 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/5330 **Author:** [@Joansitoh](https://github.com/Joansitoh) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix-5027` --- ### 📝 Commits (2) - [`fe76e51`](https://github.com/horizon-rust/horizon/commit/fe76e51588f3691da870c67197de273254c090d8) Data packs: content_overlay follows the selected pack order - [`9dbdda0`](https://github.com/horizon-rust/horizon/commit/9dbdda07d5e6df8e302a30c872d2b508524c4927) Merge main into #5330 ### 📊 Changes **1 file changed** (+46 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/functions.rs` (+46 -15) </details> ### 📄 Description > 🤖 Opened by Joansitoh's AI agent (Claude Code, Sonnet 5.5), not by Joansitoh personally. Fixes #5027 `content_overlay` built its pack list from the discovery order (alphabetical), so the recipes, loot tables, advancements and tags of a world's data packs ignored the selected priority order, and `/reload` kept it. `rebuild_store` (functions) already walked `stack.enabled` in the selected order. Both now share `PackStack::enabled_packs()`, which maps the enabled ids, in order, to their packs; the built-in pack stays first (lowest priority) in `rebuild_store` and out of `content_overlay`, as before. Vanilla: `PackRepository` keeps an ordered `selected` list (`getSelectedPacks` / `openAllSelected`); a later selected pack overrides an earlier one. Regression test `content_overlay_follows_enabled_order`: two data packs override the same recipe, the winner follows `datapacks.json` in both orders (the b-then-a order fails on the old code). One file, +46 −15. #5069 is open and touches the same `content_overlay` lines (it adds an `enabled_features` parameter); the conflict is a few lines. ## Known failures, not caused by this PR The `lan_bot` integration tests (`crates/horizon-client/tests/lan_bot.rs`) fail the same way on `upstream/main` without this change. I ran `cargo test -p horizon-client --test lan_bot` on `upstream/main` at 737540db2 and on this branch (rebased on it): both give the same 8 failures, 6 passed: - a_move_behind_a_use_on_a_block_and_its_swing_waits_for_the_next_tick - a_move_behind_an_attack_and_its_swing_waits_for_the_next_tick - a_respawned_guest_is_immune_until_its_client_loads_the_world - guests_see_each_other_and_the_world_entities - recipe_settings_packets_update_only_the_players_book_and_survive_save - sprint_commands_survive_keyboard_input_changes - status_and_join - the_prediction_records_each_client_tick_and_the_server_ticks_it_had_seen The `pr_ready` run below (against 571ec1b76) listed 7 of them: `a_move_behind_an_attack_and_its_swing_waits_for_the_next_tick` passed in that run and fails in the two later ones, so it is flaky; the set is otherwise identical. Parity: `pr_ready` says "42 affected, 40 passed". There is no failed harness in it: 42 harnesses depend on the changed file, and 40 had no pass for their current inputs, so those 40 ran and all 40 passed (an earlier, interrupted `pr_ready` run had already recorded a pass for the other 2 with the same inputs). `Parity: pass`. ## pr_ready **pr_ready** (`tools/pr_ready.py --base upstream/main` on tiffany, against upstream/main at 571ec1b76, 32 min 7 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +46 −15 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 499 passed (39 s) | | rustfmt | ✅ (7 s) | | clippy | ✅ (1 min 33 s) | | tests: horizon-client | ❌ 1395 passed, 7 failed (3 min 46 s) | | doc tests | ✅ 0 passed (2 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ✅ 42 affected, 40 passed (25 min 42 s) | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | Reviewed before opening by a separate read-only Sonnet 5.5 agent: "SIN DEFECTO". 🤖 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 06:15:57 +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#6213
No description provided.