Skip to content

mcp: hygiene sweep — orphaned cliff.mcp.toml, dead schema literals, stale counts, noUnusedLocals #9516

Description

@JSONbored

Context

Part of the MCP contract standardization epic (#9515). The investigation behind the epic turned up dead weight in and around packages/loopover-mcp that should be cleared before the contract migration starts, so the migration diffs stay clean and nothing dead gets migrated by mistake.

Confirmed findings (all verified against the current tree):

  1. cliff.mcp.toml (repo root) is fully orphaned. grep -rn "cliff.mcp" across the repo returns only the file itself. The real MCP changelog pipeline is scripts/generate-mcp-changelog.ts + scripts/mcp-release-core.ts (npm run changelog:mcp, verified by scripts/check-changelog.ts --mcp); only the root cliff.toml is referenced anywhere (package.json:89, scripts/check-changelog.ts:37). The orphan still carries a stale commit_preprocessors rewrite rule — dead config that looks live.
  2. Five dead output-schema literals in packages/loopover-mcp/bin/loopover-mcp.ts: repoContextOutputSchema (:2959), preflightOutputSchema (:2971), decisionPackOutputSchema (:2981), localStatusOutputSchema (:2991), agentPlanOutputSchema (:3007). Hand-written raw JSON Schema, zero references (grep-verified). They survive because the package tsconfig does not enable noUnusedLocals.
  3. Stale load-bearing comments in the same file: :1738-1739 claims the register wrapper has "37 call sites" (there are 102); :5194 claims a "~150-tool combined surface" (stdio has 102, remote ~116). These numbers get quoted when reasoning about the file — wrong constants in prose are drift too.

Requirements

  1. Delete cliff.mcp.toml. Verify npm run changelog:check:mcp and npm run test:release (or the equivalent check-changelog.ts --mcp invocation) still pass, proving nothing consumed it.
  2. Delete the five dead schema constants listed above. No replacement — real output schemas arrive via the contract package (epic group 2/3), not by resurrecting these.
  3. Enable noUnusedLocals (and noUnusedParameters if it lands clean) in packages/loopover-mcp/tsconfig.json and fix any fallout, so this class of dead code cannot silently reappear. If enabling it surfaces pre-existing violations beyond the five constants, fix those too (program principle 4: fix what you find).
  4. Correct or delete the stale count comments at bin/loopover-mcp.ts:1738-1739 and :5194. Prefer phrasing that cannot rot (e.g. "every stdio tool registers through this wrapper") over a new hardcoded number.
  5. npm run build:mcp and the full local gate stay green; no behavior change of any kind.

Non-goals

  • The docker-compose.miner.yml / k8s/miner-deployment.yaml runloop subcommand defect is being fixed separately (in flight) — do not touch it here.
  • No schema, tool, or CLI changes. This is deletion + tsconfig hardening only.

Deliverables

  • cliff.mcp.toml removed
  • Five dead schema constants removed
  • noUnusedLocals enabled for packages/loopover-mcp with a clean build
  • Stale comments corrected
  • CI green including test:mcp-pack, changelog:check:mcp

Expected outcome

packages/loopover-mcp contains no dead schema code and no orphaned config; the compiler now rejects unused locals in the package, so the contract migration (epic groups 2–3) starts from a surface where everything present is live.

References

Part of #9515.

Metadata

Metadata

Assignees

Labels

maintainer-onlyOwner-only work — yields no Gittensor points.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions