Skip to content

agentHost: fix scoped debug log export - #336354

Merged
roblourens merged 4 commits into
mainfrom
agents/fix-ahp-debug-log-export-bug
Sep 16, 2026
Merged

roblourens merged 4 commits into
mainfrom
agents/fix-ahp-debug-log-export-bug

Conversation

@roblourens

Copy link
Copy Markdown
Member

Summary

  • group client-owned AHP wire logs by a stable logical-host ID while preserving the actual protocol connection ID in each JSONL entry
  • include reconnect-created, rotated, and older output-channel log segments without mixing overlapping connections
  • stream browser-owned files without a silent inline byte budget and fail explicitly when desktop archive inputs cannot be saved
  • surface unexpected enumeration and read failures while retaining expected missing-log behavior

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-client
  • ESLint on all changed TypeScript files
  • git diff --check

(Written by Copilot)

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
Copilot AI balanced review requested due to automatic review settings September 16, 2026 00:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Low severity

Open (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
@github-actions

github-actions Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: 0face04e Current: b455a1f2

Changed (1)

chat/agent-lifecycle/chatAgentLifecycle/RetainedFollowUpLatestTurn/Light
Before After
before after

1 insignificant change(s) omitted (≤20 px, Δ≤2). See CI logs for details.

roblourens and others added 2 commits September 15, 2026 21:39
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
roblourens marked this pull request as ready for review September 16, 2026 20:39
@roblourens
roblourens enabled auto-merge (squash) September 16, 2026 20:39
@roblourens
roblourens merged commit 66fc4e9 into main Sep 16, 2026
53 of 54 checks passed
@roblourens
roblourens deleted the agents/fix-ahp-debug-log-export-bug branch September 16, 2026 22:21
@vs-code-engineering vs-code-engineering Bot added this to the 1.139.0 milestone Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants