You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
⚠️ 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.
⚠️ Required pattern: mirror loopover_get_selftune_override_audit's registration in packages/loopover-mcp/bin/loopover-mcp.ts (added by #7997 — "add remote + stdio + CLI surfaces for
the selftune override audit"), immediately above/below it in the same file, using apiDelete (already
used by the unwatch action) instead of apiGet.
Context
src/mcp/server.ts (the hosted remote MCP server) registers two selftune-override tools as a
read/write pair:
loopover_get_selftune_override_audit — read the override audit trail
(GET .../selftune/overrides/audit)
loopover_clear_selftune_override — clear a repo's live self-tune override, requires confirm:true (DELETE .../selftune/overrides)
packages/loopover-mcp/bin/loopover-mcp.ts — the published local CLI/stdio MCP package — mirrors
most remote tools as local registerStdioTool wrappers over the same REST routes via apiGet/ apiPost/apiDelete helpers. #7997 added the CLI mirror for loopover_get_selftune_override_audit
(confirmed present at packages/loopover-mcp/bin/loopover-mcp.ts, both in the tool-catalog list and
in a registerStdioTool("loopover_get_selftune_override_audit", ...) block using apiGet). Its
write-side sibling, loopover_clear_selftune_override, has no entry anywhere in packages/loopover-mcp/bin/loopover-mcp.ts — grep for clear_selftune/clearSelftune in that file
and in packages/loopover-mcp/CHANGELOG.md returns nothing. A CLI/stdio MCP user can read the
override audit trail but cannot clear an override without switching to the REST API directly.
Requirements
Add loopover_clear_selftune_override to the CLI tool-catalog list in packages/loopover-mcp/bin/loopover-mcp.ts (the array entry with name/category/description,
same block loopover_get_selftune_override_audit's catalog entry lives in), category "maintainer".
Add a registerStdioTool("loopover_clear_selftune_override", ...) block, placed next to loopover_get_selftune_override_audit's block, using stdioToolDescription(...) for the
description and an input shape matching the remote tool's (owner, repo, confirm: boolean).
Handler: call apiDelete(${toolRepoBase(owner, repo)}/selftune/overrides, { confirm }) (the apiDelete helper already exists and is used by the unwatch action) and return the result via toolResult(...), matching the remote tool's confirm:true requirement — do not silently default confirm to true; an omitted/false confirm must be rejected the same way the remote tool
rejects it.
No OpenAPI/schema regeneration required: DELETE /v1/repos/:owner/:repo/selftune/overrides is an
unchanged REST route — this issue only adds the CLI's local mirror of an MCP tool that already
exists on the hosted server.
Deliverables
loopover_clear_selftune_override added to the CLI tool catalog in packages/loopover-mcp/bin/loopover-mcp.ts.
registerStdioTool("loopover_clear_selftune_override", ...) wired to apiDelete, requiring confirm:true the same way the remote tool does.
Unit/integration test covering the happy path and the missing/false-confirm rejection path.
All deliverables are required in this one PR — there is no follow-up issue.
Test Coverage Requirements
99%+ Codecov patch target (codecov/patch, unsharded via npm run test:coverage) on every branch of
the new CLI tool registration, including the confirm-rejection branch. Add a regression test
asserting the CLI tool calls DELETE {repoBase}/selftune/overrides with the same query/body shape
the remote loopover_clear_selftune_override tool sends.
Expected Outcome
A loopover-mcp CLI/stdio user can clear a repo's live self-tune override the same way they can
already read its audit trail, closing the read/write asymmetry between the two CLI-mirrored
selftune-override tools.
Links & Resources
src/mcp/server.ts: loopover_clear_selftune_override (the remote tool this issue mirrors
locally), loopover_get_selftune_override_audit
packages/loopover-mcp/bin/loopover-mcp.ts: loopover_get_selftune_override_audit's registerStdioTool block (the exact pattern to copy, swapping apiGet for apiDelete)
Context
src/mcp/server.ts(the hosted remote MCP server) registers two selftune-override tools as aread/write pair:
loopover_get_selftune_override_audit— read the override audit trail(
GET .../selftune/overrides/audit)loopover_clear_selftune_override— clear a repo's live self-tune override, requiresconfirm:true(DELETE .../selftune/overrides)packages/loopover-mcp/bin/loopover-mcp.ts— the published local CLI/stdio MCP package — mirrorsmost remote tools as local
registerStdioToolwrappers over the same REST routes viaapiGet/apiPost/apiDeletehelpers. #7997 added the CLI mirror forloopover_get_selftune_override_audit(confirmed present at
packages/loopover-mcp/bin/loopover-mcp.ts, both in the tool-catalog list andin a
registerStdioTool("loopover_get_selftune_override_audit", ...)block usingapiGet). Itswrite-side sibling,
loopover_clear_selftune_override, has no entry anywhere inpackages/loopover-mcp/bin/loopover-mcp.ts— grep forclear_selftune/clearSelftunein that fileand in
packages/loopover-mcp/CHANGELOG.mdreturns nothing. A CLI/stdio MCP user can read theoverride audit trail but cannot clear an override without switching to the REST API directly.
Requirements
loopover_clear_selftune_overrideto the CLI tool-catalog list inpackages/loopover-mcp/bin/loopover-mcp.ts(the array entry withname/category/description,same block
loopover_get_selftune_override_audit's catalog entry lives in), category"maintainer".registerStdioTool("loopover_clear_selftune_override", ...)block, placed next toloopover_get_selftune_override_audit's block, usingstdioToolDescription(...)for thedescription and an input shape matching the remote tool's (
owner,repo,confirm: boolean).apiDelete(${toolRepoBase(owner, repo)}/selftune/overrides, { confirm })(theapiDeletehelper already exists and is used by theunwatchaction) and return the result viatoolResult(...), matching the remote tool'sconfirm:truerequirement — do not silently defaultconfirmtotrue; an omitted/falseconfirmmust be rejected the same way the remote toolrejects it.
DELETE /v1/repos/:owner/:repo/selftune/overridesis anunchanged REST route — this issue only adds the CLI's local mirror of an MCP tool that already
exists on the hosted server.
Deliverables
loopover_clear_selftune_overrideadded to the CLI tool catalog inpackages/loopover-mcp/bin/loopover-mcp.ts.registerStdioTool("loopover_clear_selftune_override", ...)wired toapiDelete, requiringconfirm:truethe same way the remote tool does.confirmrejection path.All deliverables are required in this one PR — there is no follow-up issue.
Test Coverage Requirements
99%+ Codecov patch target (
codecov/patch, unsharded vianpm run test:coverage) on every branch ofthe new CLI tool registration, including the confirm-rejection branch. Add a regression test
asserting the CLI tool calls
DELETE {repoBase}/selftune/overrideswith the same query/body shapethe remote
loopover_clear_selftune_overridetool sends.Expected Outcome
A
loopover-mcpCLI/stdio user can clear a repo's live self-tune override the same way they canalready read its audit trail, closing the read/write asymmetry between the two CLI-mirrored
selftune-override tools.
Links & Resources
src/mcp/server.ts:loopover_clear_selftune_override(the remote tool this issue mirrorslocally),
loopover_get_selftune_override_auditpackages/loopover-mcp/bin/loopover-mcp.ts:loopover_get_selftune_override_audit'sregisterStdioToolblock (the exact pattern to copy, swappingapiGetforapiDelete)loopover_get_selftune_override_audit