feat(mcp): add a maintain outcome-calibration CLI mirror#6960
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6960 +/- ##
=======================================
Coverage 93.71% 93.71%
=======================================
Files 685 685
Lines 68379 68379
Branches 18730 18730
=======================================
Hits 64080 64080
Misses 3302 3302
Partials 997 997
Flags with carried forward coverage won't be shown. Click here to find out more. |
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-17 15:50:48 UTC
Review summary Nits — 5 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk 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.
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.
|
Closes #6735
Problem
The MCP tool
loopover_get_outcome_calibration(src/mcp/server.ts:1926) mirrors the maintainer-gated routeGET /v1/repos/:owner/:repo/outcome-calibration(src/api/routes.ts:2795, supports?windowDays=). No CLI mirror existed even though its sibling gate-telemetry report (maintain precision) already has one.Fix
Add a
maintain outcome-calibration [--window-days N]subcommand tomaintainCli, mirroring themaintain precisionhandler byte-for-byte: it GETs{repoBase}/outcome-calibration(forwarding?windowDayswhen positive, else full history — exactly howprecisiontreats the flag), and formats the slop-band merge rates + recommendation-outcome totals for the plain path while--jsonre-serializes the untouched payload. Also registered in themaintainsubcommand routing table (so the PowerShell completer lists it) and documented inprintMaintainHelp.Tests
test/unit/mcp-cli-maintain.test.tsadds anoutcome-calibrationcase mirroring theprecisionone: it asserts the formatted slop-band + recommendation summary (plain), payload parity (--json), and that--window-days 30is forwarded and reflected as(last 30d).test/unit/support/mcp-cli-harness.tsgains an/v1/repos/owner/repo/outcome-calibrationfixture route (additive, mirroring the existinggate-precisionfixture) that echoeswindowDays.test/unit/mcp-cli-basics.test.ts's PowerShell-completer assertion is updated to include the new subcommand in its committed position.Validation
npx vitest run test/unit/mcp-cli-maintain.test.ts test/unit/mcp-cli-basics.test.ts→ 36/36 passnpm run typecheck→ clean (0 errors);node --checkon the CLI passes.packages/loopover-mcp/**andtest/**are outside the Codecovinclude, so nocodecov/patchobligation.