Skip to content

feat(mcp): register loopover_propose_action as a local stdio tool - #7991

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

feat(mcp): register loopover_propose_action as a local stdio tool#7991
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
andriypolanski:fix/7753

Conversation

@andriypolanski

@andriypolanski andriypolanski commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

PR body

Summary

  • loopover_propose_action was a remote MCP tool (src/mcp/server.ts) with a maintain propose CLI mirror (REST + CLI mirror for loopover_propose_action #6744), but had no local stdio MCP tool registration.
  • This registers the missing stdio tool next to its maintain-adjacent siblings (loopover_list_pending_actions / loopover_decide_pending_action), POSTing to the same {repoBase}/agent/pending-actions route the CLI already uses.

Closes #7753

Change

  • Input schema (packages/loopover-mcp/bin/loopover-mcp.ts): added proposeActionShape (owner/repo/pullNumber/actionClass via PROPOSE_ACTION_CLASSES, plus optional reason/label/reviewBody/mergeMethod/closeComment).
  • Local stdio MCP tool: registered loopover_propose_action with a matching STDIO_TOOL_DESCRIPTORS entry (agent category). POSTs with the identical stripUndefined({...}) body the CLI uses so absent optionals are omitted. Stages into the approval queue — never executes until approved. Fixed branch-free summary.
  • Tool count pin: 99 → 100 in mcp-tool-rename-aliases.test.ts (current main already includes Register loopover_generate_contributor_issue_drafts as a local stdio MCP tool #7755).

Tests

  • New test/unit/mcp-cli-propose-action.test.ts: in-process InMemoryTransport coverage — asserts POST .../agent/pending-actions and that the fixture-echoed body carries the right actionClass/pullNumber/reason.

Validation

  • git diff --check clean; npm run build:mcp clean.
  • Targeted vitest suites pass (propose-action 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 conflicted feat(mcp): register loopover_propose_action as a local stdio tool #7990 (that PR targeted a stale ~98→99 pin; this branch is based on current main at 99 tools).

@superagent-security

Copy link
Copy Markdown
Contributor

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

1 similar comment
@superagent-security

Copy link
Copy Markdown
Contributor

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

@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.02%. Comparing base (6a55b8d) to head (7b3bda8).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7991      +/-   ##
==========================================
- Coverage   91.91%   82.02%   -9.90%     
==========================================
  Files         739       95     -644     
  Lines       75850    24089   -51761     
  Branches    23019     4609   -18410     
==========================================
- Hits        69717    19758   -49959     
+ Misses       5041     4134     -907     
+ Partials     1092      197     -895     
Flag Coverage Δ
shard-1 12.03% <100.00%> (-46.81%) ⬇️
shard-2 0.00% <0.00%> (-46.84%) ⬇️
shard-3 0.00% <0.00%> (-56.29%) ⬇️

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 12.03% <100.00%> (-5.18%) ⬇️

... 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 02:02:15 UTC

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

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This PR registers loopover_propose_action as a local stdio MCP tool, mirroring the existing remote tool and maintain-propose CLI by POSTing to the same {repoBase}/agent/pending-actions route with an identical stripUndefined body. The schema (proposeActionShape), STDIO_TOOL_DESCRIPTORS entry, and registerStdioTool call are wired consistently with sibling agent tools, and the tool-count pin bump (99→100) is correctly updated alongside a new in-process test. The added test uses InMemoryTransport to get real coverage of the registerStdioTool block, consistent with this repo's established pattern for avoiding 0%-coverage subprocess-only tests.

Nits — 6 non-blocking
  • The external brief flags `test/unit/mcp-cli-propose-action.test.ts:31` as a potential secret, but it's just `process.env.LOOPOVER_API_TOKEN = "in-process-token";`, a placeholder test token identical to other test files in this suite — not a real leaked secret.
  • packages/loopover-mcp/bin/loopover-mcp.ts: the `async (...) => {...}: any` handler parameter on the new registerStdioTool call uses `any` typing, matching the pre-existing pattern in this file but still worth tightening if this file is ever split up.
  • The magic numbers 500/60000/60000 in proposeActionShape mirror the same literals already used elsewhere in this file for similar shapes, so introducing them here is consistent with existing convention rather than a new smell.
  • Consider extracting shared max-length constants (500, 60000) if `proposeActionShape` and the remote `src/mcp/server.ts` shape ever risk drifting, though hand-duplication here follows this file's established pattern for engine-adjacent literals.
  • packages/loopover-mcp/bin/loopover-mcp.ts:3047 — the `any`-typed destructured handler could use an inferred type from `proposeActionShape` via zod's `z.infer`, consistent with tightening elsewhere in this large file, though it's not required given the file's existing conventions.
  • 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 #7753
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
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: 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 diff adds a registerStdioTool block for loopover_propose_action that mirrors the sibling pattern, uses stdioToolDescription/STDIO_TOOL_DESCRIPTORS, and calls apiPost to the same /agent/pending-actions endpoint the CLI uses, plus an accompanying test file and updated tool-count assertions.

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
  • Start here: Add a concise scope and risk note.
  • Then work through the remaining 1 step 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.

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

2 participants