test(bench): pin benchmark repos to fixed commits for reproducible metrics#236
Merged
Conversation
…trics The retrieval/token benchmark cloned each repo with `git clone --depth 1 --single-branch` (always latest upstream HEAD), so the corpus silently drifted between releases. With identical SigMap code, hit@5 read 81.1% at v6.11 and 75.6% now purely because the cloned repo contents changed — making the metric non-reproducible and a poor regression signal. Pin all 21 repos to fixed commits (the corpus the v6.15.0 numbers were measured on) and fetch them by SHA on clone (GitHub allows SHA fetch). Existing caches are re-checked-out to the pinned commit; if a pin can't be fetched the run degrades to the default branch with a warning. Now hit@5 only moves when SigMap's ranking/extraction changes. - scripts/run-benchmark.mjs: commit pins + fetchPinned() + clone/cache logic - docs-vp/guide/benchmark.md: document the frozen-corpus methodology
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why
The retrieval/token benchmark cloned each repo with
git clone --depth 1 --single-branch— always the latest upstream HEAD. So with byte-for-byte identical SigMap ranking code, hit@5 measured 81.1% at v6.11 and 75.6% now purely because the cloned repo contents changed. The number was also carried forward unchanged through v6.12/v6.13 (only thebenchmark_idlabel was bumped), so v6.15.0 was the first real re-measurement since v6.11. Net effect: the metric was neither reproducible nor a trustworthy regression signal.Changes
scripts/run-benchmark.mjs: every one of the 21 benchmark repos now carries acommit:pin (the exact corpus the v6.15.0 numbers were measured on). NewfetchPinned()fetches by SHA on clone (GitHub allows SHA fetch — verified). Existing caches are re-checked-out to the pinned commit; if a pin can't be fetched, the run degrades to the default branch with aWARN(results may drift).docs-vp/guide/benchmark.md: documents the frozen-corpus methodology.Effect
hit@5 / token reduction now move only when SigMap's own ranking/extraction changes — a true release-over-release signal.
Test plan
node -c scripts/run-benchmark.mjs--skip-clonerun: all 21 repos report "present at pinned commit"🤖 Generated with Claude Code