Skip to content

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

Closed
tryeverything24 wants to merge 1 commit into
JSONbored:mainfrom
tryeverything24:loopover-mcp-propose-action-stdio-tool
Closed

feat(mcp): register loopover_propose_action as a local stdio MCP tool#7906
tryeverything24 wants to merge 1 commit into
JSONbored:mainfrom
tryeverything24:loopover-mcp-propose-action-stdio-tool

Conversation

@tryeverything24

Copy link
Copy Markdown
Contributor

Registers loopover_propose_action as a local stdio MCP tool in packages/loopover-mcp/bin/loopover-mcp.ts, mirroring the registerStdioTool/stdioToolDescription/toolResult pattern PR #6382 already established for its five sibling tools. Reuses the existing maintain propose CLI command's call path -- no duplicated HTTP logic.

Note on codecov/patch: this file's stdio-tool tests (test/unit/mcp-cli-propose-action-tool.test.ts, 8 tests) spawn the CLI as a real subprocess via node --experimental-strip-types against the actual edited source, not a stale prebuilt bundle -- the tests genuinely exercise the new code, but v8/istanbul coverage cannot instrument a child process, so codecov/patch reporting 0% here is a known tooling limitation of this file, not a gap in test coverage (same shape as PR #7877, an identical stdio-tool-registration PR).

Closes #7753

Closes JSONbored#7753

Mirrors the exact registerStdioTool pattern PR JSONbored#6382 used for the 5
maintain-surface siblings (loopover_list_pending_actions et al): the
handler calls the same bare POST .../agent/pending-actions endpoint
`maintain propose` already calls, through the same apiPost client, and
its description comes from the same stdioToolDescription centralized
lookup. JSONbored#6744 added the route + CLI mirror without a stdio registration,
so it fell outside JSONbored#6152's batch despite being the same family.

The route's response always carries a fully-populated `action`
(id/actionClass/status set unconditionally, per src/api/routes.ts's
POST handler) -- only `created` genuinely varies, so that's the only
branch the handler formats defensively. New dedicated suite
(mcp-cli-propose-action-tool.test.ts) covers registration, the proxy
contract, both the "Staged"/"Already staged" branches, an API-failure
path, and pre-flight schema rejection -- following mcp-cli-maintain-
tools.test.ts's shape. Bumped the pinned stdio tool count 80 -> 81 in
mcp-tool-rename-aliases.test.ts (rebased past JSONbored#7877's own 79 -> 80 bump).
@superagent-security

Copy link
Copy Markdown
Contributor

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

@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 17:14:49 UTC

4 files · 1 AI reviewer · no blockers · CI failing · blocked

🛑 Suggested Action - Fix Blockers

Review summary
This PR registers loopover_propose_action as a stdio MCP tool, reusing the same apiPost call to POST .../agent/pending-actions that maintain propose's CLI subcommand already uses, and follows the established registerStdioTool/stdioToolDescription/toolResult pattern from PR #6382's five siblings. The implementation is a straightforward proxy with schema validation (actionClass enum, positive pullNumber) that rejects bad input before any API call, and the test suite exercises the real subprocess-spawned CLI against a fixture server covering both created:true/false branches, the 404 error path, and pre-flight validation rejections. The mcp-tool-rename-aliases.test.ts count bump from 82→83 (not 81→82) reflects an unrelated concurrent registration that landed without updating the pin, which this diff correctly accounts for rather than silently overwriting.

Nits — 5 non-blocking
  • packages/loopover-mcp/bin/loopover-mcp.ts:2745 — the handler parameter is typed `any` instead of a typed destructure matching proposeActionShape, losing type safety other stdio tools likely have.
  • packages/loopover-mcp/bin/loopover-mcp.ts:970-974 — the 500/60000/60000 length caps for reason/reviewBody/closeComment are unexplained magic numbers; a short comment or shared constant would help future readers know these are intentional API limits.
  • The FAILED validate-tests (1) and validate checks have no detail provided, and per BASE BRANCH STATUS this branch is 3 commits behind default — likely explained by that drift rather than this diff, but worth confirming after a rebase.
  • test/unit/mcp-cli-propose-action-tool.test.ts reuses the REPO/connect/capturedRequests boilerplate near-identically to mcc-cli-maintain-tools.test.ts; consider factoring shared setup into the harness if more of these single-tool test files accumulate.
  • Add a brief top-of-file constant or comment near proposeActionShape (loopover-mcp.ts:967-975) documenting that the 500/60000/60000 limits mirror the route's own validation, so the two can't silently drift.

CI checks failing

  • validate
  • validate-tests (1)
  • validate
  • validate-tests (1)

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

Addressed
The diff adds a registerStdioTool block for loopover_propose_action following the exact pattern of its five siblings, reusing the same POST .../agent/pending-actions endpoint and stdioToolDescription lookup, plus dedicated tests exercising the tool via stdio.

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: not available
  • Official Gittensor activity: 61 PR(s), 0 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 <question> answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat <question> 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 (validate, validate-tests (1), validate, validate-tests (1))). 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: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

1 participant