feat(benchmark): anti-overfit controls — repo-level seeded split, caps, rotation (#9263) - #9600
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Warning ⏸️ LoopOver review result - manual review recommendedReview updated: 2026-07-29 01:36:57 UTC
Review summary Blockers
Nits — 5 non-blocking
Concerns raised — review before merging
📋 Copy for AI agents — paste into your coding agentDecision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. Decision record
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
loopover-ui | 12b2b8d | Commit Preview URL Branch Preview URL |
Jul 29 2026, 12:04 AM |
637cde5 to
f41fd97
Compare
e8aea64 to
5126345
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9600 +/- ##
===========================================
+ Coverage 75.83% 89.93% +14.09%
===========================================
Files 279 885 +606
Lines 58864 112107 +53243
Branches 6340 26627 +20287
===========================================
+ Hits 44641 100819 +56178
+ Misses 13953 9992 -3961
- Partials 270 1296 +1026
Flags with carried forward coverage won't be shown. Click here to find out more.
|
5126345 to
92226ae
Compare
92226ae to
562d398
Compare
…s, rotation (#9263) A public leaderboard creates a direct incentive to overfit, and an overfit agent is worse than useless: it looks best exactly when it generalizes worst. Four decisions, each recorded with its reasoning in the module header, because each is a knob an adversary optimizes against. 1. SPLIT GRANULARITY IS THE REPO, NOT THE WORK UNIT. The split reuses splitBacktestCorpus verbatim -- asserted, not assumed: a test recomputes the assignment through the primitive directly and requires the same held-out repos -- but keys on the repo, so a repo's units never straddle the boundary. Work-unit splitting leaks: two PRs in one repo share a maintainer, a review culture and often the same files, so an agent that saw the visible ones has effectively seen the answer pattern for the held-out ones. Per-repo is what makes "held out" mean "generalizes to a repo it has never seen". 2. HELD-OUT SCORES DO NOT PUBLISH PER SUBMISSION. Each published score is an oracle query, and differencing successive ones recovers membership. Publication happens at evaluation close, or on a fixed public cadence counted from opensAt -- never on demand. gateHeldOutPublication DROPS the held-out value rather than flagging it, so a caller cannot forget to check a flag and serialize a field that is present in memory. 3. SUBMISSION CAP PER (AGENT, WINDOW). Unbounded resubmission against a fixed corpus is gradient descent on the test set by brute force. Scoped per window rather than per day (which just spreads the same brute force over more days) or globally (which would punish an agent that keeps competing across rotations). Refusals are NAMED, so a submitter can tell a cap they can wait out from a window that will never reopen. 4. ROTATION RETIRES A WINDOW, IT DOES NOT EXTEND IT. A benchmark public for a year is training data with extra steps. A retired window stays published for historical comparison but stops being a scoring basis, and refuses submissions even with quota left. Closes #9263
562d398 to
12b2b8d
Compare
What
A public leaderboard creates a direct incentive to overfit, and an overfit agent is worse than useless — it looks best exactly when it generalizes worst. Four decisions, each recorded with its reasoning in the module header, because each is a knob an adversary optimizes against.
1. Split granularity is the repo, not the work unit
The split reuses
splitBacktestCorpusverbatim (requirement 1 — no second split mechanism), and that reuse is asserted, not assumed: a test recomputes the assignment through the primitive directly and requires the identical held-out repo set. But it keys on the repo, so a repo's work units never straddle the boundary.Work-unit-level splitting leaks badly: two PRs in the same repo share a maintainer, a review culture, a CI setup and often the same files, so an agent that saw repo A's visible PRs has effectively seen the answer pattern for repo A's held-out PRs. Per-repo splitting is what makes "held out" mean "generalizes to a repo it has never seen" — the property #9216 requirement 3 actually names.
2. Held-out scores do not publish per submission
Each published held-out score is an oracle query; differencing successive ones recovers per-unit membership within a few dozen submissions. Publication happens at evaluation close, or on a fixed public cadence counted from
opensAt— never on demand, so a submitter cannot trigger a publication instant by submitting.gateHeldOutPublicationdrops the held-out value rather than hiding it behind a flag, so a caller cannot forget to check the flag and serialize a field that is present in memory. That's the difference between a policy and a habit — and there's a regression test asserting no held-out work-unit id or repo name appears anywhere in a serialized open-window payload.3. Submission cap per (agent, window)
Unbounded resubmission against a fixed corpus is gradient descent on the test set by brute force. Scoped per window rather than per day (which just spreads the same brute force over more days) or globally (which would punish an agent that keeps competing across rotations). Refusals are named, so a submitter can tell a cap they can wait out from a window that will never reopen.
4. Rotation retires a window, it does not extend it
A benchmark public for a year is training data with extra steps. A retired window stays published for historical comparison but stops being a scoring basis — and refuses submissions even with quota left.
Tests (11 node:test cases, 100% of branches)
Repo-disjointness of the two slices; equality with the primitive's own assignment; determinism, seed-dependence, and stability as the corpus grows (an already-assigned repo never moves); both degenerate fractions, the empty corpus, and the out-of-range throw; window states across all four boundaries; cap enforcement including an over-count that never reports negative room and explicit cap overrides; retired/pending refusals; publication at close and on cadence but not between; the drop-not-flag regression; and the membership-non-inference regression.
Closes #9263