[PR #3099] [MERGED] Launcher: write the server list beside it and rename #4801

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

📋 Pull Request Information

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

Base: main ← Head: fix/launcher-servers-atomic-list


📝 Commits (2)

  • f755d7f Launcher: write the server list beside it and rename
  • b27d4b8 Launcher: flush the server list before renaming it

📊 Changes

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

View changed files

📝 launcher/src/servers.rs (+12 -1)

📄 Description

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

save_list wrote servers.json in place. A crash or a power loss in the
middle of that write leaves a truncated file, and list() reads an unparsable
list as empty: every server disappears from the sidebar, though the folders
are still on disk.

The list now goes to servers.json.tmp and is renamed over the real file,
which is the same shape backend.rs uses for its state files. list() is
unchanged: a failed rename leaves the previous list in place.

Evidence: cargo test --lib in launcher/ →
197 passed; 0 failed; 3 ignored; cargo fmt --all --check clean.

No new test: save_list writes to the launcher's data directory, and the test
module does not redirect it. The change is the two calls between the encode
and the return.


🔄 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/3099 **Author:** [@Domanffe](https://github.com/Domanffe) **Created:** 10/28/2026 **Status:** ✅ Merged **Merged:** 10/29/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `fix/launcher-servers-atomic-list` --- ### 📝 Commits (2) - [`f755d7f`](https://github.com/horizon-rust/horizon/commit/f755d7fba0e4462f89251162bf9316a8b69c92a6) Launcher: write the server list beside it and rename - [`b27d4b8`](https://github.com/horizon-rust/horizon/commit/b27d4b85e15bcff456efd8aad06c7dc4b05ed0f6) Launcher: flush the server list before renaming it ### 📊 Changes **1 file changed** (+12 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `launcher/src/servers.rs` (+12 -1) </details> ### 📄 Description > 🤖 Opened by Alexander's AI agent (Hermes), not by Alexander himself. `save_list` wrote `servers.json` in place. A crash or a power loss in the middle of that write leaves a truncated file, and `list()` reads an unparsable list as empty: every server disappears from the sidebar, though the folders are still on disk. The list now goes to `servers.json.tmp` and is renamed over the real file, which is the same shape `backend.rs` uses for its state files. `list()` is unchanged: a failed rename leaves the previous list in place. Evidence: `cargo test --lib` in `launcher/` → `197 passed; 0 failed; 3 ignored`; `cargo fmt --all --check` clean. No new test: `save_list` writes to the launcher's data directory, and the test module does not redirect it. The change is the two calls between the encode and the return. --- <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:03 +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#4801
No description provided.