Skip to content

feat(mcp-cli): register gittensory_get_burden_forecast stdio proxy tool - #4229

Closed
reyanthony062001-ops wants to merge 1 commit into
JSONbored:mainfrom
reyanthony062001-ops:feat/mcp-cli-burden-forecast-proxy
Closed

feat(mcp-cli): register gittensory_get_burden_forecast stdio proxy tool#4229
reyanthony062001-ops wants to merge 1 commit into
JSONbored:mainfrom
reyanthony062001-ops:feat/mcp-cli-burden-forecast-proxy

Conversation

@reyanthony062001-ops

Copy link
Copy Markdown
Contributor

What

The hosted MCP server registers gittensory_get_burden_forecast (src/mcp/server.ts), but the stdio package (packages/gittensory-mcp/bin/gittensory-mcp.js) never registered it, so a maintainer running the local stdio server could not pull the cached burden forecast (projected review load, queue-growth risk, stale-PR signals). The maintainer-triage agent profile in the stdio bin already lists the tool under recommendedTools, so registering it also reconciles that dangling reference.

There is no dedicated GET route for the forecast: the API serves it as the burdenForecast / burdenForecastFreshness slice of GET /v1/repos/:owner/:repo/intelligence (buildRepoIntelligenceResponse in src/api/routes.ts). The new stdio tool therefore proxies that endpoint via apiGet with the standard ownerRepo input handling, returns the forecast slice with its freshness marker, and mirrors the hosted tool's not_found contract when no forecast is cached.

The tool is wired through STDIO_TOOL_DESCRIPTORS (#2233) so registration and the gittensory-mcp tools inventory stay in sync.

Deliverables

  • Register gittensory_get_burden_forecast in packages/gittensory-mcp/bin/gittensory-mcp.js proxying the burden-forecast data via apiGet (served on the repo intelligence endpoint - no dedicated burden-forecast GET route exists).
  • ownerRepo input handling matching existing repo-scoped tools (gittensory_get_repo_context).
  • Subprocess stdio test for listing + payload, plus the not_found branch, against dedicated acme/* fixture repos so the shared owner/repo intelligence fixture stays free for sibling tools.

Validation

Closes #2230

@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

⚠️ JUnit XML file not found

The CLI was unable to find any JUnit XML files to upload.
For more help, visit our troubleshooting guide.

@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
@loopover-orb

loopover-orb Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Caution

🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥

🛑 Gittensory review result - fixes required

Review updated: 2026-07-08 18:59:12 UTC

3 files · 1 AI reviewer · no blockers · readiness 100/100 · CI failing · blocked

🛑 Suggested Action - Fix Blockers

Review summary
This PR adds a stdio-side proxy for the burden-forecast tool, mirroring the hosted MCP tool by pulling the burdenForecast/burdenForecastFreshness slice off the existing GET /v1/repos/:owner/:repo/intelligence endpoint (no dedicated route exists, which the PR correctly documents). The implementation follows the established ownerRepo pattern used by gittensory_get_repo_context, correctly short-circuits to the not_found contract when burdenForecast is absent, and the added tests exercise both branches against dedicated acme/widgets and acme/quiet fixtures rather than reusing the shared owner/repo fixture. This closes issue #2230 as required and CI is fully green.

Nits — 5 non-blocking
  • packages/gittensory-mcp/bin/gittensory-mcp.js: the burdenForecastFreshness lookup uses intelligence.burdenForecastFreshness?.freshness ?? "unknown" — worth confirming the hosted tool (src/mcp/server.ts) formats the freshness label identically so the two surfaces stay in parity.
  • The stdio bin file is now ~546 lines (flagged by the size check against a 400-line threshold); consider whether tool registrations belong in a separate module as more proxies get added, though this is not blocking for this PR.
  • test/unit/mcp-cli-burden-forecast.test.ts: the FORBIDDEN_PUBLIC_TERMS regex is duplicated inline rather than imported from a shared test util — worth checking if mcp-cli-harness.ts already exports one to avoid drift across future tool tests.
  • Consider extracting the FORBIDDEN_PUBLIC_TERMS regex used across mcp-cli-*.test.ts files into test/unit/support/mcp-cli-harness.ts if it isn't already shared, so future tool tests don't hand-roll it.
  • If more repo-intelligence-slice tools get proxied this way (beyond burden forecast and repo context), consider a small helper to reduce the apiGet + optional-chaining boilerplate repeated per tool.

CI checks failing

  • validate
  • validate-code
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #2230
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: 0 registered-repo PR(s), 0 merged, 0 issue(s).
Contributor context ❌ No public Gittensor match reyanthony062001-ops; not a blocker.
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: reyanthony062001-ops
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: HTML, Python
  • Contributor context: Public profile only; not a blocker.
  • 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 added the manual-review Gittensor contributor context label Jul 8, 2026
@reyanthony062001-ops
reyanthony062001-ops force-pushed the feat/mcp-cli-burden-forecast-proxy branch from e41ddd8 to 9adecdb Compare July 8, 2026 16:40
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

The hosted MCP server registers gittensory_get_burden_forecast
(src/mcp/server.ts), but the stdio package never did, so a maintainer
running the local stdio server cannot pull the cached burden forecast
(projected review load, queue-growth risk, stale-PR signals). The
maintainer-triage agent profile in the stdio bin already lists the tool
under recommendedTools, so registering it also reconciles that dangling
reference.

There is no dedicated GET route for the forecast: the API serves it as
the burdenForecast / burdenForecastFreshness slice of
/v1/repos/:owner/:repo/intelligence (buildRepoIntelligenceResponse in
src/api/routes.ts). The new stdio tool therefore proxies that endpoint
via apiGet with the standard ownerRepo input handling, returns the
forecast slice with its freshness marker, and mirrors the hosted tool's
not_found contract when no forecast is cached.

The tool is wired through STDIO_TOOL_DESCRIPTORS so registration and
the tools inventory stay in sync, and covered by a subprocess stdio
test (tool listing, proxied payload, and the not_found branch) against
dedicated fixture repos so the shared owner/repo intelligence fixture
stays free for sibling tools.

Closes JSONbored#2230
@loopover-orb

loopover-orb Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Gittensory is closing this pull request on the maintainer's behalf (CI is failing (validate, validate-code)). 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.

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. manual-review Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant