Repository navigation
fix(automation): keep tools and previews in the thread session - #886
Merged
Merged
Conversation
Bind browser, desktop and device automation to a shared worker-owned thread scope, reject session escapes and keep default preview targets current. Fixes: #846
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.
Change
Automation could open its own session while thread Preview watched the thread-derived session, leaving the preview disconnected. Desktop batches could override the startup session, and global lifecycle operations could affect other threads.
Use one worker-owned thread scope for browser, desktop and device MCP calls and catalogs, checked before gateway authorization. Preserve each tool's supported argument grammar:
close allas well as session and namespace overrides.testrunner, which creates per-attempt sessions; scripts can usereplayin the thread session.applealias against iOS/macOS catalog entries.Update automation documentation and add adapter and MCP bridge regression coverage.
Fixes: #846
Verification
dev, reran the affected tool/Preview adapter tests, worker typecheck and scoped lint.Copy audit (§8): not applicable; no UI copy changed. New guidance and errors belong to the model-facing MCP interface.