Skip to content

feat(mcp): register loopover_generate_contributor_issue_drafts as local stdio MCP tool#7989

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
andriypolanski:fix/7755
Jul 22, 2026
Merged

feat(mcp): register loopover_generate_contributor_issue_drafts as local stdio MCP tool#7989
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
andriypolanski:fix/7755

Conversation

@andriypolanski

@andriypolanski andriypolanski commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • loopover_generate_contributor_issue_drafts was a remote MCP tool (src/mcp/server.ts) with a maintain generate-issue-drafts CLI mirror (MCP tool + CLI mirror for contributor-issue-drafts/generate #6757), but had no local stdio MCP tool registration.
  • This registers the missing stdio tool next to its sibling loopover_plan_repo_issues, calling the same POST .../contributor-issue-drafts/generate endpoint the CLI already uses.

Closes #7755

Change

  • Input schema (packages/loopover-mcp/bin/loopover-mcp.ts): added generateContributorIssueDraftsShape (owner/repo; dryRun default true; create default false; limit 1–20 default 5), mirroring the remote tool.
  • Local stdio MCP tool: registered loopover_generate_contributor_issue_drafts with a matching STDIO_TOOL_DESCRIPTORS entry (maintainer category). Thin POST proxy; schema-defaulted dryRun/create forwarded verbatim so the route's explicit_create_requires_dry_run_false guard stays exact. Fixed branch-free summary.
  • Tool count pin: 98 → 99 in mcp-tool-rename-aliases.test.ts (current main already includes Register loopover_refresh_repo_docs as a local stdio MCP tool #7754 / Register loopover_get_repo_onboarding_pack as a local stdio MCP tool #7756).

Tests

  • New test/unit/mcp-cli-generate-contributor-issue-drafts.test.ts: in-process InMemoryTransport coverage — dry-run default body {dryRun:true, create:false, limit:5} and explicit write {dryRun:false, create:true, limit:3}.

Validation

  • git diff --check clean; npm run build:mcp clean.
  • Targeted vitest suites pass (generate-contributor-issue-drafts in-process, tools list, rename-aliases).
  • Codecov patch = 100%. Verified from coverage-final.json: all added statements/functions hit; zero branches on added lines.
  • Replaces closed conflicted feat(mcp): register loopover_generate_contributor_issue_drafts as a local stdio tool #7978 (that PR targeted a stale 97→98 pin; this branch is based on current main at 98 tools).

@superagent-security

Copy link
Copy Markdown
Contributor

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

@andriypolanski andriypolanski changed the title feat(mcp): register loopover_generate_contributor_issue_drafts as a l… feat(mcp): register loopover_generate_contributor_issue_drafts as local stdio MCP tool Jul 22, 2026
@codecov

codecov Bot commented Jul 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.01%. Comparing base (b9aa25f) to head (ece6714).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7989      +/-   ##
==========================================
- Coverage   91.91%   82.01%   -9.90%     
==========================================
  Files         739       95     -644     
  Lines       75845    24085   -51760     
  Branches    23016     4609   -18407     
==========================================
- Hits        69712    19754   -49958     
+ Misses       5041     4135     -906     
+ Partials     1092      196     -896     
Flag Coverage Δ
shard-1 11.87% <100.00%> (-42.40%) ⬇️
shard-2 0.00% <0.00%> (-53.69%) ⬇️
shard-3 0.00% <0.00%> (-55.24%) ⬇️

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.87% <100.00%> (-5.19%) ⬇️

... 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 22, 2026
@loopover-orb

loopover-orb Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Tip

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-22 01:46:16 UTC

3 files · 1 AI reviewer · no blockers · readiness 100/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This registers loopover_generate_contributor_issue_drafts as a stdio MCP tool, mirroring the existing remote tool (src/mcp/server.ts) exactly in schema shape and default values, and thinly proxies POST {repoBase}/contributor-issue-drafts/generate with dryRun/create forwarded verbatim to preserve the route's create-safety guard. The tool-count pin bump (98→99) is correctly updated in mcp-tool-rename-aliases.test.ts, and the new in-process test exercises both the default dry-run path and the explicit create+dryRun=false write path with real assertions on the forwarded body. The change is narrow, well-scoped to the linked issue #7755, and consistent with sibling stdio tool registrations already in the file.

Nits — 5 non-blocking
  • packages/loopover-mcp/bin/loopover-mcp.ts:3134 uses an explicit `any` type on the tool handler args, consistent with the file's existing pattern but worth tightening to the shape's inferred type.
  • The external brief flags test/unit/mcp-cli-generate-contributor-issue-drafts.test.ts:27 as a potential secret; it's actually the literal string "in-process-token" used as a test fixture value, not a real credential.
  • packages/loopover-mcp/bin/loopover-mcp.ts:1041's `20`/`5` bounds mirror the remote tool's shape verbatim (per the comment), so naming them as constants isn't necessary for correctness but could aid readability if this pattern repeats.
  • Consider extracting the max-limit bound (20) and default (5) into a shared constant if a third sibling tool duplicates the same numbers, to avoid drift across the CLI and remote shapes.
  • 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 #7755
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low 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: 190 registered-repo PR(s), 120 merged, 22 issue(s).
Contributor context ✅ Confirmed Gittensor contributor andriypolanski; Gittensor profile; 190 PR(s), 22 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: moderate
Linked issue satisfaction

Addressed
The PR adds a registerStdioTool block for loopover_generate_contributor_issue_drafts following the exact sibling pattern, reuses apiPost against the same contributor-issue-drafts/generate endpoint the CLI already calls, sources its description via stdioToolDescription/STDIO_TOOL_DESCRIPTORS, and updates the tool-count test plus adds dedicated test coverage.

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: 190 PR(s), 22 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
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 merged commit 6a55b8d into JSONbored:main Jul 22, 2026
12 checks passed
@github-actions github-actions Bot mentioned this pull request Jul 22, 2026
12 tasks
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_generate_contributor_issue_drafts as a local stdio MCP tool

2 participants