Skip to content

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

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

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

Conversation

@claytonlin1110

Copy link
Copy Markdown
Contributor

What

loopover_watch_issues was already a remote MCP tool (src/mcp/server.ts:2279) and had a CLI mirror (watch, packages/loopover-mcp/bin/loopover-mcp.ts:4081, added by #6746), but never got the matching local stdio MCP tool registration -- the same gap class the five #6382 maintain-surface tools (loopover_list_pending_actions, loopover_decide_pending_action, loopover_set_agent_paused, loopover_set_action_autonomy, loopover_get_gate_precision) filled.

Changes

  • Added a registerStdioTool("loopover_watch_issues", ...) block to packages/loopover-mcp/bin/loopover-mcp.ts, placed next to its sibling stdio tools, following the exact pattern from feat(mcp): register the maintain REST surface as local stdio tools #6382 (same stdioToolDescription lookup, same toolResult formatting helper).
  • The tool proxies to the exact same /v1/contributors/:login/watches REST endpoint the existing watch CLI command already calls, through the same apiGet/apiPost/apiDelete client (list = GET, watch = POST, unwatch = DELETE) -- no duplicated HTTP logic.
  • login is optional and resolves from the active session / LOOPOVER_LOGIN / GITHUB_LOGIN, matching the login-resolution convention already used by the sibling loopover_get_pr_ai_review_findings tool and the watch CLI command itself.
  • Added test/unit/mcp-cli-watch-issues-tool.test.ts, covering all three actions (list/watch/unwatch), login-resolution fallbacks, and error conditions, mirroring the existing sibling test file's shape.
  • Updated the hardcoded stdio tool-count invariant in test/unit/mcp-tool-rename-aliases.test.ts to account for the new tool.

Closes

Closes #7763

Verification

  • npm run typecheck passed
  • npx vitest run test/unit/mcp-tool-rename-aliases.test.ts test/unit/mcp-cli-watch-issues-tool.test.ts test/unit/mcp-cli-tools.test.ts test/unit/mcp-discovery.test.ts test/unit/mcp-output-schemas.test.ts passed (83 passed)
  • npm run build:mcp passed

…bored#7763)

loopover_watch_issues was already a remote MCP tool (src/mcp/server.ts)
and had a CLI mirror (`watch`, JSONbored#6746), but never got the matching local
stdio registration -- the same gap class the five JSONbored#6152/JSONbored#6382
maintain-surface tools filled. Follows their exact registerStdioTool
pattern and proxies to the same /v1/contributors/:login/watches
endpoint the `watch` CLI already calls, through the same
apiGet/apiPost/apiDelete client (list=GET, watch=POST, unwatch=DELETE)
-- no duplicated HTTP logic. `login` is optional, resolving from the
active session / LOOPOVER_LOGIN / GITHUB_LOGIN like its sibling
loopover_get_pr_ai_review_findings tool.
@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

❌ Patch coverage is 0% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.64%. Comparing base (e7e10e7) to head (53a5616).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
packages/loopover-mcp/bin/loopover-mcp.ts 0.00% 13 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #7899       +/-   ##
===========================================
- Coverage   91.39%   80.64%   -10.76%     
===========================================
  Files         730       89      -641     
  Lines       74774    23372    -51402     
  Branches    22818     4514    -18304     
===========================================
- Hits        68343    18849    -49494     
+ Misses       5389     4345     -1044     
+ Partials     1042      178      -864     
Flag Coverage Δ
shard-1 0.00% <0.00%> (-58.57%) ⬇️
shard-2 0.00% <0.00%> (-51.85%) ⬇️
shard-3 0.00% <0.00%> (-50.22%) ⬇️

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 0.00% <0.00%> (ø)

... and 641 files with indirect coverage changes

@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 16:43:31 UTC

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

🛑 Suggested Action - Fix Blockers

Review summary
This PR registers `loopover_watch_issues` as a local stdio MCP tool, closing the gap where the remote tool and CLI command (`watch`) existed but no stdio equivalent did — mirroring the exact pattern used for the five #6382 maintain tools. The implementation is a thin proxy over the same `/v1/contributors/:login/watches` REST endpoint the `watch` CLI already hits (GET/POST/DELETE via `apiGet`/`apiPost`/`apiDelete`), with the same login-resolution fallback chain (`login` → session → `LOOPOVER_LOGIN` → `GITHUB_LOGIN`) as the sibling `loopover_get_pr_ai_review_findings` tool. Tests cover all three actions, login-resolution fallbacks, and error paths, and the stdio tool-count invariant in the alias test is correctly bumped from 80 to 81.

Nits — 5 non-blocking
  • packages/loopover-mcp/bin/loopover-mcp.ts:2646 — `apiDelete(base, { repoFullName })` passes a body to a DELETE call; confirm the shared `apiDelete` client actually forwards a request body rather than silently dropping it, since that's not visible in this diff.
  • packages/loopover-mcp/bin/loopover-mcp.ts:373-374 — the new `watchIssuesShape` hardcodes `200` and `50` as literal bounds right next to where `WRITE_TOOL_REPO_FULL_NAME_MAX = 200` is defined a few lines later; reuse the constant for `repoFullName`'s max instead of duplicating the magic number.
  • packages/loopover-mcp/bin/loopover-mcp.ts:2646 — the handler param is typed `: any`, matching the existing sibling-tool convention in this file but still worth tightening to the inferred zod shape type if that convention is ever revisited.
  • The `codecov/patch` check failed at 0.00% (target 99%) despite the PR adding a comprehensive dedicated test file (`test/unit/mcp-cli-watch-issues-tool.test.ts`) that exercises all three actions and error paths; given the branch is one commit behind default, this is plausibly a stale-branch coverage-reporting artifact rather than an actual gap, but it's worth re-running after a rebase to confirm.
  • Rebase onto the latest default branch and re-check `codecov/patch` before merge, since the branch is a commit behind and that's the most likely explanation for the 0% patch-coverage reading given the diff's own test file.

CI checks failing

  • codecov/patch — 0.00% 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 ⚠️ 2 scoped overlaps 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: 393 registered-repo PR(s), 259 merged, 87 issue(s).
Contributor context ✅ Confirmed Gittensor contributor claytonlin1110; Gittensor profile; 393 PR(s), 87 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: moderate
Linked issue satisfaction

Addressed
The PR adds a registerStdioTool("loopover_watch_issues", ...) block placed alongside the sibling stdio tools, uses stdioToolDescription for its description, and its handler proxies to the same /v1/contributors/:login/watches endpoint (via apiGet/apiPost/apiDelete) that the existing watch CLI command already calls, matching the required pattern.

Review context
  • Author: claytonlin1110
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, JavaScript, TypeScript, Rust
  • Official Gittensor activity: 393 PR(s), 87 issue(s).
  • Related work: Titles/paths share 5 meaningful terms. (PR #7900, PR #7887)
  • Related work: Titles/paths share 7 meaningful terms. (PR #7890, PR #7887)
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

1 participant