feat(mcp): expose outcome calibration via gittensory_get_outcome_calibration - #1174
Conversation
…bration Wire the slop-band and recommendation outcome calibration service into MCP so maintainers can inspect predictive accuracy without a separate HTTP call. Includes structured output schema validation tests. Co-authored-by: Cursor <cursoragent@cursor.com>
Use optional chaining on the slop calibration slice so the MCP tool returns a safe fallback summary instead of throwing on sparse reports. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1174 +/- ##
=======================================
Coverage 94.85% 94.86%
=======================================
Files 156 156
Lines 18909 18920 +11
Branches 6848 6850 +2
=======================================
+ Hits 17937 17948 +11
Misses 387 387
Partials 585 585 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review — safe to merge
✅ Approved — safe to merge Review summary Nits (5)
Review context
Contributor next steps
Signal definitions
Review detailsGenerated from public PR metadata and the diff. Advisory only; deterministic signals remain authoritative. The change adds a new MCP tool `gittensory_get_outcome_calibration` that returns slop‑band calibration data for a repository. It introduces input and output Zod schemas, registers the tool, and implements a private handler that builds the report and crafts a human‑readable summary. The implementation compiles and integrates with existing tooling, and tests are added to verify schema compliance and basic functionality. Nits (5)
🟩 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.
|
…intainer_noise (#1414) The deterministic maintainer-noise report (`buildMaintainerNoiseReport`, src/signals/reward-risk.ts) ranks which queue-noise sources a maintainer should clear first — open PRs without linked-issue context, broad/churn-style diffs, duplicate clusters, and contributor-intake pressure — with a score, level, and recommended maintainer actions. It already powers the `@gittensory noise-report` PR command but had no MCP surface, so agents/CLI couldn't pull it. Add `gittensory_get_maintainer_noise` (maintainer-authenticated, advisory only), mirroring the outcome-calibration serving (#1174): a thin load-or-compute service (`src/services/maintainer-noise.ts`) that loads the repo's cached signals and runs the existing builder, plus the MCP tool registration + output schema + method. No new REST route, no migration, no auth-policy change — purely additive to the MCP surface. Output flows through the existing `redactSensitiveForMcp` wrapper. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: ghost <49853598+JSONbored@users.noreply.github.com>
…r_lane The deterministic maintainer-lane report (`buildMaintainerLaneReport`, src/signals/engine.ts) synthesizes a repo's lane recommendation alongside the configured maintainer cut, queue health, config quality, and contributor-intake health — the maintainer's own-lane triage view. It already powers the repo-intelligence response but had no MCP surface, so agents/CLI couldn't pull it (it is also absent from gittensory_get_repo_context). Add `gittensory_get_maintainer_lane` (maintainer-authenticated via the existing requireRepoAccess, advisory only), mirroring the merged maintainer-noise / outcome-calibration serving (JSONbored#1414 / JSONbored#1174): a thin load-or-compute service (src/services/maintainer-lane.ts) that loads the repo's cached signals + collision report and runs the existing builder, plus the MCP tool registration + output schema + method. Output flows through the existing redactSensitiveForMcp wrapper. No new REST route, no migration, no auth-policy change — purely additive to the MCP surface. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The deterministic label audit (`buildLabelAudit`, src/signals/engine.ts) reports whether a repo's configured (.gittensory.yml / dashboard) label set matches the live GitHub labels and is trustworthy for label-multiplier scoring — surfacing missing configured labels, suspicious status/source-style labels, and the overall trusted-label-pipeline readiness. It already powers the repo-intelligence response but had no MCP surface, so agents/CLI couldn't pull it (it is also absent from gittensory_get_repo_context, which exposes a different subset). Add `gittensory_get_label_audit` (maintainer-authenticated via the existing requireRepoAccess, advisory only), mirroring the merged maintainer-noise (JSONbored#1414) and outcome-calibration (JSONbored#1174) serving: a thin load-or-compute service (src/services/label-audit.ts) that loads the repo's labels + cached signals and runs the existing builder, plus the MCP tool registration + output schema + method. Output flows through the existing redactSensitiveForMcp wrapper. No new REST route, no migration, no auth-policy change — purely additive to the MCP surface. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…r_lane (#1456) The deterministic maintainer-lane report (`buildMaintainerLaneReport`, src/signals/engine.ts) synthesizes a repo's lane recommendation alongside the configured maintainer cut, queue health, config quality, and contributor-intake health — the maintainer's own-lane triage view. It already powers the repo-intelligence response but had no MCP surface, so agents/CLI couldn't pull it (it is also absent from gittensory_get_repo_context). Add `gittensory_get_maintainer_lane` (maintainer-authenticated via the existing requireRepoAccess, advisory only), mirroring the merged maintainer-noise / outcome-calibration serving (#1414 / #1174): a thin load-or-compute service (src/services/maintainer-lane.ts) that loads the repo's cached signals + collision report and runs the existing builder, plus the MCP tool registration + output schema + method. Output flows through the existing redactSensitiveForMcp wrapper. No new REST route, no migration, no auth-policy change — purely additive to the MCP surface. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: ghost <49853598+JSONbored@users.noreply.github.com>
…dit (#1461) The deterministic label audit (`buildLabelAudit`, src/signals/engine.ts) reports whether a repo's configured (.gittensory.yml / dashboard) label set matches the live GitHub labels and is trustworthy for label-multiplier scoring — surfacing missing configured labels, suspicious status/source-style labels, and the overall trusted-label-pipeline readiness. It already powers the repo-intelligence response but had no MCP surface, so agents/CLI couldn't pull it (it is also absent from gittensory_get_repo_context, which exposes a different subset). Add `gittensory_get_label_audit` (maintainer-authenticated via the existing requireRepoAccess, advisory only), mirroring the merged maintainer-noise (#1414) and outcome-calibration (#1174) serving: a thin load-or-compute service (src/services/label-audit.ts) that loads the repo's labels + cached signals and runs the existing builder, plus the MCP tool registration + output schema + method. Output flows through the existing redactSensitiveForMcp wrapper. No new REST route, no migration, no auth-policy change — purely additive to the MCP surface. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: ghost <49853598+JSONbored@users.noreply.github.com>
Summary
gittensory_get_outcome_calibrationMCP tool (replaces closed feat(mcp): expose outcome calibration via gittensory_get_outcome_calibration #1171)Test plan
Supersedes #1171 — addresses AI reviewer null-safety feedback.