-
Notifications
You must be signed in to change notification settings - Fork 6.7k
fix: prevent MCP startup failure on missing 'type' field #7417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
b486736 to
75342ef
Compare
💡 Codex Reviewcodex/codex-rs/mcp-types/src/lib.rs Lines 553 to 557 in b486736
Because ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
I have read the CLA Document and I hereby sign the CLA |
|
Thank you. I believe the structs that require default values for |
75342ef to
9ac39d2
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
Thanks for the contribution. Before I assign this for review by one of the codex team members, please fix the CI failures. Looks like a simple format issue, so it should be straightforward. |
9ac39d2 to
c7ad4bc
Compare
|
@codex review |
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.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| # apply patch | ||
| subprocess.run(["patch", "src/lib.py", "-i", "lib.py.patch"], check=True) |
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.
Correct mcp type generator patch command
Running generate_mcp_types.py without --check now fails because the new patch step calls patch src/lib.py -i lib.py.patch, but the generated file and the checked-in patch are src/lib.rs/lib.rs.patch. With check=True on subprocess.run, this raises immediately when the files aren’t found, preventing the mcp types from being regenerated or having the defaults re-applied when the schema changes.
Useful? React with 👍 / 👎.
c7ad4bc to
2458694
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
@etraut-openai Thank you for your review. The CI error occurred because |
|
That's a pretty bad hack. It's unlikely that change will be accepted. |
|
I see. I will rewrite the script. |
Cause: - serde in `convert_to_rmcp` (`codex-rs/rmcp-client/src/utils.rs`) failed for `ToolInputSchema` and `ToolOutputSchema` because no `r#type` value was provided. Fix: - set a default `r#type` value for these two structs so a missing `type` no longer breaks MCP startup.
2458694 to
7ffc9ff
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
I’ve reworked the |
|
@etraut-openai Is this now ok? |
|
it's my mistake |
gpeal
left a comment
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.
Thanks!
Fix the issue #7416 that the codex-cli produce an error "MCP startup failure on missing 'type' field" in the startup.
convert_to_rmcp(codex-rs/rmcp-client/src/utils.rs) failed because nor#typevalue was providedr#typevalue in the corresponding structs