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 mode Result
body only Creates the issue/PR comment
reaction only Reacts to the issue/PR
body + reaction Preserves the existing combined behavior
comment_id + reaction Reacts to the matching existing comment
Neither body nor reaction Clear tool error
comment_id without reaction Clear tool error
comment_id + body Clear tool error
Empty body or reaction Clear tool error
Zero, negative, fractional, or non-numeric comment_id Clear tool error
Unsupported reaction Clear 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>
Copilot AI balanced review requested due to automatic review settings August 20, 2026 08:39
@SamMorrowDrums
SamMorrowDrums requested a review from a team as a code owner August 20, 2026 08:39

Copilot AI 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
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
SamMorrowDrums merged commit fcdd664 into main Aug 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 free to 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