fix: make bench arm bin provisioning idempotent across trials #34
Reference in New Issue
Block a user
Delete Branch "fix-bench-shell-arm-reprovision"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes a benchmark-harness bug that crashed every shell arm (
gitea-axi,tea,raw-api) at more than one trial per sitting.Root cause
provisionArmBinsymlinks the shell arm's one allow-listed binary into a per-sitting bin directory. But a sitting's trials share that directory (runCellscreates onebinRootand passes it to every trial), and each trial re-runsprovisionArmBin, so the second trial'ssymlinkSyncthrewEEXIST: file already exists. Thegitea-mcparm was unaffected because its shell is disabled (ARM_BINARYisnull), so it symlinks nothing — which is why the earlier 60-sample gitea-mcp run never hit this.Fix
Remove any existing link before re-creating it, so provisioning is idempotent across a sitting's trials. Add a regression test that provisions the same bin directory twice and asserts it neither throws nor duplicates the link.
Verification
gitea-axicell (which previously crashed at trial 2) now records all 3 trials with 0 invalids.