8000 fix(protocol)!: preserve elicitation metadata numbers by dominicnunez · Pull Request #317 · dominicnunez/codex-sdk-go · GitHub
[go: up one dir, main page]

Skip to content

fix(protocol)!: preserve elicitation metadata numbers - #317

Merged
dominicnunez merged 1 commit into
mainfrom
fix/elicitation-meta-numbers
Nov 4, 2026
Merged

dominicnunez merged 1 commit into
mainfrom
fix/elicitation-meta-numbers

Conversation

@dominicnunez
Copy link
Copy Markdown
Owner

MCP elicitation request metadata was decoded through float64 before application callbacks, rounding large integers and rejecting otherwise valid numbers outside float64 range. Decode _meta with the existing exact-number wire helper in all four modes, so nested values and echoed response metadata retain their numeric tokens.

The public Meta field remains interface{}, but decoded numbers now have dynamic type json.Number. Existing mode/variant admission, exact field matching, duplicate selection, native errors, receiver ownership, raw OpenAI schemas and application-constructed response encoding remain covered.

Validation: public regression fails before the fix in all four modes; focused callback/echo, rejection/recovery, native-error reference, duplicate/ownership and generated round-trip checks. Formatting, module tidiness, build, vet, lint, ordinary/race suites, focused schema checks and fuzzing (31,306 executions) pass. Independent full-patch review found no outstanding findings or evidence gaps. Complete local callback-and-reply measurements cover small metadata, 16,384 numbers and a 1 MiB string in every mode. Numeric-array allocations increase about 24–26% in bytes and 50% in count to preserve tokens; observed latency ratios are 0.961–1.091 versus the prior revision.

Closes #258.

Decode arbitrary request metadata as exact JSON numbers before handler delivery in every elicitation mode.

BREAKING CHANGE: decoded numbers in McpServerElicitationRequestParams.Meta now use json.Number instead of float64.
@chatgpt-codex-connector
chatgpt-codex-connector Bot commented Nov 4, 2026 •
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-11-04T02:00:06.848843Z 798ac86 PR opened
🔒 Security Review ✅ Completed 2026-11-04T02:02:12.553646Z 798ac86 PR opened
ℹ️ 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.

@dominicnunez
dominicnunez merged commit 7efdb8b into main Nov 4, 2026
4 checks passed
@dominicnunez
dominicnunez deleted the fix/elicitation-meta-numbers branch November 4, 2026 02:05
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.

fix: preserve numeric MCP elicitation request metadata

1 participant

0