feat(mcp): add loopover_file_incident_report write tool - #9365
Conversation
Mirror POST /v1/repos/:owner/:repo/pulls/:number/incident-reports over the
MCP surface so a maintainer-authenticated client can file a post-merge
incident report on a harmful rented-loop PR, closing the write-side gap next
to the already-wrapped maintainer-packet/reviewability read tools.
The handler replays the REST route exactly: maintainer-manage auth, the
PR-must-exist-and-be-merged validation, then recordPostMergeIncidentReport
with reporterKind "customer" and the calling actor, returning the same
{ ok, repoFullName, pullNumber, ...report } shape. The input body fields
(description/severity/mergedSha) are declared inline rather than spread from
routes.ts's postMergeIncidentReportSchema.shape, because routes.ts imports the
MCP server module before that schema is defined -- dereferencing .shape at
module-init would hit the circular-import temporal dead zone.
|
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 #9365 +/- ##
==========================================
+ Coverage 75.38% 75.83% +0.44%
==========================================
Files 275 276 +1
Lines 58023 59244 +1221
Branches 6181 6421 +240
==========================================
+ Hits 43739 44925 +1186
- Misses 14014 14027 +13
- Partials 270 292 +22
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-27 14:39:26 UTC
Review summary Nits — 4 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionPartially addressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 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 LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
feat(mcp): add loopover_file_incident_report write tool
Mirror POST /v1/repos/:owner/:repo/pulls/:number/incident-reports over the
MCP surface so a maintainer-authenticated client can file a post-merge
incident report on a harmful rented-loop PR, closing the write-side gap next
to the already-wrapped maintainer-packet/reviewability read tools.
The handler replays the REST route exactly: maintainer-manage auth, the
PR-must-exist-and-be-merged validation, then recordPostMergeIncidentReport
with reporterKind "customer" and the calling actor, returning the same
{ ok, repoFullName, pullNumber, ...report } shape. The input body fields
(description/severity/mergedSha) are declared inline rather than spread from
routes.ts's postMergeIncidentReportSchema.shape, because routes.ts imports the
MCP server module before that schema is defined -- dereferencing .shape at
module-init would hit the circular-import temporal dead zone.
Closes #9298
Validation
Verified locally on this branch before opening:
npm run typechecknpx turbo run build:tsc build:verifynpm run test:coverage— patch coverage 100.0% of changed lines