feat(comments): add typed visibility tool inputs and outputs - #3384
Open
SamMorrowDrums wants to merge 5 commits into
Open
SamMorrowDrums wants to merge 5 commits into
SamMorrowDrums wants to merge 5 commits into
Conversation
SamMorrowDrums
added this pull request to stack #3385
October 2, 2026 10:03
SamMorrowDrums
marked this pull request as ready for review
October 2, 2026 10:05
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The typed migration preserves existing contracts and is comprehensively covered across supported protocol versions and failure paths.
Review effort: Balanced
Findings: None
What changed in this PR
Migrates six comment-visibility tools to typed inputs and outputs while preserving legacy behavior and protocol-gating structured results.
Changes:
- Adds typed visibility inputs, output schemas, and normalized legacy arguments.
- Preserves feature, scope, read-only, and error behavior.
- Adds comprehensive protocol and behavior tests with updated snapshots.
| File | Description |
|---|---|
pkg/github/comment_minimize.go |
Implements typed visibility tools and normalization. |
pkg/github/comment_minimize_test.go |
Tests schemas, protocols, gates, and errors. |
pkg/github/__toolsnaps__/hide_issue_comment.snap |
Adds hide output schema. |
pkg/github/__toolsnaps__/unhide_issue_comment.snap |
Adds unhide output schema. |
pkg/github/__toolsnaps__/hide_pull_request_review_comment.snap |
Adds hide output schema. |
pkg/github/__toolsnaps__/unhide_pull_request_review_comment.snap |
Adds unhide output schema. |
pkg/github/__toolsnaps__/hide_pull_request_review.snap |
Adds hide output schema. |
pkg/github/__toolsnaps__/unhide_pull_request_review.snap |
Adds unhide output schema. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
SamMorrowDrums
force-pushed
the
sammorrowdrums-typed-comment-visibility-tools
branch
from
October 2, 2026 10:18
65bbe67 to
9c35bd3
Compare
SamMorrowDrums
force-pushed
the
sammorrowdrums-typed-comment-visibility-tools
branch
from
October 2, 2026 10:24
9c35bd3 to
a4e5b24
Compare
SamMorrowDrums
force-pushed
the
sammorrowdrums-typed-comment-visibility-tools
branch
from
October 2, 2026 10:37
a4e5b24 to
d593079
Compare
SamMorrowDrums
force-pushed
the
sammorrowdrums-typed-comment-visibility-tools
branch
from
October 2, 2026 10:59
0f312ad to
43f5bcb
Compare
SamMorrowDrums
force-pushed
the
sammorrowdrums-typed-comment-visibility-tools
branch
2 times, most recently
from
October 2, 2026 20:50
603c895 to
7e9c697
Compare
Contributor
|
SamMorrowDrums
force-pushed
the
sammorrowdrums-typed-comment-visibility-tools
branch
from
October 3, 2026 07:25
a9fa559 to
28a1816
Compare
SamMorrowDrums
force-pushed
the
sammorrowdrums-typed-comment-visibility-tools
branch
from
October 3, 2026 12:33
28a1816 to
0da1567
Compare
Preserve legacy argument normalization and text responses while exposing protocol-gated structured results for six hide/unhide tools. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Auto-generated by license-check workflow
Auto-generated by license-check workflow
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Clarify supported negotiated protocol versions without expanding runtime support. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
SamMorrowDrums
force-pushed
the
sammorrowdrums-typed-comment-visibility-tools
branch
from
October 3, 2026 12:59
0da1567 to
6ebfc8d
Compare
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 the shared hide/unhide comment-visibility factory to typed inputs and results for all six issue-comment, pull-request review-comment, and review tools. Supported negotiated MCP protocol 2026-07-28+ receives output schemas and structured results with matching JSON text; unknown protocol versions are treated as legacy, preserving exact legacy text.
Why
Dependent layer above #3377, using the typed registration and legacy normalization foundation from #3371. No issue is closed by this layer; #3360 remains unchanged and open.
What changed
inventory.CachedSchemaFor.MCP impact
Output schemas and typed structured content are added for supported modern clients. Unknown versions remain legacy; runtime support for unrecognized future versions is not expanded. Input schemas and legacy success text remain unchanged; errors never become structured success outputs.
Prompts tested (tool changes only)
Security / limits
Existing repo scope requirements, granular feature flags, read-only filtering, permission descriptions, and API calls are preserved. The concrete result contains only node ID and visibility fields; invalid inputs and failed mutations never yield successful structured output.
Tool renaming
deprecated_tool_aliases.goAll six tool names are unchanged.
Note: 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/testOn local committed HEAD
0da1567de7d56f4e8e5ae51a5c473a31f34b2888, rebased linearly onto contexte493a9b9b33d26d909afaee1f236cbb830da4251, ran in order:script/lintpassed (0 issues);script/testpassed (fullgo test -race ./...);UPDATE_TOOLSNAPS=true go test ./...passed (owned snapshots unchanged);script/generate-docspassed (no generated documentation diff).git diff --checkpassed and final worktree is clean. Discarded only unrelated generator-produced trailing-newline drift inmerge_pull_request.snap. Live PAT-dependent e2e tests were not run. This local revision awaits separate push authorization; these are local results, not fresh CI claims.Docs
Generated documentation is unchanged; protocol clarification is recorded here and alongside protocol tests. Six tool snapshots total 246 lines on main and 372 lines in this layer: hide/unhide issue comment 47/33 → 67/53; hide/unhide review comment 47/33 → 67/53; hide/unhide review 53/39 → 73/59. Input metadata is retained; additions describe the output API only.