fix(xcode-ide): suppress listChanged resync during manual bridge disconnect#344
Open
shaun0927 wants to merge 1 commit intogetsentry:mainfrom
Open
fix(xcode-ide): suppress listChanged resync during manual bridge disconnect#344shaun0927 wants to merge 1 commit intogetsentry:mainfrom
shaun0927 wants to merge 1 commit intogetsentry:mainfrom
Conversation
xcode_tools_bridge_disconnect is documented as a disconnect-and-unregister operation, but the bridge close callback still fed back into the listChanged resync path. That made an explicit manual disconnect behave like a transient reconnect event instead of a stable disconnected state. Suppress listChanged-driven resync while a manual disconnect is in progress, then clear that suppression on the next explicit startup/manual sync. Add a focused regression test for the manager callback flow and record the fix under Unreleased. Constraint: The xcode-ide bridge keeps a live invalidation callback even during explicit disconnect teardown Rejected: Remove the invalidation callback entirely | would break legitimate remote catalog refresh handling Confidence: high Scope-risk: narrow Reversibility: clean Directive: Preserve the semantic split between bridge-disconnect and bridge-sync; disconnect should not implicitly reconnect Tested: npm run format; npm run lint; npm run generate:version; npm run typecheck; npm run build; npm run docs:check; npm test Not-tested: End-to-end interaction with a real Xcode mcpbridge instance outside mocked/unit coverage
d476264 to
9466aef
Compare
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 #343.
xcode_tools_bridge_disconnectis documented as the bridge tool that disconnects the Xcode IDE bridge and unregisters proxiedxcode_tools_*tools. In the current implementation, the explicit disconnect path still allows the bridge invalidation callback to feed back intosyncTools({ reason: "listChanged" }).That makes a manual disconnect behave like a remote catalog refresh instead of a stable disconnected state.
Why this change belongs here
The current bridge tool contract separates:
xcode_tools_bridge_disconnectfor explicit disconnect + unregisterxcode_tools_bridge_syncfor explicit/manual re-syncAllowing
listChanged-driven resync during a manual disconnect collapses those semantics and weakens the deterministic lifecycle behavior the repo has been tightening in the recent MCP lifecycle work.Changes
listChanged-driven resync while a manual bridge disconnect is in progressCHANGELOG.mdunderUnreleasedTesting
npm run formatnpm run lintnpm run generate:versionnpm run typechecknpm run buildnpm run docs:checknpm testValidation note
Before applying the fix, I locally reproduced the problem by triggering
disconnectTool()and observing the manager callback still schedulesyncTools({ reason: "listChanged" }). The new regression test locks that behavior out so an explicit disconnect remains disconnected until the next intentional sync path.