[PR #1808] [CLOSED] Preserve world and player state across backups #3779

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1808
Author: @CateDesu
Created: 10/25/2026
Status: ❌ Closed

Base: main ← Head: main


📝 Commits (1)

  • a134164 Preserve world and player state across backups

📊 Changes

99 files changed (+7533 additions, -756 deletions)

View changed files

📝 crates/horizon-client/examples/probe/first_person_probe.rs (+1 -1)
📝 crates/horizon-client/examples/probe/pack_resources_fixture.rs (+13 -5)
📝 crates/horizon-client/src/command_storage.rs (+16 -13)
📝 crates/horizon-client/src/entity.wgsl (+37 -4)
📝 crates/horizon-client/src/entity_nbt.rs (+41 -2)
📝 crates/horizon-client/src/game.rs (+42 -13)
📝 crates/horizon-client/src/game/advancements.rs (+3 -8)
📝 crates/horizon-client/src/game/bossbars.rs (+1 -1)
📝 crates/horizon-client/src/game/chat.rs (+12 -8)
📝 crates/horizon-client/src/game/combat.rs (+2 -0)
📝 crates/horizon-client/src/game/commands/data.rs (+1 -5)
📝 crates/horizon-client/src/game/commands/place.rs (+8 -6)
📝 crates/horizon-client/src/game/creatures.rs (+162 -51)
📝 crates/horizon-client/src/game/dedicated.rs (+43 -29)
📝 crates/horizon-client/src/game/dedicated/status.rs (+68 -8)
📝 crates/horizon-client/src/game/deflect.rs (+5 -0)
📝 crates/horizon-client/src/game/dragon.rs (+22 -8)
📝 crates/horizon-client/src/game/end.rs (+17 -7)
📝 crates/horizon-client/src/game/explosion.rs (+9 -2)
📝 crates/horizon-client/src/game/functions.rs (+7 -6)

...and 79 more files

📄 Description

CateDesu has reviewed these changes.

What and why

This draft now contains the completed local repairs in one combined commit. Nine component groups were reviewed separately; no additional PRs have been opened.

  • Coordinate live backup snapshots, online player saves and restore completion while preserving local, dedicated and legacy player ownership.
  • Preserve projectile ownership through reloads, reconnects and dimension changes. Credit direct and blast kills to the shooter, expire damage memory correctly, and evaluate advancement rewards in the owner's dimension while damage stays in the impact world.
  • Pair guest projectiles before their first simulation tick and consume frozen tick steps once per server tick across all levels.
  • Correct padded packet-header decoding, palette bounds, inferred modpack paths and launcher replies after log truncation.
  • Preserve snow shader rounding and repair parity fixtures for fonts, paths with spaces, chunk-view capture, status EOF, live statistics publication and the LOD deadline.

Verification and remaining holds

Both independent reviews accept the foundation, tracking, shared fixture, protocol, launcher, modpack and weather components on their exact reviewed sources. Their completed source-specific gates remain valid. The combined tree is identical to the reviewed local integration candidate; the commit history is consolidated here.

The projectile comparison passes all eight scenarios on both native engines, preserving the original unload, kill-credit and XP checks. Separate in-frame host-impact proof preserves host damage and leaves shooter and bystander unharmed. Old binaries and selective mutants fail the intended ownership, timing and damage-context assertions. Tracking proof requires a real first-tick throw, actual owner, one spawn, matching removal and inventory consumption. Weather passes all 57,393 exact GPU cases; LOD completes all original assertions in default and fast profiles.

This PR remains draft and is not ready to merge. The revised projectile and combined full gates are still pending. The backup gate's first command comparison failed 827/828, then passed on the stock retry. One isolated diagnostic reproduced the count mismatch and identified an extra minecraft:blocks/fire random stream. Vanilla permits that stream; the initiating removal event and the original run's extra key remain unknown. Neither the retry nor these reviews waive the failure.

Three fresh dedicated-server, operator-feedback and knockback rounds passed with their existing comparisons. Knockback retains the upstream pvp-mace exclusion: 20 of 21 cases match. Earlier retry causes remain unproven. Native proof is Linux only; weather GPU proof used RX 7900 XTX/Vulkan RADV, with no native Metal or DX12 claim. Blast tests prove ownership and victim selection, not identical health magnitudes across modes. Existing guest-fireball collision eligibility, global mob-owner lookup, crystal-blast collateral credit and dead-owner coverage are outside the demonstrated repair.

Vanilla reference

Pinned Minecraft 26.3: MinecraftServer.saveEverything/saveAllChunks, PlayerList.saveAll/save, SaveAllCommand, SaveOffCommand, SaveOnCommand, PrimaryLevelData, Projectile.getOwner, EntityReference, LargeFireball.onHit, ServerExplosion, LivingEntity damage memory, advancement predicates/rewards, ChunkMap tracking, packet framing and weather arithmetic. The snapshot lease and launcher/modpack behavior are Horizon-only.

Self-check

The exact combined head still needs its final full pr_ready run. The block below is retained historical evidence for the previous published head, not a passing result for this update. Current component and focused native results are summarized above.

pr_ready (tools/pr_ready.py --base upstream/main on Meow, against upstream/main at 3a419877b, 30 min 44 s)

Check Result
Scope ⚠️ 60 files, +5208 −601; 4844 lines of code: over 500, split it if it can ship in parts; mixes game, launcher
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 270 passed (14 s)
rustfmt ✅ (3 s)
clippy ✅ (23 s)
tests: horizon-client, horizon-port-pack, horizon-protocol, horizon-server, horizon-world ✅ 1714 passed (2 min 25 s)
doc tests ✅ 0 passed (3 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ✅ (1 s)
launcher clippy ✅ (2 s)
launcher tests ✅ 120 passed (6 s)
Parity ❌ 312 affected, 308 passed (27 min 24 s)
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🔄 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/1808 **Author:** [@CateDesu](https://github.com/CateDesu) **Created:** 10/25/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`a134164`](https://github.com/horizon-rust/horizon/commit/a13416402e633b132e28a0fe6ae54dc41e450710) Preserve world and player state across backups ### 📊 Changes **99 files changed** (+7533 additions, -756 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/examples/probe/first_person_probe.rs` (+1 -1) 📝 `crates/horizon-client/examples/probe/pack_resources_fixture.rs` (+13 -5) 📝 `crates/horizon-client/src/command_storage.rs` (+16 -13) 📝 `crates/horizon-client/src/entity.wgsl` (+37 -4) 📝 `crates/horizon-client/src/entity_nbt.rs` (+41 -2) 📝 `crates/horizon-client/src/game.rs` (+42 -13) 📝 `crates/horizon-client/src/game/advancements.rs` (+3 -8) 📝 `crates/horizon-client/src/game/bossbars.rs` (+1 -1) 📝 `crates/horizon-client/src/game/chat.rs` (+12 -8) 📝 `crates/horizon-client/src/game/combat.rs` (+2 -0) 📝 `crates/horizon-client/src/game/commands/data.rs` (+1 -5) 📝 `crates/horizon-client/src/game/commands/place.rs` (+8 -6) 📝 `crates/horizon-client/src/game/creatures.rs` (+162 -51) 📝 `crates/horizon-client/src/game/dedicated.rs` (+43 -29) 📝 `crates/horizon-client/src/game/dedicated/status.rs` (+68 -8) 📝 `crates/horizon-client/src/game/deflect.rs` (+5 -0) 📝 `crates/horizon-client/src/game/dragon.rs` (+22 -8) 📝 `crates/horizon-client/src/game/end.rs` (+17 -7) 📝 `crates/horizon-client/src/game/explosion.rs` (+9 -2) 📝 `crates/horizon-client/src/game/functions.rs` (+7 -6) _...and 79 more files_ </details> ### 📄 Description CateDesu has reviewed these changes. ## What and why This draft now contains the completed local repairs in one combined commit. Nine component groups were reviewed separately; no additional PRs have been opened. - Coordinate live backup snapshots, online player saves and restore completion while preserving local, dedicated and legacy player ownership. - Preserve projectile ownership through reloads, reconnects and dimension changes. Credit direct and blast kills to the shooter, expire damage memory correctly, and evaluate advancement rewards in the owner's dimension while damage stays in the impact world. - Pair guest projectiles before their first simulation tick and consume frozen tick steps once per server tick across all levels. - Correct padded packet-header decoding, palette bounds, inferred modpack paths and launcher replies after log truncation. - Preserve snow shader rounding and repair parity fixtures for fonts, paths with spaces, chunk-view capture, status EOF, live statistics publication and the LOD deadline. ## Verification and remaining holds Both independent reviews accept the foundation, tracking, shared fixture, protocol, launcher, modpack and weather components on their exact reviewed sources. Their completed source-specific gates remain valid. The combined tree is identical to the reviewed local integration candidate; the commit history is consolidated here. The projectile comparison passes all eight scenarios on both native engines, preserving the original unload, kill-credit and XP checks. Separate in-frame host-impact proof preserves host damage and leaves shooter and bystander unharmed. Old binaries and selective mutants fail the intended ownership, timing and damage-context assertions. Tracking proof requires a real first-tick throw, actual owner, one spawn, matching removal and inventory consumption. Weather passes all 57,393 exact GPU cases; LOD completes all original assertions in default and fast profiles. **This PR remains draft and is not ready to merge.** The revised projectile and combined full gates are still pending. The backup gate's first command comparison failed 827/828, then passed on the stock retry. One isolated diagnostic reproduced the count mismatch and identified an extra `minecraft:blocks/fire` random stream. Vanilla permits that stream; the initiating removal event and the original run's extra key remain unknown. Neither the retry nor these reviews waive the failure. Three fresh dedicated-server, operator-feedback and knockback rounds passed with their existing comparisons. Knockback retains the upstream `pvp-mace` exclusion: 20 of 21 cases match. Earlier retry causes remain unproven. Native proof is Linux only; weather GPU proof used RX 7900 XTX/Vulkan RADV, with no native Metal or DX12 claim. Blast tests prove ownership and victim selection, not identical health magnitudes across modes. Existing guest-fireball collision eligibility, global mob-owner lookup, crystal-blast collateral credit and dead-owner coverage are outside the demonstrated repair. ## Vanilla reference Pinned Minecraft 26.3: `MinecraftServer.saveEverything/saveAllChunks`, `PlayerList.saveAll/save`, `SaveAllCommand`, `SaveOffCommand`, `SaveOnCommand`, `PrimaryLevelData`, `Projectile.getOwner`, `EntityReference`, `LargeFireball.onHit`, `ServerExplosion`, `LivingEntity` damage memory, advancement predicates/rewards, `ChunkMap` tracking, packet framing and weather arithmetic. The snapshot lease and launcher/modpack behavior are Horizon-only. ## Self-check The exact combined head still needs its final full `pr_ready` run. The block below is retained historical evidence for the previous published head, not a passing result for this update. Current component and focused native results are summarized above. **pr_ready** (`tools/pr_ready.py --base upstream/main` on Meow, against upstream/main at 3a419877b, 30 min 44 s) | Check | Result | | --- | --- | | Scope | ⚠️ 60 files, +5208 −601; 4844 lines of code: over 500, split it if it can ship in parts; mixes game, launcher | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 270 passed (14 s) | | rustfmt | ✅ (3 s) | | clippy | ✅ (23 s) | | tests: horizon-client, horizon-port-pack, horizon-protocol, horizon-server, horizon-world | ✅ 1714 passed (2 min 25 s) | | doc tests | ✅ 0 passed (3 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ✅ (1 s) | | launcher clippy | ✅ (2 s) | | launcher tests | ✅ 120 passed (6 s) | | Parity | ❌ 312 affected, 308 passed (27 min 24 s) | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:12:15 +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#3779
No description provided.