feat(repos): add typed commit tool outputs - #3389
Open
SamMorrowDrums wants to merge 7 commits into
Open
SamMorrowDrums wants to merge 7 commits into
SamMorrowDrums wants to merge 7 commits into
Conversation
SamMorrowDrums
added this pull request to stack #3385
October 2, 2026 12:01
7 of 13 tasks
SamMorrowDrums
force-pushed
the
sammorrowdrums-type-repository-tools
branch
from
October 2, 2026 20:50
4b6686b to
c74eb7a
Compare
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The generated Linux license report contains an inconsistent architecture-specific license path.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Migrates repository commit tools to typed MCP inputs and outputs while preserving legacy text responses and pagination defaults.
Changes:
- Adds typed outputs and field projection for commit tools.
- Adds protocol, schema, projection, and pagination tests.
- Updates shared argument normalization and a generated license report.
| File | Description |
|---|---|
pkg/github/repositories.go |
Implements typed commit inputs and outputs. |
pkg/github/typed_read_normalizers.go |
Adjusts pagination normalization. |
pkg/github/typed_repository_commit_outputs_test.go |
Tests typed and legacy commit behavior. |
third-party-licenses.linux.md |
Splits Linux architecture license listings. |
💡 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-type-repository-tools
branch
from
October 5, 2026 09:22
6c5f60b to
02f6053
Compare
SamMorrowDrums
marked this pull request as ready for review
October 5, 2026 09:22
SamMorrowDrums
force-pushed
the
sammorrowdrums-type-repository-tools
branch
from
October 5, 2026 09:58
02f6053 to
d3fa25e
Compare
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Normalize omitted and explicit zero pagination to page 1 and perPage 30 for get_commit and list_commits. Cover legacy and modern wire calls and direct handlers. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use an optional-field commit DTO for full and projected modern outputs while retaining exact legacy text. Cover SHA and nested commit projections, empty lists, and output schema conformance. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Auto-generated by license-check workflow
Capture canonical modern schemas, exercise null lists and error suppression with IFC labels, and drop unrelated generated Linux license drift noted by Copilot review. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep exact-main byte assertions for the legacy protocol and verify modern text represents the same typed DTO as structured content. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
SamMorrowDrums
force-pushed
the
sammorrowdrums-type-repository-tools
branch
from
October 5, 2026 11:21
d3fa25e to
733153c
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
Migrates
get_commitandlist_commitsto concrete typed MCP inputs and outputs, including full, field-projected, and empty commit lists. Modern clients receive schema-conformant structured output; legacy JSON text remains byte-exact.Why
Continues the staged all-tools typed output migration for repository tools, building on discussion/notification PR #3388.
Fixes #
What changed
MinimalCommitoutput forget_commit, and optional-fieldListCommitOutputDTOs and selector forlist_commits.page=1andperPage=30for both tools, with exact REST query assertions for direct handlers and both protocol versions.fields=[sha], nestedfields=[commit], and empty full/projected lists, with byte-exact legacy text assertions.MCP impact
Modern clients receive output schemas and structured content for full, projected, and empty results. Legacy clients retain unchanged text bytes and input schemas; numeric/string zero pagination retains the original defaults.
Prompts tested (tool changes only)
fields=[commit]and schema conformance.Security / limits
Existing repository read scope and commit-content IFC labeling are retained.
Structured output honors the same field selection as legacy text, including nested commit fields; projected calls do not expose unselected fields.
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/lintscript/lintpassed with 0 issues on final head4b6686b5fc361a702e50d7e37a55870e49da6900../script/testscript/testpassed all packages with race detection on the same final head.Additional final-head validation:
go test ./pkg/github -run 'TestTypedRepositoryCommit|Test_GetCommit|Test_ListCommits' -count=1- passed.script/generate-docs- passed; generated documentation unchanged.git diff --check- passed.Docs
Tool names, descriptions, and advertised input schemas are unchanged; generated documentation and existing toolsnaps require no changes.