Skip to content

fix(bench): refuse to run when the disk is too full for Moon to take writes - #49

Merged
pilotspacex-byte merged 2 commits into
mainfrom
fix/bench-moon-disk-stall
Oct 12, 2026
Merged

pilotspacex-byte merged 2 commits into
mainfrom
fix/bench-moon-disk-stall

Conversation

@pilotspacex-byte

Copy link
Copy Markdown
Contributor

Why

Benchmark v15 ran with 2% of the disk free. Moon's disk monitor stops taking writes under 5%, and laya-codex fails open on a refused score-cache write. So every follow-up prompt in both laya-codex arms was re-scored by the model instead of served from its session's cache:

  • none of the release candidate's 60 follow-ups hit the cache;
  • v0.4.0's follow-up hooks took as long as its first prompts.

That timed a hook that users, whose cache works, never pay: about +0.14 s per session for the release candidate and +0.53 s for v0.4.0. Ranking and the injected code were unaffected, because the index was written before the stall.

What

run_bench checks the volume of the output directory, where each arm's home and Moon data live, and of the default laya-codex home for an arm on the default binary. It refuses to start when either has less than 6% free: Moon's floor plus one point, so a run doesn't cross it midway. A path that doesn't exist yet is checked on its nearest existing parent.

Lever: honest measurement.

Tests

  • Written first; they failed before the change.
  • bench/test_bench.py DiskRoomForMoon: the floor is reported with its free share, the margin is kept, and missing paths are checked on their parent.
  • All seven bench test files pass.
  • On this machine (2.76% free), disk_short reports the shortfall.

…writes

Moon's disk monitor stops taking writes when its volume has less than 5%
free. laya-codex fails open on a refused score-cache write, so on a full
disk every follow-up prompt is re-scored by the model instead of served
from its session's cache. A run then times a hook that users, whose cache
works, never pay.

Benchmark v15 ran on a disk with 2% free. Moon engaged its write stall
about 4 s after each arm's Moon started, just after the warm-up query, and
none of the release candidate's 60 follow-ups was served from the cache
(its httpx store holds 8 cache entries, written before the stall);
v0.4.0's follow-up hooks took as long as its first prompts (0.54 s). Ranking and the
injected code were unaffected, since the index was written before the
stall, but the hook time per session counts both prompts at full cost
(release candidate +0.14 s, v0.4.0 +0.53 s).

run_bench now checks the volume of the output directory, where each arm's
home and Moon data live, and the default laya-codex home for an arm on the
default binary, and refuses to start when either has less than 6% free:
Moon's floor plus one point, so a run does not cross it midway.

author: Tin Dang
@pilotspacex-byte
pilotspacex-byte merged commit 41ea93d into main Oct 12, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants