agentHost: avoid persisting ephemeral connections - #329634
Draft
Aaron Munger (amunger) wants to merge 2 commits into
Draft
agentHost: avoid persisting ephemeral connections#329634Aaron Munger (amunger) wants to merge 2 commits into
Aaron Munger (amunger) wants to merge 2 commits into
Conversation
Managed tunnel, WSL, and cloud sandbox connections are runtime-only. Avoid rewriting user settings when registering them so a settings file lock cannot fail an otherwise successful connection. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Prevents ephemeral managed agent-host connections from rewriting user settings while preserving durable WebSocket and SSH persistence.
Changes:
- Limits persistence to WebSocket and SSH connections.
- Adds regression coverage for tunnel, WSL, and cloud sandbox connections.
Show a summary per file
| File | Description |
|---|---|
remoteAgentHostServiceImpl.ts |
Gates managed-connection persistence by durable connection type. |
remoteAgentHostService.test.ts |
Verifies ephemeral registration causes no configuration writes. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Balanced
Persist WebSocket hosts in user settings and SSH hosts only in application storage. Keep WSL, tunnel, and cloud sandbox registration runtime-only, with an exhaustive switch documenting each ownership boundary. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
What changed
chat.remoteAgentHostsWhy
Registering a dev tunnel rewrote
settings.jsoneven though tunnel entries are filtered from persisted configuration. On Windows, an existing file lock could make the atomic settings-file rename fail and incorrectly surface an otherwise successful tunnel connection as failed.Separating the persistence paths also avoids the same redundant settings rewrite for SSH connections, whose durable metadata belongs in application storage rather than user settings.
Validation
npm run typecheck-clientscripts\test.bat --run src\vs\platform\agentHost\test\electron-browser\remoteAgentHostService.test.ts(32 passing)npm run valid-layers-check