Skip to content

feat(mcp): register loopover_watch_issues as a local stdio tool (#7763) - #7953

Closed
kai392 wants to merge 1 commit into
JSONbored:mainfrom
kai392:feat/7763-stdio-watch-issues-v2
Closed

feat(mcp): register loopover_watch_issues as a local stdio tool (#7763)#7953
kai392 wants to merge 1 commit into
JSONbored:mainfrom
kai392:feat/7763-stdio-watch-issues-v2

Conversation

@kai392

@kai392 kai392 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #7763

Note

Replaces #7948, which was auto-closed after a Codecov uploader GPG signature verification flake on validate-tests (2) (the vitest shard itself passed).

Test plan

  • build:mcp + typecheck + branding-drift:check
  • vitest coverage: mcp-cli-watch-issues-tool, mcp-tool-rename-aliases (patch ~100%)
  • CI green on this PR

@kai392
kai392 requested a review from JSONbored as a code owner July 21, 2026 22:07
@superagent-security

Copy link
Copy Markdown
Contributor

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

Closes JSONbored#7763

Co-authored-by: Cursor <cursoragent@cursor.com>
@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.71429% with 2 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@002a864). Learn more about missing BASE report.

Files with missing lines Patch % Lines
packages/loopover-mcp/bin/loopover-mcp.ts 85.71% 0 Missing and 2 partials ⚠️

❌ Your patch status has failed because the patch coverage (85.71%) is below the target coverage (99.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7953   +/-   ##
=======================================
  Coverage        ?   11.91%           
=======================================
  Files           ?        1           
  Lines           ?     2199           
  Branches        ?      845           
=======================================
  Hits            ?      262           
  Misses          ?     1917           
  Partials        ?       20           
Flag Coverage Δ
shard-1 0.00% <0.00%> (?)
shard-2 11.91% <85.71%> (?)
shard-3 0.00% <0.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.91% <85.71%> (ø)

@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 21, 2026
@loopover-orb

loopover-orb Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Caution

🛑 LoopOver review result - fixes required

Review updated: 2026-07-21 22:12:25 UTC

3 files · 1 AI reviewer · no blockers · CI failing · unstable

🛑 Suggested Action - Fix Blockers

Review summary
This registers loopover_watch_issues as a local stdio MCP tool mirroring the existing remote tool and watch CLI, proxying to the same /v1/contributors/:login/watches REST routes via a new manageIssueWatches helper. The wiring is straightforward and consistent with the established registerStdioTool pattern (#6382/#7877), the tool-count bump from 89→90 is correctly reflected in mcp-tool-rename-aliases.test.ts, and the new test exercises list/watch/unwatch/default-action/missing-repoFullName paths against an in-process fixture server. The main gap is codecov/patch failing at 85.71% (below the 99% target), meaning some branch in the new code is untested.

Nits — 6 non-blocking
  • The 'leaked secret' flagged at test/unit/mcp-cli-watch-issues-tool.test.ts:36 is just the hardcoded test fixture token `"in-process-token"` used to satisfy the API auth check in tests — not a real secret, no action needed.
  • packages/loopover-mcp/bin/loopover-mcp.ts:2328 uses `async (input: any) =>` for the tool handler; the file already uses `any` pervasively for handler inputs elsewhere so this is consistent with existing convention, not a new pattern.
  • The magic numbers 3/200/50 in watchIssuesShape (loopover-mcp.ts:461-462) mirror the same bounds used by other write-tool shapes in this file (e.g. writeToolRepoFullName's 3/200, fileIssueShape's labels bound) — consistent with existing style, not worth a new named constant.
  • codecov/patch is failing at 85.71%; worth identifying which branch in manageIssueWatches or the new tool handler (e.g. the `changed` payload formatting, or the list-vs-watch-vs-unwatch branches) isn't covered before merge.
  • Check the codecov patch report to find the specific uncovered line/branch in loopover-mcp.ts and add a targeted test case for it (e.g., the `payload.changed` truthy branch in the toolResult summary at line ~2330 doesn't look exercised by the current test, which only checks for 'watching|Watching' in the JSON string).
  • Possible secret-shaped assignment in the diff (generic_secret_assignment) — Verify the value is not a real credential.

CI checks failing

  • codecov/patch — 85.71% of diff hit (target 99.00%)

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 #7763
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: 78 registered-repo PR(s), 44 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor kai392; Gittensor profile; 78 PR(s), 0 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: minor
Linked issue satisfaction

Addressed
The PR adds a registerStdioTool("loopover_watch_issues", ...) block following the same pattern as the PR #6382 siblings, using stdioToolDescription for the description, and reuses a single manageIssueWatches helper for the HTTP calls shared with the existing watch CLI command instead of duplicating logic; it also updates the tool-count tests accordingly.

Review context
  • Author: kai392
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: JavaScript, Kotlin, Perl, TypeScript, Vue
  • Official Gittensor activity: 78 PR(s), 0 issue(s).
  • Related work: Titles/paths share 7 meaningful terms. (PR #7950)
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 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

LoopOver is closing this pull request on the maintainer's behalf (CI is failing (codecov/patch)). 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:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Register loopover_watch_issues as a local stdio MCP tool

2 participants