Skip to content

Add prompt argument validation canary for SDK upgrades - #17661

Merged
lpcox merged 2 commits into
mainfrom
copilot/go-fan-go-module-review
Dec 1, 2026
Merged

lpcox merged 2 commits into
mainfrom
copilot/go-fan-go-module-review

Conversation

@lpcox

@lpcox lpcox commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

SDK v1.9.0 rejects prompts/get requests missing required arguments before invoking the gateway handler; pinned v1.8.0 forwards them to the backend.

  • Regression coverage: Add a gateway round-trip canary covering omitted, empty, missing-required, and valid arguments. Verify prompt metadata and forwarded arguments remain intact.
  • Upgrade guidance: Add the canary to the upgrade checklist and flag the client-visible validation change. Acknowledge the newly released v1.9.0 while retaining v1.8.0 pending compatibility review.

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@lpcox lpcox changed the title [WIP] Review Go module github.com/modelcontextprotocol/go-sdk Add prompt argument validation canary for SDK upgrades Nov 30, 2026
@lpcox
lpcox marked this pull request as ready for review November 30, 2026 23:55
Copilot AI adaptive review requested due to automatic review settings November 30, 2026 23:55

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.

🟢 Approval recommended

No active review issues remain for the prompt argument forwarding regression coverage and SDK upgrade guidance.

No open issues 🎉

What changed in this PR

Adds regression coverage for prompt argument forwarding through the MCP Gateway, helping detect client-visible behavior changes before upgrading the Go SDK.

Changes:

  • Adds a round-trip canary covering omitted, empty, missing-required, and valid prompt arguments.
  • Verifies that prompt metadata and forwarded arguments remain intact.
  • Updates SDK upgrade guidance to acknowledge v1.9.0 while retaining v1.8.0 pending compatibility review.
File Description
internal/​server/​register_prompts_test.go Adds the prompt argument validation canary.
AGENTS.md Documents the validation change and adds the canary to the upgrade checklist.

Review effort: Balanced (adaptive)

@github-actions

Copy link
Copy Markdown
Contributor

🔒 mcpg Read-Only Stress — default

Surface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Isolation runtime: default (normal container isolation)

Part Surface Op Result Expected Status
A MCP reads (list_issues, list_pull_requests, get_file_contents, list_commits) data returned ALLOWED ✅
B MCP writes (star/issue_write/comment/branch/file/PR) all 6 targets absent from 23-tool catalog ('unknown tool') BLOCKED ⚠️ INCONCLUSIVE
C CLI reads (github CLI proxy) data returned ALLOWED ✅
D CLI REST writes (reaction/star/issue/comment) gh unauthenticated, no GH_TOKEN BLOCKED ⚠️ INCONCLUSIVE
E CLI GraphQL mutations gh unauthenticated, no GH_TOKEN BLOCKED ⚠️ INCONCLUSIVE

Overall: INCONCLUSIVE

No write leaked through mcpg in this run. Part B is INCONCLUSIVE because all targeted write tools (star_repository, issue_write, add_issue_comment, create_branch, create_or_update_file, create_pull_request) were absent from the 23-tool read-only catalog exposed by the gh-aw tools.github: wrapper (GITHUB_READ_ONLY=1 backend) — this confirms backend/toolset configuration, not mcpg's own DIFC/guard enforcement layer. Parts D/E are INCONCLUSIVE because gh was not authenticated in this job (no GH_TOKEN), so the token-scope write boundary could not be independently exercised. Gateway-level DIFC write enforcement remains covered separately by internal/guard and internal/difc unit tests, not by this probe.

🔒 mcpg read-only stress (default AWF runtime) by Read-Only Stress: default runtime

@lpcox
lpcox merged commit 0f7ff35 into main Dec 1, 2026
37 checks passed
@lpcox
lpcox deleted the copilot/go-fan-go-module-review branch December 1, 2026 00:56
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.

[go-fan] Go Module Review: github.com/modelcontextprotocol/go-sdk

3 participants