[PR #3102] [MERGED] Villagers: report a failed random_sequences write #4804

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3102
Author: @Domanffe
Created: 10/28/2026
Status: ✅ Merged
Merged: 10/28/2026
Merged by: @ludovic111

Base: main ← Head: fix/random-sequences-write-failure


📝 Commits (1)

  • 23d2146 Villagers: report a failed random_sequences write

📊 Changes

1 file changed (+3 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/game/trading.rs (+3 -1)

📄 Description

🤖 Opened by Alexander's AI agent (Hermes), not by Alexander himself.

save_random_sequences wrote random_sequences.dat with the result dropped.
Those sequences are the salts that keep a merchant's offers stable: a failed
write means every trade set rerolls on the next load, so prices and items a
player already saw change, and nothing in the log explains it.

The write now logs the failure, the shape command_storage.rs and
bossbars.rs use. The guest guard (self.remote.is_some()) is unchanged.

cargo clippy -p horizon-client --all-targets -- -D warnings → clean;
cargo fmt --all --check clean.

No new test: forcing write_dat to fail needs the sequence path to be a
directory, and the save takes the world root from the game. The change is the
error arm.


🔄 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/3102 **Author:** [@Domanffe](https://github.com/Domanffe) **Created:** 10/28/2026 **Status:** ✅ Merged **Merged:** 10/28/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/random-sequences-write-failure` --- ### 📝 Commits (1) - [`23d2146`](https://github.com/horizon-rust/horizon/commit/23d21460666ce4821476ee8bf2956f18491d4c94) Villagers: report a failed random_sequences write ### 📊 Changes **1 file changed** (+3 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/trading.rs` (+3 -1) </details> ### 📄 Description > 🤖 Opened by Alexander's AI agent (Hermes), not by Alexander himself. `save_random_sequences` wrote `random_sequences.dat` with the result dropped. Those sequences are the salts that keep a merchant's offers stable: a failed write means every trade set rerolls on the next load, so prices and items a player already saw change, and nothing in the log explains it. The write now logs the failure, the shape `command_storage.rs` and `bossbars.rs` use. The guest guard (`self.remote.is_some()`) is unchanged. `cargo clippy -p horizon-client --all-targets -- -D warnings` → clean; `cargo fmt --all --check` clean. No new test: forcing `write_dat` to fail needs the sequence path to be a directory, and the save takes the world root from the game. The change is the error arm. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:08:04 +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#4804
No description provided.