Skip to content

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

Description

@JSONbored

⚠️ Definition of Done: this issue must be completed in full, in a single PR. Do not split this
work across multiple PRs, and do not defer any Deliverable below to a follow-up issue. A PR that
satisfies only some of the Deliverables, stubs a required test, or leaves a checkbox
partially-done does NOT resolve this issue and will be closed.

Context

src/api/routes.ts:3159-3168 exposes a maintainer-scoped REST mutation
(DELETE /v1/repos/:owner/:repo/selftune/overrides) that clears a repo's live self-tune gate
override. src/mcp/server.ts only has the read-side mirror of this feature —
loopover_get_selftune_override_audit (line 2248) — with no MCP tool calling the equivalent
deleteLiveOverride mutation. Every other maintainer-scoped mutating action in this codebase already
has a matching MCP tool (loopover_decide_pending_action, loopover_set_agent_paused,
loopover_set_action_autonomy), so this is the one inconsistent gap in an otherwise-complete
REST/MCP parity pattern for maintainer mutations.

Requirements

  • Add an MCP tool (e.g. loopover_clear_selftune_override) that mirrors the REST route's
    deleteLiveOverride mutation, gated by the same maintainer-repo-access check every other
    maintainer-mutation MCP tool already uses.
  • The new tool's input schema and description should follow the existing conventions used by
    loopover_set_agent_paused/loopover_set_action_autonomy (repo identity + any required
    confirmation fields).

Deliverables

  • A new MCP tool clears a repo's live self-tune gate override, calling the same underlying
    deleteLiveOverride function the REST route already uses.
  • The new tool enforces the same maintainer-repo-access gate as the REST route and as every other
    maintainer-mutation MCP tool.
  • The new tool returns { repoFullName, cleared: true } (or an equivalently structured
    confirmation) on success.
  • A new test asserting: (a) a maintainer session successfully clears the override and the
    override is verifiably gone afterward (checked via the existing audit-read tool or a direct
    store read), and (b) a non-maintainer caller is rejected.

All four Deliverables are required in the same PR.

Test Coverage Requirements

src/** is measured by codecov/patch (99%+ target, branch-counted). The new test(s) must exercise
both the success path (override actually cleared, verified) and the access-control rejection path.

Expected Outcome

Every maintainer-scoped mutating action in this codebase — including clearing a self-tune override —
has a matching MCP tool, closing the one remaining inconsistency in an otherwise-complete
REST/MCP parity pattern.

Links & Resources

  • src/api/routes.ts:3159-3168 (the REST mutation to mirror)
  • src/mcp/server.ts:2248 (loopover_get_selftune_override_audit, the existing read-side mirror)
  • Existing maintainer-mutation MCP tools to match conventions with: loopover_decide_pending_action,
    loopover_set_agent_paused, loopover_set_action_autonomy

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions