Skip to content

feat(mcp): register loopover_get_agent_audit_feed stdio tool - #7973

Closed
xfodev wants to merge 1 commit into
JSONbored:mainfrom
xfodev:feat/mcp-stdio-agent-audit-feed-7757
Closed

feat(mcp): register loopover_get_agent_audit_feed stdio tool#7973
xfodev wants to merge 1 commit into
JSONbored:mainfrom
xfodev:feat/mcp-stdio-agent-audit-feed-7757

Conversation

@xfodev

@xfodev xfodev commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

loopover_get_agent_audit_feed is exposed as a remote MCP tool (src/mcp/server.ts) and a maintain audit-feed CLI verb, but had no local stdio MCP registration — the same gap class PR #6382 fixed for its maintain-adjacent siblings. This adds the missing stdio surface:

  • registerStdioTool("loopover_get_agent_audit_feed", …) + its STDIO_TOOL_DESCRIPTORS entry (category agent) in packages/loopover-mcp/bin/loopover-mcp.ts, mirroring the freshly-merged loopover_get_automation_state sibling (Register loopover_get_automation_state as a local stdio MCP tool #7752): ownerRepoShape input, apiGet proxy, toolResult wrapper.
  • The stdio tool proxies the existing GET /v1/repos/:owner/:repo/agent/audit-feed route — the same route the remote tool and the CLI already call. No new REST route, no new CLI verb, no src/mcp/server.ts change.

The handler is intentionally branch-free (no ?? / ?. / ternaries) so codecov/patch stays at 100% on the new lines.

Tests

  • test/unit/mcp-cli-agent-audit-feed-stdio.test.ts (new, in-process): imports the bin .ts and drives the tool through a real MCP Client over InMemoryTransport against a fixture server, asserting the tool is listed and the proxied request hits /v1/repos/owner/repo/agent/audit-feed (GET).
  • test/unit/mcp-tool-rename-aliases.test.ts: stdio tool-count pin bumped 95 → 96 (all three assertions) with a running-log comment. Verified the live built bin registers exactly 96 tools.
  • Category-sync (mcp-tool-categories) and the maintain stdio-proxy suite (mcp-cli-maintain-tools) pass unchanged.

UI Evidence

N/A — backend MCP tooling only; no apps/** files touched.

Validation

  • packages/loopover-mcp builds clean (tsc -p).
  • mcp-tool-rename-aliases, mcp-tool-categories, mcp-cli-maintain-tools pass (32 tests); live server registers exactly 96 tools.
  • Rebased on latest main; no base conflict.
  • No wallet/hotkey/trust-score/reward terms in tool output.

Closes #7757

…ed#7757)

loopover_get_agent_audit_feed is exposed as a remote MCP tool
(src/mcp/server.ts) and a `maintain audit-feed` CLI verb, but had no
local stdio MCP registration, unlike its maintain-adjacent siblings from
PR JSONbored#6382. Add the registerStdioTool block + STDIO_TOOL_DESCRIPTORS entry
in packages/loopover-mcp/bin/loopover-mcp.ts, proxying the same
GET /v1/repos/:owner/:repo/agent/audit-feed route the CLI already calls.

Covers the new stdio lines with an in-process test that drives the tool
through a real MCP client over InMemoryTransport, and bumps the stdio
tool-count pin from 95 to 96.

Closes JSONbored#7757
@xfodev
xfodev requested a review from JSONbored as a code owner July 22, 2026 00:50
@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 81.94%. Comparing base (ca738de) to head (9d1480b).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7973      +/-   ##
==========================================
- Coverage   91.89%   81.94%   -9.95%     
==========================================
  Files         738       94     -644     
  Lines       75699    23938   -51761     
  Branches    23008     4599   -18409     
==========================================
- Hits        69566    19617   -49949     
+ Misses       5041     4125     -916     
+ Partials     1092      196     -896     
Flag Coverage Δ
shard-1 0.00% <0.00%> (-54.33%) ⬇️
shard-2 11.69% <100.00%> (-42.01%) ⬇️
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.69% <100.00%> (-4.81%) ⬇️

... 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

Caution

🛑 LoopOver review result - reject/close recommended

Review updated: 2026-07-22 00:58:18 UTC

3 files · 1 AI reviewer · 1 blocker · CI green · clean

🛑 Suggested Action - Reject/Close

Review summary
This PR adds the missing local stdio MCP tool `loopover_get_agent_audit_feed`, mirroring the established pattern (registerStdioTool + STDIO_TOOL_DESCRIPTORS entry) used for sibling tools like #7752's automation-state tool. It's a narrow, well-scoped proxy to an existing REST route with no new endpoint or CLI verb, backed by an in-process test that verifies registration and request proxying, and the tool-count pin bump is consistent across all three assertions in mcp-tool-rename-aliases.test.ts. The change closes the linked issue #7757 and follows the file's established conventions (ownerRepoShape, apiGet, toolResult).

Nits — 6 non-blocking
  • The flagged 'leaked secret' at test/unit/mcp-cli-agent-audit-feed-stdio.test.ts:32 is just the literal fixture string `"in-process-token"` used consistently across this repo's other stdio test harnesses (e.g. mcp-cli-maintainer-noise.test.ts uses `"session-token"`) — not a real credential, but worth confirming your secret-scanner allowlists this pattern to avoid future false positives.
  • The `async ({ owner, repo }: any) => {...}` handler signature at loopover-mcp.ts:3013 uses an explicit `any` for the callback parameter, consistent with the rest of this file's untyped style, so it's a pre-existing convention rather than a new problem — but if the file is ever tightened up, this is a spot that'd need real typing.
  • `long-file` flag on packages/loopover-mcp/bin/loopover-mcp.ts (3021 lines) is a pre-existing condition this PR only adds ~22 lines to — not something this diff should be asked to fix, per the file's own `chore(mcp): migrate packages/loopover-mcp from plain .js to real TypeScript #7291/chore(mcp): convert bin/loopover-mcp.js to TypeScript (Phase 3 of #7291) #7330` comment explaining the single-file design decision.
  • Consider whether future single-tool additions like this one could be driven by a small data table plus a generator loop instead of hand-writing another registerStdioTool block, though the file's existing convention (one block per tool) makes this a style choice, not a defect.
  • The PR description states 'Closes Register loopover_get_agent_audit_feed as a local stdio MCP tool #7757' but the review brief notes only partial coverage for that issue — worth double-checking the issue's acceptance criteria are fully satisfied before merge.
  • Possible secret-shaped assignment in the diff (generic_secret_assignment) — Verify the value is not a real credential.

Why this is blocked

  • No linked issue detected: The PR cites an issue number, but it could not be verified as a currently open issue. — If this PR is intended to solve an issue, link it explicitly in the PR body.
📋 Copy for AI agents — paste into your coding agent
Fix the following blocker(s) from this PR review:

1. No linked issue detected: The PR cites an issue number, but it could not be verified as a currently open issue. — If this PR is intended to solve an issue, link it explicitly in the PR body.

Decision drivers

  • ❌ Code review — 1 blocker (1 reviewer)
  • ❌ Gate result — Blocking (Repo-configured hard blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #7757
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: 95 registered-repo PR(s), 49 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor xfodev; Gittensor profile; 95 PR(s), 0 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: minor
Linked issue satisfaction

Addressed
The PR adds a registerStdioTool block for loopover_get_agent_audit_feed mirroring the existing sibling pattern, reuses the same GET .../agent/audit-feed REST call already used by the CLI command (no duplicated HTTP logic), and adds a stdioToolDescription-backed descriptor plus updated test coverage.

Review context
  • Author: xfodev
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: JavaScript, TypeScript
  • Official Gittensor activity: 95 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 &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 22, 2026

Copy link
Copy Markdown
Contributor

LoopOver is closing this pull request on the maintainer's behalf (No linked issue detected). 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 22, 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_get_agent_audit_feed as a local stdio MCP tool

1 participant