Skip to content

feat(mcp): register loopover_list_notifications as a local stdio tool - #7893

Closed
tryeverything24 wants to merge 1 commit into
JSONbored:mainfrom
tryeverything24:register-loopover-list-notifications-stdio-tool
Closed

feat(mcp): register loopover_list_notifications as a local stdio tool#7893
tryeverything24 wants to merge 1 commit into
JSONbored:mainfrom
tryeverything24:register-loopover-list-notifications-stdio-tool

Conversation

@tryeverything24

Copy link
Copy Markdown
Contributor

Closes #7761

What

loopover_list_notifications was already registered as a remote MCP tool (src/mcp/server.ts) with a CLI mirror (notifications, #6745), but had no local stdio MCP tool registration — the same gap class PR #6382 fixed for the 5 maintain-surface tools.

Adds a registerStdioTool("loopover_list_notifications", ...) block to packages/loopover-mcp/bin/loopover-mcp.ts, mirroring #6382's exact pattern:

  • description: stdioToolDescription("loopover_list_notifications") — centralized lookup, not hardcoded.
  • inputSchema: loginShape — the same schema its loginShape-based siblings (loopover_get_decision_pack, loopover_explain_repo_decision, loopover_monitor_open_prs, loopover_pr_outcome) already use, placed directly alongside them.
  • Handler returns toolResult(...), matching every other stdio tool's result shape.

Reuse, no duplicated HTTP logic

The handler calls getNotifications(login) — the exact same apiGet call the existing notifications CLI command already makes (packages/loopover-mcp/bin/loopover-mcp.ts, notificationsCli) — so there remains exactly one HTTP call site for GET /v1/contributors/:login/notifications.

Tests

Added a stdio-proxy test block to test/unit/mcp-cli-notifications.test.ts, following the identical StdioClientTransport + fixture-server shape used by the sibling loginShape tools' own suites (mcp-cli-pr-outcomes.test.ts, mcp-cli-monitor-open-prs.test.ts):

  • tool is registered in the stdio server's tool list
  • the tool proxies login to GET /v1/contributors/:login/notifications via the same apiGet the CLI uses
  • tool result / CLI --json mirror-parity for the same login

Also bumped the pinned stdio tool count in test/unit/mcp-tool-rename-aliases.test.ts (80 → 81, accounting for #7758 which landed on main in between).

Verification

  • npm run typecheck clean
  • npm run build:mcp clean (tsc, sourcemap-strip, syntax-check all pass)
  • npm run test:mcp-pack clean
  • Targeted suite green: mcp-cli-notifications.test.ts, mcp-tool-rename-aliases.test.ts, mcp-notifications.test.ts, mcp-tool-categories.test.ts, mcp-discovery.test.ts, mcp-cli-pr-outcomes.test.ts, mcp-cli-monitor-open-prs.test.ts, mcp-cli-maintain-tools.test.ts — 87+ tests, all passing
  • git diff --check against upstream/main clean
  • Rebased onto current upstream/main (picked up Register loopover_get_outcome_calibration as a local stdio MCP tool #7758's loopover_get_outcome_calibration stdio registration landing concurrently; resolved the resulting tool-count-pin conflict to 81, verified no overlap between the two new registrations)

packages/loopover-mcp/bin/**/*.ts is in vitest.config.ts's coverage.include and not exempted in codecov.yml, but per that file's own documented note it's tested exclusively via subprocess spawn (not v8-instrumentable in-process). Verified against real precedent before assuming the 99% patch gate applies the same way it does to src/**: PR #6382 and PR #7018 (both landed identical registerStdioTool additions to this exact file) both show codecov/patch: pass on GitHub, confirming this file's patch-gate scoping tolerates the subprocess-only test convention this PR follows.

@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 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.68%. Comparing base (2364ad4) to head (6efba23).

Files with missing lines Patch % Lines
packages/loopover-mcp/bin/loopover-mcp.ts 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7893      +/-   ##
==========================================
- Coverage   88.85%   80.68%   -8.17%     
==========================================
  Files          88       89       +1     
  Lines       21214    23362    +2148     
  Branches     3675     4507     +832     
==========================================
  Hits        18849    18849              
- Misses       2187     4335    +2148     
  Partials      178      178              
Flag Coverage Δ
shard-1 0.00% <0.00%> (?)
shard-2 0.00% <0.00%> (?)
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 0.00% <0.00%> (ø)

Closes JSONbored#7761

loopover_list_notifications was already registered as a remote MCP tool
(src/mcp/server.ts) with a CLI mirror (`notifications`, JSONbored#6745), but had
no local stdio MCP tool registration -- the same gap class PR JSONbored#6382
fixed for the 5 maintain-surface tools. Mirrors that pattern exactly:
a registerStdioTool block using stdioToolDescription for the
centralized description and toolResult for the response shape, placed
alongside the other loginShape-based contributor tools
(loopover_get_decision_pack / loopover_explain_repo_decision /
loopover_monitor_open_prs / loopover_pr_outcome).

The handler reuses getNotifications(login), the exact apiGet call the
existing `notifications` CLI command already makes, so there is one
HTTP call site for this route, not two.

Adds a stdio-proxy test to test/unit/mcp-cli-notifications.test.ts
following the same StdioClientTransport + fixture-server shape as the
sibling loginShape tools' own suites (mcp-cli-pr-outcomes.test.ts,
mcp-cli-monitor-open-prs.test.ts): registration, the one apiGet call,
and tool/CLI mirror parity. Bumps the pinned stdio tool count in
mcp-tool-rename-aliases.test.ts from 79 to 80.
@tryeverything24
tryeverything24 force-pushed the register-loopover-list-notifications-stdio-tool branch from 2525459 to 6efba23 Compare July 21, 2026 16:27
@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

Caution

🛑 LoopOver review result - fixes required

Review updated: 2026-07-21 16:34:51 UTC

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

🛑 Suggested Action - Fix Blockers

Review summary
This PR mirrors the established #6382 pattern to register `loopover_list_notifications` as a local stdio tool, reusing `getNotifications`/`apiGet` from the existing CLI mirror so there's a single HTTP call site, and adds a proxy test suite plus bumps the pinned tool count from 80 to 81. The change is narrow, well-scoped to the linked issue (#7761), and structurally consistent with its loginShape siblings (same schema, handler shape, toolResult usage, and test harness pattern).

Nits — 5 non-blocking
  • packages/loopover-mcp/bin/loopover-mcp.ts:2152 — the handler param `async ({ login }: any)` uses an explicit `any` annotation; check whether sibling loginShape handlers (e.g. `loopover_pr_outcome`) use a typed destructure instead and match that convention.
  • codecov/patch failed at 0.00% against a 99% target — confirm this is a coverage-tool measurement quirk (e.g. new lines not attributed) rather than the new registration/handler code genuinely being untested, since the diff does include a dedicated proxy test block.
  • test/unit/mcp-cli-notifications.test.ts — the new describe block duplicates the `bin` path constant already used by sibling test files; consider whether a shared test-support constant exists to avoid repetition across notification/monitor/outcome test files.
  • packages/loopover-mcp/bin/loopover-mcp.ts:2152 — replace the `any` param type with the same explicit type used by sibling loginShape handlers if one exists, for consistency and type safety.
  • test/unit/mcp-cli-notifications.test.ts — verify the `capturedRequests` filter correctly excludes the notifications-read endpoint in all cases (e.g. query-string variants), matching the precision used in mcp-cli-monitor-open-prs.test.ts's URL filter.

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

Addressed
The PR adds a registerStdioTool block for loopover_list_notifications using stdioToolDescription and loginShape, reuses the existing getNotifications call so there's a single HTTP call site, and includes tests mirroring the sibling suites plus an updated tool-count assertion.

Review context
  • Author: tryeverything24
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: JavaScript, TypeScript, Python, HTML, C++, Java, PHP, C#
  • Official Gittensor activity: 60 PR(s), 0 issue(s).
  • Related work: Titles/paths share 7 meaningful terms. (PR #7894)
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.

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_list_notifications as a local stdio MCP tool

1 participant