Skip to content

Fix add_issue_comment schema compatibility regression - #3127

Merged
SamMorrowDrums merged 1 commit into
mainfrom
sammorrowdrums-fix-add-issue-comment-schema-2c9
Aug 20, 2026
Merged

Fix add_issue_comment schema compatibility regression#3127
SamMorrowDrums merged 1 commit into
mainfrom
sammorrowdrums-fix-add-issue-comment-schema-2c9

Conversation

@SamMorrowDrums

Copy link
Copy Markdown
Collaborator

Summary

  • remove top-level anyOf and dependentSchemas from add_issue_comment so its canonical input schema is a flat object accepted by stricter provider JSON Schema subsets
  • keep body.minLength, the reaction enum, and comment_id integer/minimum constraints in the schema while retaining all cross-field validation in the handler
  • add a non-mutating regression guard over the complete OSS tool inventory that rejects top-level anyOf, oneOf, or allOf

This 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

Input modeResult
body onlyCreates the issue/PR comment
reaction onlyReacts to the issue/PR
body + reactionPreserves the existing combined behavior
comment_id + reactionReacts to the matching existing comment
Neither body nor reactionClear tool error
comment_id without reactionClear tool error
comment_id + bodyClear tool error
Empty body or reactionClear tool error
Zero, negative, fractional, or non-numeric comment_idClear tool error
Unsupported reactionClear tool error

Inventory and footprint

The emitted tools/list inventory contains 85 tools and has no top-level anyOf, oneOf, or allOf violations after this change. No other accidental instance required a fix.

The add_issue_comment toolsnap 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/lint
  • script/test
  • script/generate-docs
  • local stdio tools/list wire smoke over all toolsets (85 tools, zero top-level combinator violations)

Fixes#3126

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>
CopilotAI balanced review requested due to automatic review settings August 20, 2026 08:39
@SamMorrowDrums
SamMorrowDrums requested a review from a team as a code ownerAugust 20, 2026 08:39

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes provider compatibility by removing unsupported top-level schema combinators while preserving handler validation.

Changes:

  • Flattens the add_issue_comment input schema.
  • Expands schema and handler regression tests.
  • Adds an inventory-wide combinator compatibility guard.
Show a summary per file
FileDescription
pkg/github/issues.goRemoves incompatible schema constraints.
pkg/github/issues_test.goVerifies schema and handler behavior.
pkg/github/tools_validation_test.goGuards all tool schemas against top-level combinators.
pkg/github/__toolsnaps__/add_issue_comment.snapUpdates 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
SamMorrowDrums merged commit fcdd664 into mainAug 20, 2026
20 checks passed
@SamMorrowDrums
SamMorrowDrums deleted the sammorrowdrums-fix-add-issue-comment-schema-2c9 branch August 20, 2026 08:50
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add_issue_comment's top-level anyOf (added in v1.10.0 / #3085) breaks Claude tool-use API compatibility

2 participants

@SamMorrowDrums