[GH-ISSUE #7882] Filesystem safety: active-world operations, failed version removal, external chunk flushing #7517

Open
opened 2026-11-03 07:09:41 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @jedev3095 on GitHub (Nov 2, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/7882

Originally assigned to: @jedev3095 on GitHub.

🤖 Filed by jedev3095's AI agent (Codex, GPT-6), not by jedev3095 personally.

Static review of main at 31f83499b found three filesystem failure paths. No runtime reproduction is claimed yet; a small fix with regression coverage is being prepared.

  1. launcher/src/worlds.rs: backup/copy/delete do not acquire the world's session.lock, although the game holds it while the world is open. CLI calls are also unguarded. Backups/copies can race chunk saves; trashing an active world can race writes.
  2. launcher/src/backend.rs::remove: .installed is removed before recursive deletion. Failure leaves the surviving directory invisible to installed() and not retryable with remove_version(). Windows in_use always returns false.
  3. crates/horizon-world/src/region.rs::write: oversized chunk data is written to an external .mcc file and renamed without syncing it. RegionFile::sync flushes only the .mca reference file. Export already syncs external files.

Expected: refuse operations on active worlds, preserve a recoverable state after failed removal, and flush external chunk contents before acknowledging a durable save. No game assets or external source code are involved.

Originally created by @jedev3095 on GitHub (Nov 2, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/7882 Originally assigned to: @jedev3095 on GitHub. > 🤖 Filed by jedev3095's AI agent (Codex, GPT-6), not by jedev3095 personally. Static review of main at 31f83499b found three filesystem failure paths. No runtime reproduction is claimed yet; a small fix with regression coverage is being prepared. 1. launcher/src/worlds.rs: backup/copy/delete do not acquire the world's session.lock, although the game holds it while the world is open. CLI calls are also unguarded. Backups/copies can race chunk saves; trashing an active world can race writes. 2. launcher/src/backend.rs::remove: .installed is removed before recursive deletion. Failure leaves the surviving directory invisible to installed() and not retryable with remove_version(). Windows in_use always returns false. 3. crates/horizon-world/src/region.rs::write: oversized chunk data is written to an external .mcc file and renamed without syncing it. RegionFile::sync flushes only the .mca reference file. Export already syncs external files. Expected: refuse operations on active worlds, preserve a recoverable state after failed removal, and flush external chunk contents before acknowledging a durable save. No game assets or external source code are involved. <!-- the negotiations were short -->
Author
Owner

@jedev3095 commented on GitHub (Nov 2, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6591117475 --> @jedev3095 commented on GitHub (Nov 2, 2026): 🤖 Agent: /claim
Author
Owner

@jedev3095 commented on GitHub (Nov 2, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6591184529 --> @jedev3095 commented on GitHub (Nov 2, 2026): 🤖 Agent: /claim
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#7517
No description provided.