Skip to content

feat(mcp): mirror DELETE selftune/overrides as loopover_clear_selftune_override#8679

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
bitfathers94:fix/issue-8660
Jul 25, 2026
Merged

feat(mcp): mirror DELETE selftune/overrides as loopover_clear_selftune_override#8679
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
bitfathers94:fix/issue-8660

Conversation

@bitfathers94

Copy link
Copy Markdown
Contributor

feat(mcp): mirror DELETE selftune/overrides as loopover_clear_selftune_override

Add the write-side MCP tool for clearing a repo's live self-tune gate
override, the missing counterpart to the read-only
loopover_get_selftune_override_audit. It calls the same deleteLiveOverride
the DELETE /v1/repos/:owner/:repo/selftune/overrides route uses, enforces
the same maintainer-manage repo gate as the sibling maintainer-mutation
tools (loopover_set_agent_paused/loopover_set_action_autonomy/
loopover_decide_pending_action), takes a required confirm:true, and returns
{ repoFullName, cleared: true }.

Closes #8660

…e_override

Add the write-side MCP tool for clearing a repo's live self-tune gate
override, the missing counterpart to the read-only
loopover_get_selftune_override_audit. It calls the same deleteLiveOverride
the DELETE /v1/repos/:owner/:repo/selftune/overrides route uses, enforces
the same maintainer-manage repo gate as the sibling maintainer-mutation
tools (loopover_set_agent_paused/loopover_set_action_autonomy/
loopover_decide_pending_action), takes a required confirm:true, and returns
{ repoFullName, cleared: true }.

Closes JSONbored#8660
@bitfathers94
bitfathers94 requested a review from JSONbored as a code owner July 25, 2026 23:29
@superagent-security

Copy link
Copy Markdown
Contributor

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

@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 25, 2026
@codecov

codecov Bot commented Jul 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.86%. Comparing base (c5cc6c4) to head (aec0b28).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8679      +/-   ##
==========================================
+ Coverage   90.56%   90.86%   +0.30%     
==========================================
  Files          96       97       +1     
  Lines       22490    23646    +1156     
  Branches     3884     4103     +219     
==========================================
+ Hits        20367    21485    +1118     
- Misses       1945     1958      +13     
- Partials      178      203      +25     
Flag Coverage Δ
backend 96.71% <100.00%> (?)

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

Files with missing lines Coverage Δ
src/mcp/server.ts 96.71% <100.00%> (ø)

@loopover-orb

loopover-orb Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Tip

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-25 23:36:12 UTC

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

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This adds `loopover_clear_selftune_override`, a straightforward write-side MCP mirror of the existing DELETE `/v1/repos/:owner/:repo/selftune/overrides` route, reusing `deleteLiveOverride` and gating behind `requireRepoManageAccess`, matching the pattern of the sibling maintainer-mutation tools. The `confirm: z.literal(true)` requirement is enforced entirely by the input schema, so the handler itself is branch-free as claimed. The accompanying test exercises both the success path (override actually cleared, verified via a direct store read) and the access-denied path (override untouched), which is real coverage of the new code, not fabricated.

Nits — 4 non-blocking
  • The `clearSelftuneOverrideOutputSchema` marks `repoFullName` and `cleared` as `.optional()` even though the handler always returns both fields non-optionally (src/mcp/server.ts:1113-1116) — consider making them required to tighten the output contract.
  • No test exercises the `confirm` field being omitted or `false`, though this is enforced by zod so is low risk (test/unit/mcp-clear-selftune-override.test.ts).
  • Consider a quick assertion in the test that calling without `confirm` (or with `confirm: false`) is rejected by the schema, to lock in the intended contract.
  • If `repoFullName`/`cleared` are always present in the response, tighten `clearSelftuneOverrideOutputSchema` to drop `.optional()` for both fields.

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 #8660
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 ⚠️ 20/25 Preflight is ready, but the PR body does not name the validation run.
Contributor workload ✅ 10/10 Author activity: 40 registered-repo PR(s), 25 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor bitfathers94; Gittensor profile; 40 PR(s), 0 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: minor
Linked issue satisfaction

Addressed
The PR adds loopover_clear_selftune_override, gated by the same maintainer-manage access check as sibling mutation tools, calling deleteLiveOverride and returning {repoFullName, cleared: true}, matching all stated requirements.

Review context
  • Author: bitfathers94
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: TypeScript
  • Official Gittensor activity: 40 PR(s), 0 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Start here: Add validation command/output.
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 259a766 into JSONbored:main Jul 25, 2026
8 checks passed
@github-actions github-actions Bot mentioned this pull request Jul 26, 2026
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(mcp): add an MCP tool mirroring DELETE selftune/overrides (clear self-tuned gate override)

1 participant