Skip to content

fix(review): make review.selftune: false opt-out absolute for the breaker too - #6995

Merged
loopover-orb[bot] merged 1 commit into
mainfrom
fix/selftune-breaker-optout-6803
Jul 17, 2026
Merged

fix(review): make review.selftune: false opt-out absolute for the breaker too#6995
loopover-orb[bot] merged 1 commit into
mainfrom
fix/selftune-breaker-optout-6803

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • The accuracy circuit-breaker (runSelfTuneBreaker) had no per-repo opt-out at all, unlike its sibling selfTuneRepos() (the routine tuning pass), which already correctly excludes a repo whose .loopover.yml sets review.selftune: false. A repo could opt out of routine tuning yet still have its gate mode forced into holdonly/closehold by the breaker.
  • Per that flag's own documented intent ("excludes this repo from the tuning pass"), the opt-out is now absolute: an opted-out repo is excluded from every part of self-tune, both the merge and close breakers, in both the plain and miner-scoped (maintainer: wire calibration accuracy into the live auto-tune circuit-breaker for miner-originated PRs #2352) passes, and in both directions — the breaker can neither newly engage a hold for an opted-out repo nor auto-clear an already-engaged one. A manifest-load error fails open (repo stays included), matching selfTuneRepos()'s own fail-safe precedent.

Closes #6803

Test plan

  • npm run test:ci — green for every check touching this diff (one unrelated, pre-existing failure on main — a stale hardcoded gittensory repo name in an unrelated test — flagged separately)
  • 4 new regression tests: engage-blocked, auto-clear-blocked (absolute in both directions), miner-scoped pass, and a control case confirming the exclusion is per-repo, not global

…aker too

The accuracy circuit-breaker (runSelfTuneBreaker) had no per-repo
opt-out at all, unlike its sibling selfTuneRepos() (the routine
tuning pass), which already correctly excludes a repo whose
.loopover.yml sets review.selftune: false. A repo could opt out of
routine tuning yet still have its gate mode forced into
holdonly/closehold by the breaker.

Per that flag's own documented intent ("excludes this repo from the
tuning pass"), the opt-out is now absolute: an opted-out repo is
excluded from every part of self-tune, both the merge and close
breakers, in both the plain and miner-scoped passes, and in both
directions -- the breaker can neither newly engage a hold for an
opted-out repo nor auto-clear an already-engaged one. A manifest-load
error fails open (repo stays included), matching selfTuneRepos()'s
same fail-safe precedent.

Closes #6803
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@JSONbored JSONbored self-assigned this Jul 17, 2026
@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.72%. Comparing base (018e261) to head (878e8a0).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6995      +/-   ##
==========================================
+ Coverage   89.25%   93.72%   +4.46%     
==========================================
  Files         688      688              
  Lines       68491    68506      +15     
  Branches    18737    18740       +3     
==========================================
+ Hits        61135    64207    +3072     
+ Misses       5647     3302    -2345     
+ Partials     1709      997     -712     
Flag Coverage Δ
shard-1 43.25% <0.00%> (-0.42%) ⬇️
shard-2 36.87% <0.00%> (+<0.01%) ⬆️
shard-3 32.89% <41.17%> (-0.13%) ⬇️
shard-4 34.41% <100.00%> (?)
shard-5 31.72% <0.00%> (-0.40%) ⬇️
shard-6 45.95% <0.00%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/review/outcomes-wire.ts 90.96% <100.00%> (+43.28%) ⬆️

... and 99 files with indirect coverage changes

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 17, 2026
@loopover-orb

loopover-orb Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Tip

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-17 17:48:00 UTC

2 files · 1 AI reviewer · no blockers · readiness 100/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This PR closes a real gap (#6803): the accuracy circuit-breaker previously ignored a repo's `review.selftune: false` opt-out that `selfTuneRepos()` already respected, letting an opted-out repo still get forced into holdonly/closehold. The fix computes exclusions before engage/clear candidates are derived (via `excludeSelfTuneOptedOut`), applies to both plain and miner-scoped passes, works bidirectionally (blocks engage and auto-clear), and fails open on manifest-load error consistent with the sibling routine-tuning path. The change is well-scoped to the stated issue, includes 4 targeted regression tests covering engage-block, clear-block, miner-scoped exclusion, and per-repo isolation, and CI is green across all checks.

Nits — 6 non-blocking
  • src/review/outcomes-wire.ts: `isSelfTuneOptedOut` calls `loadRepoFocusManifest` once per candidate project sequentially in a for-loop inside `excludeSelfTuneOptedOut`; for a large candidate set this serializes manifest loads rather than using `Promise.all`, though the set size is bounded by engaged/reported projects per breaker run so it's unlikely to matter in practice.
  • test/unit/outcomes-wire.test.ts: the new describe block's tests rely on exact seed counts (e.g. 4/8/4/8 splits) mirroring earlier tests by comment reference only ('Same shape as the plain ENGAGES tests above') rather than a shared helper, which is a bit fragile if those upstream tests' thresholds change.
  • src/review/outcomes-wire.ts: doc comments on `baseProjectName`, `isSelfTuneOptedOut`, and `excludeSelfTuneOptedOut` are quite long relative to the code they document; the file was already flagged as long (707 lines) and these verbose comments add to that without much marginal clarity beyond the PR description.
  • Consider `Promise.all(Array.from(candidateProjects, checkOptOut))` in `excludeSelfTuneOptedOut` to parallelize manifest loads across projects.
  • A brief top-of-block comment referencing the shared seeding pattern (or extracting a small helper) would reduce duplication risk between the new opt-out tests and their earlier ENGAGES/AUTO-CLEARS counterparts.
  • PR author also opened the linked issue — Link an issue that was opened by a different contributor, or provide a rationale for why this self-authored issue represents genuine discovery work.

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #6803
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 33 registered-repo PR(s), 26 merged, 341 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 33 PR(s), 341 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: moderate
Linked issue satisfaction

Addressed
The PR implements the 'yes' deliverable by threading the review.selftune:false opt-out into runSelfTuneBreaker via excludeSelfTuneOptedOut, filtering both the plain and miner-scoped passes in both engage and clear directions, with a fail-open manifest-load fallback matching selfTuneRepos()'s precedent.

Review context
  • Author: JSONbored
  • Role context: owner (maintainer lane)
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 33 PR(s), 341 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Start here: Treat this as maintainer-lane context rather than normal contributor-lane activity.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask 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.

  • @loopover ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

🟩 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.

  • Re-run LoopOver review

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LoopOver approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit 75e6f42 into main Jul 17, 2026
17 checks passed
@loopover-orb
loopover-orb Bot deleted the fix/selftune-breaker-optout-6803 branch July 17, 2026 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

selftune accuracy circuit-breaker doesn't respect a repo's review.selftune: false opt-out

1 participant