agentHost: fix scoped debug log export - #336354
Merged
Merged
Conversation
Group AHP wire-log segments by a stable logical-host ID while preserving each relay connection ID in JSONL metadata. Export reconnect and rotated segments, retain all output-channel logs, and fail explicitly instead of silently dropping client or host files. (Written by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d4768367-fde5-4eb9-b62c-d997ec420a6f
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The new historical wire-log enumeration behavior lacks direct regression coverage.
Get a fresh assessment by requesting another Copilot review.
Review tier: Balanced
Findings: 1
What changed in this PR
Scopes Agent Host debug-log exports by stable logical-host IDs while preserving connection IDs and streaming complete log resources.
Changes:
- Hashes logical-host IDs for reliable AHP log grouping.
- Includes reconnect, rotation, and historical output logs.
- Streams exports and surfaces collection/archive failures.
| File | Description |
|---|---|
exportAgentHostDebugLogs.test.ts |
Tests resource streaming and grouped logs. |
exportAgentHostDebugLogsService.ts |
Makes desktop ZIP failures explicit. |
agentHostLogSources.ts |
Discovers historical host-scoped AHP logs. |
exportAgentHostDebugLogsAction.ts |
Streams full resources and collects older logs. |
tunnelAgentHostServiceImpl.ts |
Separates tunnel host and connection IDs. |
devContainerAgentHostConnector.contribution.ts |
Records active reconnect IDs. |
cloudSandboxAgentHostService.ts |
Adds stable sandbox log identity. |
relayTransport.test.ts |
Tests established connection IDs. |
ahpJsonlLogger.test.ts |
Tests logical-host matching and rotation. |
agentHostIpcChannelTransport.test.ts |
Updates logger construction. |
webSocketTransport.ts |
Supplies explicit WebSocket log identity. |
wslRemoteAgentHostServiceImpl.ts |
Records active WSL relay IDs. |
sshRemoteAgentHostServiceImpl.ts |
Records active SSH relay IDs. |
localAgentHostService.ts |
Uses the local client as log identity. |
relayTransport.ts |
Passes established IDs to logger creation. |
ahpJsonlLogger.ts |
Introduces hashed logical-host filenames. |
remoteAgentHostServiceImpl.ts |
Adds WebSocket logical-host identity. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Cover the session log-source path so disabled wire logging still discovers existing matching segments without including logs from another logical host. (Written by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d4768367-fde5-4eb9-b62c-d997ec420a6f
Contributor
Accept the CI-rendered baseline after confirming the image differs only by one-value anti-aliasing noise. (Written by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d4768367-fde5-4eb9-b62c-d997ec420a6f
Resolve the component fixture baseline conflict by taking the current upstream picker-alignment baselines. (Written by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d4768367-fde5-4eb9-b62c-d997ec420a6f
roblourens
marked this pull request as ready for review
September 16, 2026 20:39
roblourens
enabled auto-merge (squash)
September 16, 2026 20:39
Dmitriy Vasyura (dmitrivMS)
approved these changes
Sep 16, 2026
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
Validation
./scripts/test.sh --run src/vs/platform/agentHost/test/common/ahpJsonlLogger.test.ts --run src/vs/platform/agentHost/test/common/relayTransport.test.ts --run src/vs/platform/agentHost/test/browser/agentHostIpcChannelTransport.test.ts --run src/vs/workbench/contrib/chat/test/browser/exportAgentHostDebugLogs.test.ts(47 passing)npm run typecheck-clientgit diff --check(Written by Copilot)