refactor(pull-requests): type granular MCP tools - #3397
Draft
SamMorrowDrums wants to merge 1 commit into
Draft
SamMorrowDrums wants to merge 1 commit into
SamMorrowDrums wants to merge 1 commit into
Conversation
Preserve exact legacy validation and response text while advertising concrete protocol-gated outputs for all granular PR mutations and both thread-resolution variants. Make the inherited overflow assertion architecture-independent. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
SamMorrowDrums
added this pull request to stack #3385
October 2, 2026 14:58
7 of 13 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrate all 13 granular pull request tools, including both resolve_review_thread feature variants, to concrete typed inputs and outputs. Modern 2026-07-28 clients receive output schemas and structuredContent; legacy and unknown protocols retain the exact original text without either.
Why
Stacked directly above #3396 to complete the granular PR surface without changing consolidated helpers or starting another layer. Parent verified before edits and after push:
sammorrowdrums-typed-pull-request-toolsat938c5c31b523a48ada472ca1b5a98fc15d487d3d.Fixes # — N/A; focused typed-output migration.
What changed
MCP impact
Concrete output schemas and structured content are exposed only on protocol 2026-07-28 and newer. Review mutations expose their actual success message; reference-returning mutations expose the same id/url payload as legacy text. Error results do not expose success-shaped structured content. Existing typed comment/review visibility tools are untouched.
Prompts tested (tool changes only)
go test ./pkg/github -run '^TestGranularPRDifferentialParentProbe$' -count=1passed; generated fixtures were removed afterward. Permanent parent-behavior expectations remain.Security / limits
Repo scope requirements, feature/GHES variants, destructive annotations and existing IFC/lockdown plumbing remain unchanged. No additional API fields are exposed; visibility tools and exported review helpers are unchanged. Full tests include inventory, IFC, scope and lockdown coverage.
Tool renaming
deprecated_tool_aliases.goNote: if you're renaming tools, you must add the tool aliases. For more information on how to do so, please refer to the official docs.
Lint & tests
./script/lint./script/testPassed:
UPDATE_TOOLSNAPS=true go test ./..., then in required orderscript/lint(0 issues),script/test(full race suite),script/generate-docs,git diff --check. Also passedgo test ./pkg/github -run '^TestTypedGranularIssueWireErrors$' -count=1and the exact-parent differential probe above. Initial lint findings were corrected before rerunning the full required sequence. No outstanding local failures. macOS was not available locally; CI must confirm the inherited assertion cleanup there. Live PAT-dependent e2e tests were not run.Head:
4db5f54f982aa7c99c73321e99892f07f5f6445b; base head:938c5c31b523a48ada472ca1b5a98fc15d487d3d. Commit includes the requested coauthor trailer; signing succeeded without fallback.Docs
Regenerated all documentation; only relevant granular PR parameter descriptions changed in docs/feature-flags.md. No unrelated generated drift included.