[PR #4700] [MERGED] Validate content registry identity data #5788

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4700
Author: @arismoko
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @levzzz5154

Base: main ← Head: cleanup-content-identity


📝 Commits (2)

  • 16cb6a1 Validate content registry identity data
  • c6cf721 Merge remote-tracking branch 'hr/main' into fix/pr-4700

📊 Changes

3 files changed (+51 additions, -20 deletions)

View changed files

📝 crates/horizon-client/src/content_identity.rs (+49 -18)
📝 crates/horizon-client/src/lan/data.rs (+1 -1)
📝 crates/horizon-client/src/net.rs (+1 -1)

📄 Description

🤖 Opened by Aria's agent swarm, Dyna, not by Aria.

Closes #4616.

Parse the hashed block-state identity into typed values and retain typed read and JSON errors. Keep the per-root cache to preserve identity stability and avoid reparsing facts.json for every join.

This deliberately narrows accepted malformed input: state rows must contain exactly five elements, and the state must be an object with a string id and optional string properties. The exporter writes this shape. A one-time comparison of all 35,723 states in a prepared 26.3 facts.json gave the same SHA-256 before and after this change: 244d1bae04fb5c1dcab3b6a8a5ef8efb02c100a117e8c00e5d1570eebcd8dd15.

Real-game checks on head 16cb6a1204: a LAN guest joined the server-thread host with matching content identity. For the mismatch check, the guest loaded valid resources, then two non-default state rows in its facts.json were swapped before connecting; the host rejected its identity. A guest also joined a dedicated server with matching identity.

Xvfb reruns on arch passed remote_fireball, remote_fireworks, server_player_sculk, and return_to_sender on this head. friends_integration timed out waiting for the host world with zero chunks on this head and on base 0a825b42a2 under the same conditions. The readiness block below records the original desktop run without a display.

pr_ready (tools/pr_ready.py --base upstream/main on desktop, against upstream/main at 0a825b42a, 13 min 38 s)

Check Result
Scope ✅ 3 files, +51 −20
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 482 passed (18 s)
rustfmt ✅ (9 s)
clippy ✅ (1 min 10 s)
tests: horizon-client ✅ 1150 passed (3 min 41 s)
doc tests ✅ 0 passed (1 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 ❌ 16 affected, 10 passed, failed: friends_integration, remote_fireball, remote_fireworks, return_to_sender, server_player_sculk (8 min 8 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/4700 **Author:** [@arismoko](https://github.com/arismoko) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `cleanup-content-identity` --- ### 📝 Commits (2) - [`16cb6a1`](https://github.com/horizon-rust/horizon/commit/16cb6a1204e0026eef912424cb6e6ada7d18d183) Validate content registry identity data - [`c6cf721`](https://github.com/horizon-rust/horizon/commit/c6cf721a910095506ca663b5c73ba142c81a5beb) Merge remote-tracking branch 'hr/main' into fix/pr-4700 ### 📊 Changes **3 files changed** (+51 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/content_identity.rs` (+49 -18) 📝 `crates/horizon-client/src/lan/data.rs` (+1 -1) 📝 `crates/horizon-client/src/net.rs` (+1 -1) </details> ### 📄 Description > 🤖 Opened by Aria's agent swarm, Dyna, not by Aria. Closes #4616. Parse the hashed block-state identity into typed values and retain typed read and JSON errors. Keep the per-root cache to preserve identity stability and avoid reparsing facts.json for every join. This deliberately narrows accepted malformed input: state rows must contain exactly five elements, and the state must be an object with a string id and optional string properties. The exporter writes this shape. A one-time comparison of all 35,723 states in a prepared 26.3 facts.json gave the same SHA-256 before and after this change: 244d1bae04fb5c1dcab3b6a8a5ef8efb02c100a117e8c00e5d1570eebcd8dd15. Real-game checks on head 16cb6a1204e0026eef912424cb6e6ada7d18d183: a LAN guest joined the server-thread host with matching content identity. For the mismatch check, the guest loaded valid resources, then two non-default state rows in its facts.json were swapped before connecting; the host rejected its identity. A guest also joined a dedicated server with matching identity. Xvfb reruns on arch passed remote_fireball, remote_fireworks, server_player_sculk, and return_to_sender on this head. friends_integration timed out waiting for the host world with zero chunks on this head and on base 0a825b42a258a9b6285f16564a6d2660213a90b9 under the same conditions. The readiness block below records the original desktop run without a display. **pr_ready** (`tools/pr_ready.py --base upstream/main` on desktop, against upstream/main at 0a825b42a, 13 min 38 s) | Check | Result | | --- | --- | | Scope | ✅ 3 files, +51 −20 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 482 passed (18 s) | | rustfmt | ✅ (9 s) | | clippy | ✅ (1 min 10 s) | | tests: horizon-client | ✅ 1150 passed (3 min 41 s) | | doc tests | ✅ 0 passed (1 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 | ❌ 16 affected, 10 passed, failed: friends_integration, remote_fireball, remote_fireworks, return_to_sender, server_player_sculk (8 min 8 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 05:15:00 +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#5788
No description provided.