Skip to content

feat(mcp): add a loopover_get_maintainer_lane CLI mirror#6942

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
jeffrey701:feat-mcp-maintainer-lane-cli-6739-v2
Jul 17, 2026
Merged

feat(mcp): add a loopover_get_maintainer_lane CLI mirror#6942
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
jeffrey701:feat-mcp-maintainer-lane-cli-6739-v2

Conversation

@jeffrey701

Copy link
Copy Markdown
Contributor

Closes #6739

Problem

The MCP tool loopover_get_maintainer_lane (src/mcp/server.ts:1863) returns data that already ships as the .maintainerLane field of GET /v1/repos/:owner/:repo/intelligence. The CLI already proxies that exact same endpoint for its sibling fields — loopover_get_label_audit picks out .labelAudit, loopover_get_burden_forecast picks out its own — but maintainerLane, which sits right beside them in the same buildRepoIntelligenceResponse payload, had no CLI extraction.

Fix

Add registerStdioTool("loopover_get_maintainer_lane", { inputSchema: ownerRepoShape }, ...), copying loopover_get_label_audit's implementation exactly and returning { repoFullName, generatedAt, maintainerLane: intelligence?.maintainerLane ?? null }, plus its registry entry (category: "maintainer") so stdioToolDescription resolves. No new route and no new fetch shape — it reuses the GET the sibling tools already make.

Tests

New test/unit/mcp-cli-maintainer-lane.test.ts (mirrors mcp-cli-label-audit.test.ts):

  1. the tool is registered in the stdio server's tool list;
  2. it proxies owner/repo to /v1/repos/:owner/:repo/intelligence via apiGet and returns the maintainer lane (public-safety regex asserted, as the sibling does);
  3. parity with the mirrored surface — it hits the same /intelligence route loopover_get_label_audit uses, agrees with it on repoFullName/generatedAt for identical input, and each tool surfaces only its own slice (maintainerLane vs labelAudit).

mcp-tool-rename-aliases.test.ts's two exact tool-count assertions are updated 70 → 71 (the count is asserted against both the live server and loopover-mcp tools --json).

Validation

  • npx vitest run test/unit/mcp-cli-maintainer-lane.test.ts test/unit/mcp-tool-rename-aliases.test.ts test/unit/mcp-cli-label-audit.test.ts15/15 pass
  • Full MCP net (test/unit/mcp-*.test.ts) → zero net-new failures vs the pristine baseline (the failing set is byte-identical; those are Windows-only npm-registry/telemetry/file-mode cases).
  • npm run typecheckclean (0 errors); npm run build:mcp passes; npm run command-reference:check passes.
  • Rebased on current main (363a8b5) so the new tool sits alongside the freshly-merged loopover_intake_idea / loopover_simulate_open_pr_pressure / loopover_build_results_payload mirrors.
  • Scope: 1 source file + 1 new test + 1 count update.

@jeffrey701
jeffrey701 requested a review from JSONbored as a code owner July 17, 2026 14:43
@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 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.71%. Comparing base (97fe9c7) to head (ce88435).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6942   +/-   ##
=======================================
  Coverage   93.71%   93.71%           
=======================================
  Files         685      685           
  Lines       68358    68358           
  Branches    18726    18726           
=======================================
  Hits        64059    64059           
  Misses       3302     3302           
  Partials      997      997           
Flag Coverage Δ
shard-1 43.66% <ø> (-0.03%) ⬇️
shard-2 36.92% <ø> (+0.08%) ⬆️
shard-3 32.76% <ø> (ø)
shard-4 34.84% <ø> (-0.01%) ⬇️
shard-5 31.32% <ø> (-0.01%) ⬇️
shard-6 45.75% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 17, 2026
@loopover-orb

loopover-orb Bot commented Jul 17, 2026

Copy link
Copy Markdown

Tip

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-17 14:54:33 UTC

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

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This PR adds a thin CLI mirror for the loopover_get_maintainer_lane MCP tool, extracting the maintainerLane field from the same /intelligence endpoint the sibling loopover_get_label_audit already GETs, exactly matching the pattern description. The registry entry, description, and implementation are structurally consistent with the neighboring tool it copies, and the tool-count assertions are correctly bumped 70→71 in the affected test file. The new test file appropriately verifies registration, correct proxying, and parity with the sibling tool (same route, same repoFullName/generatedAt, disjoint field surfaces).

Nits — 4 non-blocking
  • packages/loopover-mcp/bin/loopover-mcp.js: the new tool registration doesn't destructure/validate `generatedAt` fallback the way `maintainerLane` gets a `?? null` default — if `intelligence` is null, `generatedAt` will be `undefined` rather than a consistent null, unlike the explicit `?? null` pattern used elsewhere; verify this matches the sibling tool's behavior.
  • test/unit/mcp-cli-maintainer-lane.test.ts: the test file omits a `loopover-mcp tools --json` description-listing test that mcp-cli-maintainer-noise.test.ts includes for its sibling tool — consider adding one for full parity with existing conventions.
  • packages/loopover-mcp/bin/loopover-mcp.js: confirm `generatedAt` handling is intentional and consistent with other CLI mirror tools (e.g. loopover_get_label_audit) rather than an oversight.
  • test/unit/mcp-cli-maintainer-lane.test.ts: add a `tools --json` description-match assertion mirroring mcp-cli-maintainer-noise.test.ts for full test-suite consistency.

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 #6739
Related work ⚠️ 3 scoped overlaps Top overlaps are listed below; lower-confidence bulk is hidden.
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: 134 registered-repo PR(s), 64 merged, 32 issue(s).
Contributor context ✅ Confirmed Gittensor contributor jeffrey701; Gittensor profile; 134 PR(s), 32 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: minor
Linked issue satisfaction

Addressed
The PR adds registerStdioTool("loopover_get_maintainer_lane", ...) with the exact requested inputSchema and return shape, copying the loopover_get_label_audit pattern and GETting the intelligence endpoint, plus updates tool-count assertions and adds a parity unit test comparing the two mirrored tools.

Review context
  • Author: jeffrey701
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: TypeScript, Clojure, JavaScript, Rust
  • Official Gittensor activity: 134 PR(s), 32 issue(s).
  • Related work: Titles/paths share 5 meaningful terms. (PR #6941)
  • Related work: Titles/paths share 8 meaningful terms. (issue #6735, issue #6737)
  • Related work: Titles/paths share 8 meaningful terms. (issue #6735, issue #6736)
  • Additional title-only matches omitted; title-only overlap does not block.
Contributor next steps
  • Start here: Review top overlaps.
  • Then work through the remaining 2 steps 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

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 71bc183 into JSONbored:main Jul 17, 2026
16 checks passed
loopover-orb Bot pushed a commit that referenced this pull request Jul 17, 2026
Add POST /v1/loop/plan-idea-claims and an in-process stdio tool that both
reproduce the MCP handler (validate → task-graph → buildClaimPlan).
Bump the MCP discovery pin 71→73 (#6942 left the count one behind).

Closes #6756

Co-authored-by: Cursor <cursoragent@cursor.com>
lourincedaging0-commits added a commit to lourincedaging0-commits/gittensory that referenced this pull request Jul 17, 2026
The loopover_pr_outcome MCP tool (src/mcp/server.ts) returns a contributor's own
merged-PR outcome history, self-scoped via requireContributorAccess, but had no
REST route or CLI mirror despite fitting the existing /v1/contributors/:login/...
route family.

Add GET /v1/contributors/:login/pr-outcomes (self-scoped, ?limit=N mirroring the
tool's 1..100 bound) and register the loopover_pr_outcome CLI stdio tool. Both, and
the existing MCP tool, now delegate to one shared buildContributorPrOutcomes builder
in src/signals/ (mirroring the buildContributorOpenPrMonitor sibling), so all three
surfaces return one byte-identical payload and can never drift.

Reconcile the stdio tool-count invariant to the true live count of 73: the base was
71, JSONbored#6942's get_maintainer_lane mirror brought it to 72 without updating the
invariant (leaving main red on validate-tests), and this tool takes it to 73.

Tests: routes-pr-outcomes (self-scoping, operator override, ?limit validation,
empty-history, no wallet/hotkey/reward leakage) and mcp-cli-pr-outcome-tool (stdio
registration, route-proxy payload parity, limit forwarding), plus the shared
mcp-cli-harness fixture route.
lourincedaging0-commits added a commit to lourincedaging0-commits/gittensory that referenced this pull request Jul 17, 2026
The loopover_pr_outcome MCP tool (src/mcp/server.ts) returns a contributor's own
merged-PR outcome history, self-scoped via requireContributorAccess, but had no
REST route or CLI mirror despite fitting the existing /v1/contributors/:login/...
route family.

Add GET /v1/contributors/:login/pr-outcomes (self-scoped, ?limit=N mirroring the
tool's 1..100 bound) and register the loopover_pr_outcome CLI stdio tool. Both, and
the existing MCP tool, now delegate to one shared buildContributorPrOutcomes builder
in src/signals/ (mirroring the buildContributorOpenPrMonitor sibling), so all three
surfaces return one byte-identical payload and can never drift.

Reconcile the stdio tool-count invariant to the true live count of 73: the base was
71, JSONbored#6942's get_maintainer_lane mirror brought it to 72 without updating the
invariant (leaving main red on validate-tests), and this tool takes it to 73.

Tests: routes-pr-outcomes (self-scoping, operator override, ?limit validation,
empty-history, no wallet/hotkey/reward leakage) and mcp-cli-pr-outcome-tool (stdio
registration, route-proxy payload parity, limit forwarding), plus the shared
mcp-cli-harness fixture route.
lourincedaging0-commits added a commit to lourincedaging0-commits/gittensory that referenced this pull request Jul 17, 2026
The loopover_pr_outcome MCP tool (src/mcp/server.ts) returns a contributor's own
merged-PR outcome history, self-scoped via requireContributorAccess, but had no
REST route or CLI mirror despite fitting the existing /v1/contributors/:login/...
route family.

Add GET /v1/contributors/:login/pr-outcomes (self-scoped, ?limit=N mirroring the
tool's 1..100 bound) and register the loopover_pr_outcome CLI stdio tool. Both, and
the existing MCP tool, now delegate to one shared buildContributorPrOutcomes builder
in src/signals/ (mirroring the buildContributorOpenPrMonitor sibling), so all three
surfaces return one byte-identical payload and can never drift.

Reconcile the stdio tool-count invariant to the true live count of 73: the base was
71, JSONbored#6942's get_maintainer_lane mirror brought it to 72 without updating the
invariant (leaving main red on validate-tests), and this tool takes it to 73.

Tests: routes-pr-outcomes (self-scoping, operator override, ?limit validation,
empty-history, no wallet/hotkey/reward leakage) and mcp-cli-pr-outcome-tool (stdio
registration, route-proxy payload parity, limit forwarding), plus the shared
mcp-cli-harness fixture route.
@github-actions github-actions Bot mentioned this pull request Jul 17, 2026
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI mirror for loopover_get_maintainer_lane

1 participant