Skip to content

feat(mcp-cli): add stdio tool gittensory_get_burden_forecast - #4324

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
e11734937-beep:feat/mcp-cli-burden-forecast-2230
Jul 8, 2026
Merged

feat(mcp-cli): add stdio tool gittensory_get_burden_forecast#4324
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
e11734937-beep:feat/mcp-cli-burden-forecast-2230

Conversation

@e11734937-beep

Copy link
Copy Markdown
Contributor

The hosted MCP server exposes gittensory_get_burden_forecast (src/mcp/server.ts) but the published stdio package (packages/gittensory-mcp/bin/gittensory-mcp.js) never registered it, so a locally-run gittensory-mcp cannot reach the cached maintainer burden forecast (projected review load, queue-growth risk, stale-PR signals, freshness marker).

What this does

  • Registers gittensory_get_burden_forecast in the stdio bin, proxying the existing public GET /v1/repos/:owner/:repo/intelligence route via apiGet and surfacing its burdenForecast + burdenForecastFreshness slice.
  • Matches the ownerRepo input handling of the sibling repo-scoped tools (gittensory_get_label_audit, same ${prefix}/intelligence source).
  • Adds a subprocess stdio test asserting the tool is listed and returns the proxied burden-forecast payload, backed by a fixture intelligence route in the shared harness.

Scope

Touches only the stdio bin and test/** (no src/** changes).

Closes #2230

Register gittensory_get_burden_forecast in the stdio bin, proxying the
public GET /v1/repos/:owner/:repo/intelligence route via apiGet and
surfacing the burdenForecast + burdenForecastFreshness slice. Mirrors the
sibling gittensory_get_label_audit tool. Adds a subprocess stdio test and
a fixture intelligence route. Bin + test only, no src changes.

Closes JSONbored#2230
@e11734937-beep
e11734937-beep requested a review from JSONbored as a code owner July 8, 2026 20:52
@superagent-security

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.94%. Comparing base (d329591) to head (ee29c71).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4324   +/-   ##
=======================================
  Coverage   93.94%   93.94%           
=======================================
  Files         397      397           
  Lines       36736    36736           
  Branches    13428    13428           
=======================================
  Hits        34511    34511           
  Misses       1569     1569           
  Partials      656      656           
🚀 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 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

Tip

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

✅ Gittensory review result - approve/merge recommended

Review updated: 2026-07-08 21:07:34 UTC

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

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This adds one new MCP stdio tool, gittensory_get_burden_forecast, that proxies the existing hosted GET /v1/repos/:owner/:repo/intelligence route and surfaces the burdenForecast/burdenForecastFreshness slice — it's a straight structural copy of the sibling gittensory_get_label_audit tool (same descriptor/registerTool/ownerRepoShape/apiGet pattern), which is the correct way to add this and keeps risk low. The change is scoped to the stdio bin plus test/** (no src/** touched), closes issue #2230 as required, and ships with a subprocess stdio test plus a harness fixture that verifies both tool registration and the exact proxied request/response shape. CI (including patch coverage) is green and I see no logic defect in the diff itself.

Nits — 5 non-blocking
  • packages/gittensory-mcp/bin/gittensory-mcp.js is already flagged as a long file (~717 lines) and this PR adds another 23 lines of repeated descriptor/registerTool boilerplate — worth a follow-up to table-drive these repo-scoped intelligence-slice tools (label audit, burden forecast, etc.) instead of hand-copying the block each time.
  • generatedAt: intelligence?.generatedAt has no fallback (unlike repoFullName), so a malformed/empty intelligence payload would surface undefined silently in the tool result — low risk given this mirrors the sibling tool, but worth a one-line comment or default if it's ever expected to be absent.
  • test/unit/mcp-cli-burden-forecast.test.ts only exercises the happy path (intelligence payload with burdenForecast present) — no case for burdenForecast/burdenForecastFreshness being null/absent from the API response, which the code explicitly falls back to `?? null` for.
  • Consider factoring the repeated {descriptor push + server.registerTool + prefix/apiGet/toolResult} pattern shared by gittensory_get_label_audit and gittensory_get_burden_forecast into a small helper, given the file is already past the long-file threshold.
  • Add a null-forecast test case in test/unit/mcp-cli-burden-forecast.test.ts to cover the `?? null` branches for burdenForecast/burdenForecastFreshness.
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: 78 registered-repo PR(s), 41 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor e11734937-beep; Gittensor profile; 78 PR(s), 0 issue(s).
Gate result ✅ Passing No configured blocker found.
Linked issue satisfaction

Addressed
The diff registers gittensory_get_burden_forecast in the stdio bin using the same ownerRepoShape pattern as sibling tools, proxies the intelligence endpoint via apiGet, and surfaces burdenForecast/burdenForecastFreshness, plus adds a subprocess stdio test that verifies both tool listing and the proxied payload contents.

Review context
  • Author: e11734937-beep
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 78 PR(s), 0 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 90da00d into JSONbored:main Jul 8, 2026
9 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_burden_forecast (proxy the hosted tool)

1 participant