Skip to content

feat(mcp): expose maintainer queue-noise triage via gittensory_get_maintainer_noise - #1414

Merged
JSONbored merged 5 commits into
JSONbored:mainfrom
oktofeesh1:feat/maintainer-noise-mcp
Jun 26, 2026
Merged

feat(mcp): expose maintainer queue-noise triage via gittensory_get_maintainer_noise#1414
JSONbored merged 5 commits into
JSONbored:mainfrom
oktofeesh1:feat/maintainer-noise-mcp

Conversation

@oktofeesh1

@oktofeesh1 oktofeesh1 commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Summary

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 — and returns a score, level, noiseSources, and recommended maintainerActions. It already powers the @gittensory noise-report PR command 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, and from the decision-pack/miner-dashboard, which are contributor-scoped).

This adds gittensory_get_maintainer_noise (maintainer-authenticated via the existing requireRepoAccess, advisory only), mirroring the merged 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. Output flows through the existing redactSensitiveForMcp wrapper.

No linked issue: small, self-evident additive MCP surface over a live builder — same shape and scope as the merged gittensory_get_outcome_calibration (#1174). No new REST route (the per-builder REST routes were deliberately consolidated away), no migration, no auth-policy change.

Scope

  • The PR title follows type(scope): short summary Conventional Commit format.
  • 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 an issue, or this is small enough that the summary explains why an issue is not needed.

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npm run test:coveragecodecov/patch: every changed line and branch in src/services/maintainer-noise.ts and the new src/mcp/server.ts lines is covered (verified via lcov).
  • 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 (0 vulnerabilities)
  • New behavior has unit + integration tests: service unit test (test/unit/maintainer-noise.test.ts, incl. clean-queue + noisy-queue + sanitizer boundary), the MCP call-test in test/unit/mcp-output-schemas.test.ts, and the tool-list assertion in test/integration/api.test.ts.

Safety

  • No secrets, wallets, hotkeys, raw trust scores, private rankings, or private maintainer evidence are exposed — output is the same public-safe report the @gittensory noise-report command already posts, routed through redactSensitiveForMcp; a test asserts no wallet/hotkey/payout/reward/trust score terms leak.
  • Public text stays sanitized and low-noise; no compensation/optimization implications.
  • No auth/cookie/CORS/session changes — the tool reuses the existing requireRepoAccess maintainer guard (no new auth surface).
  • MCP behavior is updated and tested (new tool + output schema + call-test).
  • No UI changes.
  • No docs/changelog changes needed.

Notes

Mirrors the merged gittensory_get_outcome_calibration (#1174) pattern exactly: service + tool + output schema + output-schema test + integration assertion. MCP-tool-only (no REST route), so it does not touch the deliberately-consolidated /v1/contributors/:login/* surface.

…intainer_noise

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 (JSONbored#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>
@oktofeesh1
oktofeesh1 requested a review from JSONbored as a code owner June 26, 2026 03:45
@dosubot dosubot Bot added the size:M label Jun 26, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.44%. Comparing base (372acb6) to head (0ce78d8).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1414   +/-   ##
=======================================
  Coverage   95.43%   95.44%           
=======================================
  Files         193      194    +1     
  Lines       21043    21053   +10     
  Branches     7618     7618           
=======================================
+ Hits        20083    20093   +10     
  Misses        383      383           
  Partials      577      577           
Files with missing lines Coverage Δ
src/mcp/server.ts 95.61% <100.00%> (+0.04%) ⬆️
src/services/maintainer-noise.ts 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JSONbored JSONbored added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jun 26, 2026

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

Screen: ✅ low-risk, on-thesis. It wraps an existing builder already shipping via the @gittensory noise-report command — near-zero new maintenance surface, on the maintainer-agent MCP thesis. Verdict: MERGE — after stripping the "🤖 Generated with Claude Code" line from the PR body (House Rule §5) · gittensor:feature.

@dosubot dosubot Bot added the lgtm label Jun 26, 2026
@JSONbored
JSONbored merged commit e89c749 into JSONbored:main Jun 26, 2026
15 checks passed
@github-actions github-actions Bot mentioned this pull request Jun 26, 2026
12 tasks
oktofeesh1 added a commit to oktofeesh1/loopover-oktofeesh1 that referenced this pull request Jun 26, 2026
…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>
oktofeesh1 added a commit to oktofeesh1/loopover-oktofeesh1 that referenced this pull request Jun 26, 2026
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>
JSONbored added a commit that referenced this pull request Jun 27, 2026
…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>
JSONbored added a commit that referenced this pull request Jun 27, 2026
…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>
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.

2 participants