Skip to content

feat(mcp-cli): add gittensory_find_opportunities to the stdio surface - #2681

Closed
RenzoMXD wants to merge 1 commit into
JSONbored:mainfrom
RenzoMXD:feat/mcp-cli-find-opportunities-2309
Closed

feat(mcp-cli): add gittensory_find_opportunities to the stdio surface#2681
RenzoMXD wants to merge 1 commit into
JSONbored:mainfrom
RenzoMXD:feat/mcp-cli-find-opportunities-2309

Conversation

@RenzoMXD

@RenzoMXD RenzoMXD commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #2309.

What changed: Registered \gittensory_find_opportunities\ in \packages/gittensory-mcp/bin/gittensory-mcp.js\ proxying the cross-repo discovery HTTP endpoint via \�piPost, following the exact shape of the neighboring \gittensory_check_before_start\ registration. Added 4 stdio-proxy tests and extended the test fixture server with a /v1/opportunities/find\ endpoint.

Files changed:

  • \packages/gittensory-mcp/bin/gittensory-mcp.js\ — added \ indOpportunitiesShape\ and
    egisterTool\ call
  • \ est/unit/support/mcp-cli-harness.ts\ — added /v1/opportunities/find\ fixture endpoint
  • \ est/unit/mcp-cli-find-opportunities.test.ts\ — new test file (4 tests)

Validation:


  • px vitest run test/unit/mcp-cli-find-opportunities.test.ts\ — 4/4 pass

  • px tsc --noEmit\ — clean
  • \git diff --check\ — clean

Linked issue: Closes #2309

Register gittensory_find_opportunities in packages/gittensory-mcp/bin/gittensory-mcp.js
proxying the cross-repo discovery HTTP endpoint via apiPost, following the exact shape
of the neighboring gittensory_check_before_start registration. The CLI stays a thin,
versioned wrapper rather than reimplementing the ranking logic client-side.

Input shape mirrors the hosted tool's contract: targets/searchQuery/goalSpec/limit.
Strips undefined optional fields from the proxied body so the hosted API never sees
explicit-undefined placeholders.

Adds 4 stdio-proxy tests covering tool registration, POST shape, public-safe output,
and undefined-field stripping. Extends the test fixture server with a
/v1/opportunities/find endpoint that returns a ranked, public-safe candidate list.

Closes JSONbored#2309
@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.10%. Comparing base (d4aea8f) to head (50f64c2).
⚠️ Report is 14 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2681   +/-   ##
=======================================
  Coverage   96.10%   96.10%           
=======================================
  Files         237      237           
  Lines       26505    26505           
  Branches     9614     9614           
=======================================
  Hits        25472    25472           
  Misses        424      424           
  Partials      609      609           
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@loopover-orb

loopover-orb Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-03 05:19:35 UTC

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

⏸️ Suggested Action - Manual Review

Review summary
The change adds the MCP stdio discovery tool with a zod input shape, forwards sanitized optional fields to /v1/opportunities/find, and adds fixture-backed tests for registration, proxying, response content, and omitted optionals. The visible implementation follows the neighboring proxy pattern and does not introduce a reachable break in the provided changed files; the main gap is that tests exercise only a minimal request rather than the richer filter payload.

Nits — 5 non-blocking
  • test/unit/mcp-cli-find-opportunities.test.ts:106 is missing the trailing newline that the rest of the repository normally keeps.
  • test/unit/mcp-cli-find-opportunities.test.ts:63 only verifies searchQuery and limit forwarding, so targets and goalSpec could drift without this test catching it.
  • test/unit/support/mcp-cli-harness.ts:235 parses targets and searchQuery but does not use them in the fixture response, which keeps the fixture from validating those request paths.
  • Extend test/unit/mcp-cli-find-opportunities.test.ts:63 with a payload containing targets and goalSpec, then assert the captured POST body preserves those fields exactly.
  • Either make test/unit/support/mcp-cli-harness.ts:235 reflect targets/searchQuery in the fixture output or remove the unused parsing from the fixture to keep the test server behavior tighter.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #2309
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 (size label size:XS; 1 linked issue).
Validation posture ❌ 5/25 Preflight is holding this PR: the review lane is unavailable, so it is not ready for automated review.
Contributor workload ✅ 10/10 Author activity: 110 registered-repo PR(s), 61 merged, 7 issue(s).
Contributor context ✅ Confirmed Gittensor contributor RenzoMXD; Gittensor profile; 110 PR(s), 7 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: RenzoMXD
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local Gittensory cache.
  • Public profile languages: not available
  • Official Gittensor activity: 110 PR(s), 7 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Await review-lane availability.
  • Refresh registry data or choose a registered active repo.
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.

🟩 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 Gittensory, a quiet PR intelligence layer for OSS maintainers.

  • Re-run Gittensory review

@JSONbored JSONbored left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge conflicts + review mentions weak testing coverage.

@JSONbored JSONbored closed this Jul 3, 2026
@RenzoMXD
RenzoMXD deleted the feat/mcp-cli-find-opportunities-2309 branch July 3, 2026 06:18
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.

Development

Successfully merging this pull request may close these issues.

feat(mcp-cli): add gittensory_find_opportunities to the packages/gittensory-mcp stdio surface

2 participants