Skip to content

feat(mcp-cli): add stdio gittensory_get_maintainer_noise proxy - #4232

Merged
loopover-orb[bot] merged 2 commits into
JSONbored:mainfrom
jsdevninja:feat/mcp-stdio-maintainer-noise
Jul 8, 2026
Merged

feat(mcp-cli): add stdio gittensory_get_maintainer_noise proxy#4232
loopover-orb[bot] merged 2 commits into
JSONbored:mainfrom
jsdevninja:feat/mcp-stdio-maintainer-noise

Conversation

@jsdevninja

Copy link
Copy Markdown
Contributor

Summary

  • Register gittensory_get_maintainer_noise in the local stdio MCP server, proxying GET /v1/repos/{owner}/{repo}/maintainer-noise via apiGet (same shape as gittensory_get_repo_context/intelligence).
  • Re-expose the maintainer-scoped maintainer-noise HTTP route (replacing the removed legacy public path) so the stdio proxy has a backing endpoint, mirroring gate-precision / outcome-calibration.
  • Wire the tool into STDIO_TOOL_DESCRIPTORS and add stdio, integration, and route unit tests (session allowlist + requireRepoMaintainer branches for Codecov patch coverage).

Closes #2228.

Scope

  • The PR title follows type(scope): short summary Conventional Commit format, for example fix(api): restore profile access checks.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked a currently open issue this PR resolves (e.g. Closes #123) — a linked open issue is required for every contributor PR.

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npm run test:coverage locally; codecov/patch requires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.
  • npm run test:workers
  • npm run build:mcp
  • npm run test:mcp-pack
  • npm run ui:openapi:check
  • npm run ui:lint
  • npm run ui:typecheck
  • npm run ui:build
  • npm audit --audit-level=moderate
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries

If any required check was skipped, explain why:

  • Ran focused tests: routes-maintainer-noise, mcp-cli-maintainer-noise, integration serves deterministic signal endpoints (covers new route), and npm run build:mcp. Remaining full-gate jobs left to CI.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests.
  • API/OpenAPI/MCP behavior is updated and tested where needed.
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks.
  • Visible UI changes include a UI Evidence section below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs.

UI Evidence

N/A — MCP/API change only; no visible UI.

Notes

jsdevninja and others added 2 commits July 8, 2026 11:12
Add unit tests for session allowlist and requireRepoMaintainer guard paths that integration tests miss when using the static API token.

Co-authored-by: Cursor <cursoragent@cursor.com>
@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:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 8, 2026
@jsdevninja
jsdevninja marked this pull request as ready for review July 8, 2026 16:32
@loopover-orb

loopover-orb Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Tip

🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

✅ Gittensory review result - approve/merge recommended

Review updated: 2026-07-08 16:36:52 UTC

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

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This PR adds a maintainer-only /v1/repos/:owner/:repo/maintainer-noise route backed by the existing loadMaintainerNoiseReport service, wires a matching stdio MCP tool (gittensory_get_maintainer_noise) into the local CLI proxying via apiGet, and re-adds the path to the session coarse-allowlist while gating the real authorization through requireRepoMaintainer. The pattern mirrors the existing gate-precision/outcome-calibration routes closely, and the route intentionally replaces a previously-removed legacy public (unauthenticated) endpoint with a maintainer-authenticated one, which the integration test correctly reflects by removing it from the legacy-404 list and adding explicit auth assertions. Test coverage looks solid: unauthenticated (401), owning maintainer (200), non-maintainer contributor despite allowlist match (403/401), and cross-repo maintainer isolation (403 forbidden_repo) are all exercised against the real requireRepoMaintainer logic rather than fabricated bypass states.

Nits — 5 non-blocking
  • src/api/routes.ts: canSessionAccessPath only gates the coarse session-token check via isRepoMaintainerNoisePath — worth a one-line comment (like the neighboring gate-precision case) noting that requireRepoMaintainer still enforces the real per-repo authorization, so a future reader doesn't mistake the allowlist entry for the full auth check.
  • packages/gittensory-mcp/bin/gittensory-mcp.js: confirm ownerRepoShape/toolResult/apiGet used here are the same shared helpers as gittensory_get_repo_context (they appear to be, given the diff mirrors that block, but worth a quick double-check since the file is large and only the changed hunks are shown).
  • test/unit/routes-maintainer-noise.test.ts: the 'forbids a contributor' test asserts `[401, 403]` rather than a single expected status — tightening this to the actual expected code would make the branch assertion more precise.
  • Consider adding a brief note in the PR description on why the legacy route was public before and is now maintainer-gated (data sensitivity), for future readers of the git history.
  • If there's an OpenAPI spec/registry for routes, confirm maintainer-noise is added there too (not visible in this diff) for parity with gate-precision.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #2228
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: 225 registered-repo PR(s), 138 merged, 39 issue(s).
Contributor context ✅ Confirmed Gittensor contributor jsdevninja; Gittensor profile; 225 PR(s), 39 issue(s).
Gate result ✅ Passing No configured blocker found.
Linked issue satisfaction

Addressed
The PR registers gittensory_get_maintainer_noise in the stdio server's STDIO_TOOL_DESCRIPTORS and adds a registerTool handler that proxies GET /v1/repos/{owner}/{repo}/maintainer-noise via apiGet, mirroring the gittensory_get_repo_context pattern, and includes subprocess stdio tests confirming the tool is listed and returns the proxied payload plus backing route/integration tests.

Review context
  • Author: jsdevninja
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: JavaScript, Swift, C, CSS, MDX, Python, Vue
  • Official Gittensor activity: 225 PR(s), 39 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.

🟩 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

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

Gittensory approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit 93e6afb into JSONbored:main Jul 8, 2026
7 checks passed
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.

feat(mcp-cli): add stdio tool gittensory_get_maintainer_noise (proxy the hosted tool)

1 participant