Repository navigation
fix(bench): the gate's benchmark fixture no longer waits for the host lock - #8029
Conversation
… lock bench/build.test.py runs bench/run.sh in a synthetic repo, and since the host-wide benchmark lock landed, run.sh takes /tmp/moq-bench.lock. just gh test runs the fixture in every just check and just ci, so every gate on a host waited behind any running benchmark session. The fixture measures nothing, so it stubs the lock the way bench/profile.test.py already does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 7 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Fixture stubs the host lock —
bench/build.test.pyoverwrites its copiedbench/lock.shwithbench_lock() { :; }, so the fixture no longer contends for/tmp/moq-bench.lockwhenjust gh testruns it in every gate. This matches the stubbench/profile.test.pyalready uses.
I verified the stub is sufficient: bench_lock is only reached through source "$ROOT/bench/lock.sh"; bench_lock "$0" "$@" at bench/run.sh:202-203, never as bash bench/lock.sh, and BENCH_LOCK_HELD is consulted only inside lock.sh and bench/local.py — neither is on this fixture's path. Writing the stub before git init/git add . also keeps it inside the fixture's base commit, so the tree run.sh inspects stays clean. The real lock keeps its coverage in bench/lock.test.py.
Ran python3 bench/build.test.py on the head: 1 test, OK in 5.6 s, tree clean afterwards.
deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

Problem
Since moq-dev/moq#7867 (merged 2026-11-05),
bench/run.shtakes the host-wide benchmark lock,/tmp/moq-bench.lock.bench/build.test.pyrunsbench/run.shin a synthetic repo, andjust gh testruns that fixture in everyjust checkandjust ci. As a result, every gate on a host waits intest ghbehind any running benchmark session. Other gates running the same fixture also queue on the lock with it.On the desktop, one browser benchmark has held the lock since 2026-11-06 07:59 UTC. Four open PRs report
test ghstalled behind it for 40 to 60+ minutes: moq-dev/moq#7978, moq-dev/moq#7980, moq-dev/moq#7986, and moq-dev/moq#8014. The lock was meant to keep benchmark sessions apart, not to gate tests.Approach
The fixture measures nothing. It now overwrites its copied
bench/lock.shwith a no-opbench_lock, the same stubbench/profile.test.pyalready uses.bench/lock.test.pystill covers the lock itself. No other gate test reaches the lock:bench/profile.test.pystubs it, or fails argument validation before taking it.bench/local.test.pyruns only the--startedwrapper.Impact
Alternatives
BENCH_LOCK_HELD=1in the fixture's environment. This works too, but it claims a session the fixture doesn't hold. The stub matches the existing fixture.Follow-ups
None. Found while re-measuring the gate for quest/m0/ci/five-minutes.md in moq-dev/moq#8004.
Validation
timeout 90 python3 bench/build.test.pytimed out (exit 124) waiting for it. With the fix, it passed in 7 s while the same benchmark still held the lock.bash sh/quest.sh gate just check origin/mainpassed in 112 s (28 s of admission).test ghtook 64 s while the lock was still held.ruff checkandruff format --checkon the file: pass.Review
Codex
gpt-6.1-sol, medium effort, viaquest review --base origin/main(round 1, session01a1b041-f2ad-7323-b1c5-339b4cca0475), on head 263169df4d: no findings.(Written by Claude Opus 5.5)
🤖 Generated with Claude Code