fix(xcode-ide): add bridge proxy diagnostics and default schema handling#310
Open
dpearson2699 wants to merge 3 commits intogetsentry:mainfrom
Open
fix(xcode-ide): add bridge proxy diagnostics and default schema handling#310dpearson2699 wants to merge 3 commits intogetsentry:mainfrom
dpearson2699 wants to merge 3 commits intogetsentry:mainfrom
Conversation
Add debug logging to xcode-tools-bridge proxy tool calls so the exact arguments and responses can be inspected when diagnosing bridge-related issues like XcodeGlob returning paths rejected by XcodeRead/RenderPreview. Handle the JSON Schema `default` keyword in jsonSchemaToZod so remote tool schema defaults are preserved through the proxy, preventing potential argument loss. Add integration test verifying argument passthrough integrity through the full proxy pipeline (paths with spaces, unicode, extra properties). Closes getsentry#252 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2199455. Configure here.
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.

Summary
Fixes #252
After
xcode-idebridge sync succeeds, paths returned byXcodeGlobare rejected byXcodeReadandRenderPreviewwith "File not found in project structure". Investigation revealed:xcrun mcpbridge. The "File not found" error originates from Apple's remote server, not this codebase.jsonSchemaToZodconverter was silently dropping JSON Schemadefaultvalues, meaning Zod validation could reject or alter arguments the remote server expects.Changes
Bridge proxy diagnostics (registry.ts, tool-service.ts)
registry.ts: Logs tool name and argument keys when the proxy handler is invokedtool-service.ts: Logs call initiation, result summary (content type count), and errors ininvokeTool()logutility atdebuglevel -- zero overhead when debug logging is disabledJSON Schema
defaultvalue handling (jsonschema-to-zod.ts)defaultto theJsonSchematype definitionapplyDefault()helper that chains.default(value)onto any Zod typeIntegration test for argument passthrough (registry.integration.test.ts)
Echotool to the fake MCP server fixture that JSON-echoes received argumentsTesting
Automated
Manual verification (iOS template project)
XcodeBuildMCP-iOS-Templateand openedMyProject.xcodeprojin Xcodexcode-ide call-tool --remote-tool XcodeGlobreturned Swift file paths successfullyxcode-ide call-tool --remote-tool XcodeReadread files using paths returned by XcodeGlob -- no "File not found" errornpm run inspect): server initialized successfullyinspect list-tools: 29 tools registered with xcode-ide workflow enabled, 20 bridge-proxied tools visibleinspect call-tool xcode_ide_list_tools: bridge tools returned correctly through MCP proxy pathXCODEBUILDMCP_DEBUG=trueconfirmed active in.vscode/mcp.jsondev server config