Fix add_issue_comment schema compatibility regression - #3127
Merged
SamMorrowDrums merged 1 commit intoAug 20, 2026
Conversation
Keep cross-field validation in the handler so the canonical tool schema remains compatible with provider JSON Schema subsets. Add an inventory-wide regression guard against top-level schema combinators. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes provider compatibility by removing unsupported top-level schema combinators while preserving handler validation.
Changes:
- Flattens the
add_issue_commentinput schema. - Expands schema and handler regression tests.
- Adds an inventory-wide combinator compatibility guard.
Show a summary per file
| File | Description |
|---|---|
pkg/github/issues.go |
Removes incompatible schema constraints. |
pkg/github/issues_test.go |
Verifies schema and handler behavior. |
pkg/github/tools_validation_test.go |
Guards all tool schemas against top-level combinators. |
pkg/github/__toolsnaps__/add_issue_comment.snap |
Updates the schema snapshot. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Balanced
SamMorrowDrums
deleted the
sammorrowdrums-fix-add-issue-comment-schema-2c9
branch
August 20, 2026 08:50
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
anyOfanddependentSchemasfromadd_issue_commentso its canonical input schema is a flat object accepted by stricter provider JSON Schema subsetsbody.minLength, the reaction enum, andcomment_idinteger/minimum constraints in the schema while retaining all cross-field validation in the handleranyOf,oneOf, orallOfThis is a patch-release fix for the v1.10.0 regression introduced by #3085. A single rejected schema breaks full-tool-list forwarding in headless Claude/CI clients before any tool can run. The fix is static and provider-portable: it does not mutate schemas or branch on negotiated MCP protocol versions.
Behavior compatibility
bodyonlyreactiononlybody+reactioncomment_id+reactionbodynorreactioncomment_idwithoutreactioncomment_id+bodybodyorreactioncomment_idInventory and footprint
The emitted
tools/listinventory contains 85 tools and has no top-levelanyOf,oneOf, orallOfviolations after this change. No other accidental instance required a fix.The
add_issue_commenttoolsnap shrinks from 2,088 to 1,732 bytes (-356 bytes, -17.0%) and from 502 to 417 tokens with@anthropic-ai/tokenizer(-85 tokens, -16.9%).A future runtime compatibility transform, if ever needed, should use an explicit client capability/profile and deep-clone or copy-on-write each inventory build; it should not mutate shared tool schemas or infer capabilities from the MCP protocol version.
Validation
UPDATE_TOOLSNAPS=true go test ./...script/lintscript/testscript/generate-docstools/listwire smoke over all toolsets (85 tools, zero top-level combinator violations)Fixes #3126