GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — mcpx: validate upstream prompts/get results before passing them on (#2193) by dezren39 · Pull Request #2700 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Oct 30, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Closes #2193 (split of #1957).

What

mcpclient.Client.GetPrompt returned the upstream prompts/get result bytes untouched, so a malformed or hostile upstream response flowed through the pool, daemon and CLI to clients as if mcpx had produced it (conformance row prompts-validate-io, gap citing #257).

  • New ValidatePromptResult in internal/mcpclient/promptcheck.go: the result must be an object with a messages list; each message must carry role user/assistant and content (single block or block list); each block must carry the fields its type requires — text→text, image/audio→base64 data + mimeType, resource→embedded resource with uri plus text or base64 blob, resource_link→uri + name. Unknown block types pass for forward compatibility; a missing type or missing/wrong-typed required field fails.
  • Client.GetPrompt now refuses an invalid result with a clear wrapped error instead of a silent pass-through. This is the single choke point under pool → daemon → CLI, so all paths are covered.
  • TestValidatePromptResult unit cover (valid + 15 malformed cases); conformance registry: prompts-validate-io client gap removed, C(...) cover added; the 5 matrix rows updated to the generator's rendered output for those rows.

Tests

  • Laptop: go test ./internal/mcpclient/ ok, go test ./internal/pool/ ok, go vet ./internal/mcpclient/ clean.
  • Known pre-existing failure, unrelated: internal/conformance TestMatrix fatals at LoadAuthSplit ("authsplit.json … does not bind mcpx") — verified identical on clean main ea1223a5 via stash, and already tracked as mcpx conformance: TestMatrix fails on main — authsplit.json rows 'does not bind mcpx' #2695. Because that fatal fires before the matrix golden is written, the 5 matrix rows here were updated by hand to the exact text a successful generator run produced for them; full regeneration should be re-run once mcpx conformance: TestMatrix fails on main — authsplit.json rows 'does not bind mcpx' #2695 lands.
  • Full suite via CI on this PR.

Queue task 3279 · repo-worker-code Lane C


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@dezren39
mcpx: validate upstream prompts/get results before passing them on (#…
0bba9dd
…2193)
@dezren39
dezren39 requested a review from a team as a code owner October 30, 2026 11:05
@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 26 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6bd369c3-e0f6-4c63-81a4-a861068df7ec
Commits

Reviewing files that changed from the base of the PR and between ec02aa1 and e45f868.

Files selected for processing: 5
  • pkgs/mcpx/docs/spec/conformance-matrix.md
  • pkgs/mcpx/internal/conformance/coverage_features.go
  • pkgs/mcpx/internal/mcpclient/client.go
  • pkgs/mcpx/internal/mcpclient/promptcheck.go
  • pkgs/mcpx/internal/mcpclient/promptcheck_test.go
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
  • X
  • Mastodon
  • Reddit
  • LinkedIn

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T12:45:44.571905Z e45f868 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Oct 30, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0bba9dd45d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/mcpx/internal/mcpclient/promptcheck.go Outdated
if err := json.Unmarshal(raw, &b); err != nil {
return fmt.Errorf("a resource_link block's uri or name is not a string: %w", err)
}
if b.URI == nil || *b.URI == "" || b.Name == nil || *b.Name == "" {

@chatgpt-codex-connector chatgpt-codex-connector Bot Oct 30, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

P2 Badge Preserve schema-valid empty resource-link names

When an upstream prompt contains a resource link with name: "", this condition now rejects the entire GetPrompt request, even if the link provides a meaningful title. The bundled ResourceLink schemas require name to be a string but impose no minimum length (for example, internal/mcpspec/schema/2026-07-28/schema.json:2826-2828), so this rejects valid responses that previously passed through. Check that the name is present and string-typed without requiring it to be nonempty.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@dezren39 dezren39 Oct 30, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Fixed in 6b26a03: the resource_link check now requires name to be present and string-typed only (no non-empty requirement), matching the bundled ResourceLink schema (name is type string with no minimum length, schema/2026-07-28/schema.json). The missing-name case stays rejected, and a valid-case test with name: "" plus a title was added to TestValidatePromptResult. Laptop: go test ./internal/mcpclient/ ok.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dezren39 dezren39 mentioned this pull request Oct 30, 2026
mcpx conformance: validate upstream prompts/get results before passing them on (split of #1957) #2193
Closed
@github-actions github-actions Bot assigned dezren39 Oct 30, 2026
@dezren39
mcpx: allow schema-valid empty resource_link names in prompt results (#…
6b26a03
…2193)
@dezren39

dezren39 commented Oct 30, 2026

Copy link
Copy Markdown
Member Author

@codex review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 6b26a03521

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
Merge remote-tracking branch 'origin/main' into queue/3279-2193-promp…
cb95ea9
…ts-validate-io

# Conflicts:
#	pkgs/mcpx/internal/conformance/coverage_features.go
@dezren39

dezren39 commented Oct 30, 2026

Copy link
Copy Markdown
Member Author

🤖 Agent note · merge-conflict resolution pushed (Lane B, task 3279)

Head is now cb95ea90: merged origin/main (ec02aa1). One conflict, in internal/conformance/coverage_features.go: main had converted the two tools-annotations-* gaps to C(...) covers (their fix landed), while this branch removes the prompts-validate-io gap (covered here). Resolution drops all three gap lines — each is covered now; no other files conflicted.

Re-verified on the merged tree (laptop): go test -count=1 ./internal/mcpclient/ ok; ./internal/pool/ ok; conformance TestFeaturesServer ok. TestAuthSplit/TestMatrix still fail with the authsplit.json 'does not bind mcpx' error — verified identical on clean origin/main ec02aa1, pre-existing and tracked as #2695, unrelated to this PR.

CI note: mcpx workflow runs are queued repo-wide (including main) — runner infra appears stuck; the earlier head's run 41049395221 never started. Merging under the standing directive once Codex re-review of the new head is clean, since the change itself is verified locally.

@codex review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Oct 30, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cb95ea9000

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/mcpx/internal/mcpclient/promptcheck.go Outdated
if err := json.Unmarshal(raw, &b); err != nil {
return fmt.Errorf("an %s block's data or mimeType is not a string: %w", *head.Type, err)
}
if b.Data == nil || b.MimeType == nil || *b.MimeType == "" {

@chatgpt-codex-connector chatgpt-codex-connector Bot Oct 30, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

P2 Badge Preserve schema-valid empty MIME-type strings

When an upstream prompt contains an image or audio block with mimeType: "", this condition rejects the entire GetPrompt request even though the bundled ImageContent and AudioContent schemas require only a string, with no minimum length (for example, internal/mcpspec/schema/2026-07-28/schema.json:1230-1233). This introduces a rejection of schema-valid responses that previously passed through. Retain the presence and string-type checks without requiring a nonempty MIME type.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@dezren39 dezren39 Oct 30, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Fixed in e45f868: the image/audio check now requires mimeType present and string-typed only — no non-empty requirement — since the bundled ImageContent/AudioContent schemas set no minimum length. Added valid-case tests for image and audio blocks with mimeType: ""; laptop go test -count=1 ./internal/mcpclient/ ok. (Lane B, queue task 3279.)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dezren39
mcpx: allow schema-valid empty mimeType in prompt image/audio blocks (#…
e45f868
…2193)
@dezren39

dezren39 commented Oct 30, 2026

Copy link
Copy Markdown
Member Author

@codex review — new head e45f868 fixes the P2 empty-mimeType finding (thread replied); please re-review.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: e45f868695

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 merged commit fa52fcb into main Oct 30, 2026
4 of 5 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the queue/3279-2193-prompts-validate-io branch October 30, 2026 12:47
@dezren39
dezren39 restored the queue/3279-2193-prompts-validate-io branch November 1, 2026 09:06
@dezren39
dezren39 deleted the queue/3279-2193-prompts-validate-io branch November 1, 2026 16:45
This was referenced Nov 3, 2026
Preserved branch: queue/3279-2193-prompts-validate-io — decision needed (merge / cherry-pick / drop) #3661
Closed
mcpx: smaller conformance gaps -- user identity, annotation trust, rate limits, cursors, URI encoding, prompt validation, restart, invalidation #1957
Closed
This was referenced Nov 21, 2026
Closure audit: every closed issue/PR verified; unmerged branches + unpushed worktrees inventoried #7079
Open
AUDIT-7 Lane 4 — MERGED-PR-AUDIT: merged PRs since 2026-10-23 vs their spawning issues #13879
Open
Audit programme: seven-lane review of PRs, issues and designs (2026-11-23) #13871
Open
id-pg: nullable ordering silently drops rows across keyset pages #16132
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@dezren39 dezren39

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

mcpx conformance: validate upstream prompts/get results before passing them on (split of #1957)

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.