Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 17, 2026

GitHub's MCP server returns get_commit with an invalid schema: {"type": "object"} without the required properties field. While schema normalization already handles this, there was no integration test validating the fix end-to-end.

Changes

  • Add TestGitHubGetCommitSchemaPatch - Integration test that simulates GitHub backend returning broken get_commit schema and verifies automatic patching to {"type": "object", "properties": {}}

The test follows existing patterns: mock HTTP backend, validates tool registration, asserts schema normalization adds missing properties field.

// Simulates actual GitHub MCP server behavior
"inputSchema": map[string]interface{}{
    "type": "object",
    // Missing "properties" field - gets auto-patched
},

// Verification
assert.Contains(t, tool.InputSchema, "properties", "Schema must be patched")
assert.Empty(t, tool.InputSchema["properties"], "Properties should be empty map")
Original prompt

This section details on the original issue you should resolve

<issue_title>get_commit</issue_title>
<issue_description>Add a test case to ensure that GitHub get_commit is properly patched. It returns an invalid schema.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

- Add TestGitHubGetCommitSchemaPatch to verify GitHub's broken get_commit schema is properly patched
- Test simulates GitHub backend returning get_commit with missing properties field
- Validates that schema normalization adds empty properties map to make schema valid
- All existing tests continue to pass

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add test case for get_commit patch Add integration test for GitHub get_commit schema normalization Jan 17, 2026
Copilot AI requested a review from pelikhan January 17, 2026 11:41
@lpcox lpcox marked this pull request as ready for review January 18, 2026 15:49
@lpcox lpcox merged commit d0ff341 into main Jan 18, 2026
3 checks passed
@lpcox lpcox deleted the copilot/add-test-case-for-get-commit branch January 18, 2026 15:49
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.

get_commit

3 participants