[PR #1120] [MERGED] fix(benchmark): create the world folder before writing its marker #3068

Closed
opened 2026-11-02 16:01:15 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1120
Author: @feeldev12
Created: 10/21/2026
Status: ✅ Merged
Merged: 10/22/2026
Merged by: @ludovic111

Base: main ← Head: fix/benchmark-world-folder-race


📝 Commits (1)

  • c833fbe fix(benchmark): create the world folder before writing its marker

📊 Changes

1 file changed (+2 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/benchmark.rs (+2 -0)

📄 Description

What and why

--benchmark writes horizon-benchmark.txt into saves/horizon-benchmark/ right after open replies. open replies as soon as the world starts opening on a worker, so the folder may not exist yet. On a slower device (an Android phone running Horizon) the write failed with No such file or directory and the benchmark ended before its first scene. This creates the folder first. The world opening then reuses it as before.

A failed run also leaves a half-created world without the marker, so the next run refuses to replace it ("exists and was not created by the benchmark").

Vanilla reference

none (Horizon-only benchmark tooling)

Self-check

Run on Windows. The two failures don't come from this change:

  • rustfmt: the script's cargo fmt call fails on Windows. rustfmt --edition 2024 --check crates/horizon-client/src/benchmark.rs passes.
  • clippy: dead code in horizon-server/src/update.rs (Windows test target).
  • tests: three Windows-only file lock/permission failures in save, packs::cache and crash.

pr_ready (tools/pr_ready.py --quick --base upstream/main on COMPUTADORA, against upstream/main at b7390d783, 3 min 24 s)

Check Result
Scope ✅ 1 files, +2 −0
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ➖ no Python change
rustfmt ❌ failed
clippy ❌ failed (1 min 3 s)
tests: horizon-client ❌ 948 passed, 3 failed (2 min 14 s)
doc tests ✅ 0 passed (2 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
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/1120 **Author:** [@feeldev12](https://github.com/feeldev12) **Created:** 10/21/2026 **Status:** ✅ Merged **Merged:** 10/22/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/benchmark-world-folder-race` --- ### 📝 Commits (1) - [`c833fbe`](https://github.com/horizon-rust/horizon/commit/c833fbe21243af0a0c8ee4f828fc27772507de24) fix(benchmark): create the world folder before writing its marker ### 📊 Changes **1 file changed** (+2 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/benchmark.rs` (+2 -0) </details> ### 📄 Description ## What and why `--benchmark` writes `horizon-benchmark.txt` into `saves/horizon-benchmark/` right after `open` replies. `open` replies as soon as the world starts opening on a worker, so the folder may not exist yet. On a slower device (an Android phone running Horizon) the write failed with `No such file or directory` and the benchmark ended before its first scene. This creates the folder first. The world opening then reuses it as before. A failed run also leaves a half-created world without the marker, so the next run refuses to replace it ("exists and was not created by the benchmark"). ## Vanilla reference none (Horizon-only benchmark tooling) ## Self-check Run on Windows. The two failures don't come from this change: - **rustfmt:** the script's `cargo fmt` call fails on Windows. `rustfmt --edition 2024 --check crates/horizon-client/src/benchmark.rs` passes. - **clippy:** dead code in `horizon-server/src/update.rs` (Windows test target). - **tests:** three Windows-only file lock/permission failures in `save`, `packs::cache` and `crash`. **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on COMPUTADORA, against upstream/main at b7390d783, 3 min 24 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +2 −0 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ➖ no Python change | | rustfmt | ❌ failed | | clippy | ❌ failed (1 min 3 s) | | tests: horizon-client | ❌ 948 passed, 3 failed (2 min 14 s) | | doc tests | ✅ 0 passed (2 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | 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-02 16:01: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#3068
No description provided.