Skip to content

feat(mcp): register loopover_get_agent_audit_feed as a local stdio tool - #7971

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

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

Conversation

@andriypolanski

@andriypolanski andriypolanski commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • loopover_get_agent_audit_feed was a remote MCP tool (src/mcp/server.ts) with a maintain audit-feed CLI mirror (CLI mirror for loopover_get_agent_audit_feed #6733), but had no local stdio MCP tool registration.
  • This registers the missing stdio tool next to loopover_get_maintainer_noise, calling the same GET .../agent/audit-feed endpoint the CLI already uses (optional since/limit forwarded verbatim).

Closes #7757

Change

  • Input schema (packages/loopover-mcp/bin/loopover-mcp.ts): added auditFeedShape (owner/repo + optional since/limit), mirroring the remote tool.
  • Local stdio MCP tool: registered loopover_get_agent_audit_feed with a matching STDIO_TOOL_DESCRIPTORS entry (agent category). Thin GET proxy of {repoBase}/agent/audit-feed; query filters forwarded only when present (same pattern as the CLI).
  • Tool count pin: 95 → 96 in mcp-tool-rename-aliases.test.ts (current main already includes Register loopover_get_automation_state as a local stdio MCP tool #7752 automation-state).

Tests

  • New test/unit/mcp-cli-agent-audit-feed.test.ts: in-process InMemoryTransport coverage — with-filters path (since+limit) and no-filters path (empty query / query.size === 0 false branch), so every if / ternary arm is hit.

Validation

  • git diff --check clean; npm run build:mcp clean.
  • Targeted vitest suites pass (agent-audit-feed in-process, tools list, rename-aliases).
  • Codecov patch = 100%. Verified from coverage-final.json: all added statements/functions hit; both since/limit if-arms and the query.size > 0 ternary arms are [1,1].
  • Replaces closed conflicted feat(mcp): register loopover_get_agent_audit_feed as a local stdio tool #7967 (that PR targeted a stale 94→95 pin; this branch is based on current main at 95 tools).

UI Evidence

N/A — local stdio MCP tool only; no UI surface changed.

@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_get_agent_audit_feed as a local stdio tool (#7757) feat(mcp): register loopover_get_agent_audit_feed as a local stdio 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 81.94%. Comparing base (ca738de) to head (53f4108).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7971      +/-   ##
==========================================
- Coverage   89.11%   81.94%   -7.17%     
==========================================
  Files          93       94       +1     
  Lines       21723    23942    +2219     
  Branches     3755     4602     +847     
==========================================
+ Hits        19358    19620     +262     
- Misses       2187     4126    +1939     
- Partials      178      196      +18     
Flag Coverage Δ
shard-1 0.00% <0.00%> (?)
shard-2 11.80% <100.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 11.80% <100.00%> (ø)

@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 00:50:32 UTC

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

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This PR mirrors the existing remote loopover_get_agent_audit_feed tool as a local stdio MCP tool, following the exact same registerStdioTool + apiGet + query.size pattern already used by loopover_get_maintainer_noise and the maintain audit-feed CLI mirror. The query-building logic (URLSearchParams with since/limit forwarded only when present) is correct and matches the CLI's established convention, and the new test exercises both the filtered and unfiltered query paths in-process via InMemoryTransport. The tool-count pin bump (95→96) is applied consistently across both assertions in mcp-tool-rename-aliases.test.ts.

Nits — 5 non-blocking
  • packages/loopover-mcp/bin/loopover-mcp.ts:376 — the `.max(200)` limit is a bare magic number; consider a named constant (e.g. `AUDIT_FEED_LIMIT_MAX`) since the comment already documents the 1..200 range in prose.
  • The external brief's 'leaked secret' flag on test/unit/mcp-cli-agent-audit-feed.test.ts:31 (`LOOPOVER_API_TOKEN = "in-process-token"`) is a false positive — it's a fixture-scoped test token, matching the identical pattern already used by mcp-cli-maintain-tools.test.ts and other in-process test files in this repo.
  • The handler param and callback in loopover-mcp.ts use `any` typing (`async ({ owner, repo, since, limit }: any) =>`), but this matches every other registerStdioTool handler already in the file, so it's consistent with existing convention rather than a new issue.
  • Consider extracting the shared since/limit-max(200) query-building logic into a small helper if a third stdio tool with the same shape shows up, to avoid triplicating the URLSearchParams pattern.
  • 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 #7757
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 PR adds a registerStdioTool block for loopover_get_agent_audit_feed following the same pattern as the sibling tools, using stdioToolDescription and hitting the same GET .../agent/audit-feed endpoint the CLI already calls, plus updates tool-count tests and adds dedicated 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
  • 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.

@loopover-orb
loopover-orb Bot merged commit 84a7878 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_get_agent_audit_feed as a local stdio MCP tool

2 participants