Skip to content

fix: accept compatible issue and pull request parameter names - #3630

Open
huong8373tt-beep wants to merge 2 commits into
github:mainfrom
huong8373tt-beep:fix/parameter-name-aliases-3605
Open

huong8373tt-beep wants to merge 2 commits into
github:mainfrom
huong8373tt-beep:fix/parameter-name-aliases-3605

Conversation

@huong8373tt-beep

Copy link
Copy Markdown

Summary

Accept compatible parameter spellings used by MCP clients for consolidated GitHub tools:

  • pull_number is normalized to the canonical pullNumber for pull_request_* consolidated tools.
  • issueNumber is normalized to the canonical issue_number for issue_* consolidated tools.
  • Calls that provide both spellings are rejected clearly instead of silently choosing one.

This addresses #3605, where clients using the repository's other naming convention receive misleading missing-parameter errors.

Tests

  • go test ./pkg/github -run 'Test(TypedCallsAcceptParameterAliases|PullRequestReadAcceptsSnakeCasePullNumber|IssueReadAcceptsCamelCaseIssueNumber|InputAliasesRejectConflictingValues|GetPullRequest|GetIssue|TypedCompatibilityPullRequestAfter)$' -count=1
  • gofmt -s -d on changed Go files
  • git diff --cached --check

The repository-wide test suite was not claimed as green: the existing typed-output tests report unrelated icon snapshot differences, and the repository lint script could not download golangci-lint v2.14.0 from the current network environment.

AI assistance disclosure

Slai Agent Runtime performed the investigation, implementation, and test execution. The account owner authorized this contribution and is responsible for its content.

Fixes #3605

@huong8373tt-beep

Copy link
Copy Markdown
Author

Follow-up for #3603 and the modern MCP payload-size edge case: the latest commit 08f0b27 reduces the get_file_contents ResourceLink threshold from 1 MiB to 448 KiB for the 2026-07-28 typed-output protocol, while preserving the 1 MiB threshold for legacy clients. This avoids common 1 MiB transport limits when file content is mirrored in both content and structuredContent. Added a focused regression test for a 500 KiB modern-protocol file and a threshold unit test.

Focused validation:

  • go test ./pkg/github -run "Test(GetFileContentsModernProtocolUsesTransportSafeLimit|RepositoryContentSizeLimit|_GetFileContents)" -count=1 — passed
  • git diff --check — passed
  • gofmt -s -d — passed

The repository-wide go test ./... was also run. It reached all packages but failed only at the existing assign_copilot_to_issue toolsnapshot mismatch, which is unrelated to this change; the remaining packages passed.

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.

Inconsistent parameter names

1 participant