Repository navigation
fix(compat): support mcp 1.10.0 - #4
Merged
Merged
Conversation
The nightly mcp 1.10.0 jobs fail with "MCP::ServerContext is already loaded" because const_defined? includes registered autoloads. Distinguish pending autoloads from loaded classes while preserving the fresh-process probe assertions.
naji247
approved these changes
Nov 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Failing
Scheduled run 43139974718:
mcp 1.10.0 (ruby 3.4)mcp 1.10.0 (ruby 3.3)mcp 1.10.0 (ruby 4.0)Cause
mcp 1.10.0registers aServerContextautoload, soconst_defined?returns true before the class loads. The fresh-process regression test mistakes that registration for an already loaded class and aborts withMCP::ServerContext is already loaded.Evidence
PrivateMembersTest#test_probes_server_context_in_a_process_that_has_not_loaded_mcp_server [test/test_private_members.rb:34], followed byMCP::ServerContext is already loaded.2026-11-12T02:15:30.3265116Z:779 runs, 2828 assertions, 1 failures, 0 errors, 0 skips.a53ca4c72b33a9393dadfad2a3163a837c3d45df. The failed matrix addsmcp 1.10.0.2026-11-11T14:05:34Z: “Autoload MCP::ServerContext from the gem entry point (#656)”.lib/mcp.rbaddsautoload :ServerContext, "mcp/server_context".Change
autoload?.ServernorServerContextloads before the probes run, and retain both probe-result assertions.Test
git diff --checkpassed.e5046d8c5d3519c603eefa3107b06815a8aef5bewithbundle exec rake.mcp 1.10.0job on Ruby 3.3, 3.4, and 4.0 reports779 runs, 2829 assertions, 0 failures, 0 errors, 0 skips.COVERAGE=1 bundle exec rakeandbundle exec rake test:e2epassed on Ruby 3.3, 3.4, and 4.0.bundle exec standardrb,bundle exec srb tc,bundle audit check --update,bundle exec rake type_coverage, andbundle exec rake rbi_freshnesspassed in that CI run.Thread
The task supplied the failed-run URL above but no Slack permalink.