Skip to content

feat(mcp): register loopover_check_improvement_potential stdio tool - #7962

Closed
andriypolanski wants to merge 1 commit into
JSONbored:mainfrom
andriypolanski:feat/7759
Closed

feat(mcp): register loopover_check_improvement_potential stdio tool#7962
andriypolanski wants to merge 1 commit into
JSONbored:mainfrom
andriypolanski:feat/7759

Conversation

@andriypolanski

Copy link
Copy Markdown
Contributor

Summary
Register loopover_check_improvement_potential as a local stdio MCP tool in packages/loopover-mcp/bin/loopover-mcp.ts.
Proxy POST /v1/lint/improvement-potential (same endpoint the existing improvement-potential CLI already uses).
In-process InMemoryTransport coverage so Codecov instruments the .ts bin.
Tool count pin 89 → 90.
Closes #7759

Test plan
mcp-cli-improvement-potential-stdio.test.ts (register + POST proxy)
Tool count pin 89 → 90

@superagent-security

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.81%. Comparing base (3790ecd) to head (34418d7).

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #7962       +/-   ##
===========================================
- Coverage   91.84%   81.81%   -10.04%     
===========================================
  Files         735       91      -644     
  Lines       75462    23701    -51761     
  Branches    22956     4547    -18409     
===========================================
- Hits        69309    19391    -49918     
+ Misses       5071     4114      -957     
+ Partials     1082      196      -886     
Flag Coverage Δ
shard-1 11.47% <100.00%> (-47.00%) ⬇️
shard-2 0.00% <0.00%> (-52.14%) ⬇️
shard-3 0.00% <0.00%> (-50.00%) ⬇️

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

Files with missing lines Coverage Δ
packages/loopover-mcp/bin/loopover-mcp.ts 11.47% <100.00%> (-3.44%) ⬇️

... and 644 files with indirect coverage changes

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 21, 2026
@loopover-orb

loopover-orb Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Warning

⏸️ LoopOver review result - manual review recommended

Review updated: 2026-07-21 23:55:12 UTC

3 files · 1 AI reviewer · no blockers · CI green · dirty

⏸️ Suggested Action - Manual Review

Review summary
The AI review returned non-blocking notes for this change but did not include a separate narrative summary. Review the nits below before deciding this PR.

Nits — 6 non-blocking
  • The flagged 'secret' at test/unit/mcp-cli-improvement-potential-stdio.test.ts:32 is just the fixture literal `"in-process-token"` used identically by sibling stdio tests — not a real credential, but worth confirming no real token ever lands in this file.
  • packages/loopover-mcp/bin/loopover-mcp.ts:1895 keeps the `(input: any) =>` handler signature already used by every other registerStdioTool call in this file — consistent with existing convention, not a regression, but still worth tightening to a typed schema-inferred input if this file is ever revisited.
  • The 400/2000 length caps in checkImprovementPotentialShape (loopover-mcp.ts:717-745) duplicate the same magic numbers used in the adjacent checkSlopRiskShape rather than sharing a named constant — pre-existing pattern in this file, not new here.
  • Consider extracting the repeated `.max(400)` / `.max(2000)` bounds used across checkSlopRiskShape and checkImprovementPotentialShape into shared named constants (e.g. `PATH_MAX`, `LIST_MAX`) to avoid silent drift between the two shapes.
  • If src/mcp/server.ts's checkImprovementPotentialShape (the comment's cited source of truth) ever changes its bounds, add a pinning test similar to the AUTONOMY_LEVELS mirror-check mentioned elsewhere in this file to catch drift automatically.
  • Possible secret-shaped assignment in the diff (generic_secret_assignment) — Verify the value is not a real credential.

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 #7759
Related work ⚠️ 1 scoped overlap Top overlaps are listed below; lower-confidence bulk is hidden.
Change scope ❌ 8/20 High review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 184 registered-repo PR(s), 118 merged, 22 issue(s).
Contributor context ✅ Confirmed Gittensor contributor andriypolanski; Gittensor profile; 184 PR(s), 22 issue(s).
Improvement ✅ Minor risk: clean · value: minor
Linked issue satisfaction

Addressed
The PR adds a registerStdioTool block for loopover_check_improvement_potential following the same pattern as the sibling registrations, proxies the same POST /v1/lint/improvement-potential endpoint used by the existing CLI command without duplicating HTTP logic, and uses stdioToolDescription for the description text plus updates the tool-count test to match.

Review context
  • Author: andriypolanski
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, TypeScript, JavaScript, Rust, Cuda, Kotlin, MDX, Scala
  • Official Gittensor activity: 184 PR(s), 22 issue(s).
  • Related work: Titles/paths share 7 meaningful terms. (PR #7961)
Contributor next steps
  • Start here: Review top overlaps.
  • Then work through the remaining 2 steps in the Signals table above.
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 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

LoopOver is closing this pull request on the maintainer's behalf (conflicts with the base branch — resolve and open a fresh PR). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed.

@loopover-orb loopover-orb Bot closed this Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Register loopover_check_improvement_potential as a local stdio MCP tool

2 participants