-
Notifications
You must be signed in to change notification settings - Fork 1.5k
refactor(types): adopt MissionId in router + introduce McpServerName #2681
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
Merged
ilblackdragon
merged 9 commits into
staging
from
refactor/mission-id-and-mcp-server-name
Apr 20, 2026
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
d62260e
refactor(types): adopt MissionId in router + introduce McpServerName
ilblackdragon ea1f629
refactor(mcp): address review feedback — validate server names at con…
ilblackdragon 3a936a5
Merge origin/staging into refactor/mission-id-and-mcp-server-name
ilblackdragon 062ec59
fix(mcp): annotate panic-safe McpServerName::new("unknown") .expect()…
ilblackdragon 0e5154e
Merge remote-tracking branch 'origin/staging' into refactor/mission-i…
ilblackdragon 3c73970
refactor(mcp): validate HttpMcpTransport::new server_name with safe f…
ilblackdragon 6f1a77f
refactor(mcp): validate McpClient constructor server names with safe …
ilblackdragon ba4392f
Merge remote-tracking branch 'origin/staging' into refactor/mission-i…
ilblackdragon e219184
fix(mcp): migrate legacy overlong server names at load instead of dro…
ilblackdragon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Medium Severity
This makes
McpServerConfig::validate()inherit the newMcpServerName64-character cap, but the old validation here only enforced non-empty plus[A-Za-z0-9_-]. That means an existing persisted MCP server name longer than 64 chars will now fail validation and get silently dropped during load via theretain(...)paths inload_mcp_servers_from()/load_mcp_servers_from_db().So this is not just a stricter new-input check — it is a backward-compat regression for existing
mcp-servers.json/ DB-backed configs.Suggested fix: keep load-time compatibility for legacy overlength names (or add an explicit migration path) instead of filtering them out on read, and add a regression test that loads a persisted >64-character server name.
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 e219184. The load paths (
load_mcp_servers_from+load_mcp_servers_from_db) now in-place truncate overlong legacy names at a char boundary and emit awarn!documenting the migration, rather than silently dropping them viaretain(...). Invalid-char cases still drop, matching pre-PR behavior for that class. Regression teststest_load_truncates_legacy_overlong_server_names(ASCII happy path, truncated to exactly the cap) andtest_load_truncation_is_char_boundary_safe(multi-byte UTF-8 straddling byte 64 must not panic) added.