Skip to content

smoke: wait for the new local chat in the Chat Sessions Local tests - #347394

Merged
Bryan Chen (bryanchen-d) merged 1 commit into
mainfrom
copilot/vscode/chat-sessions-local-wait
Nov 11, 2026
Merged

Bryan Chen (bryanchen-d) merged 1 commit into
mainfrom
copilot/vscode/chat-sessions-local-wait

Conversation

@bryanchen-d

Copy link
Copy Markdown
Collaborator

Chat Sessions › Test Local session has failed 13 Linux Electron-Smoke jobs on 12 unrelated PRs since #346729 merged (Nov 10, 07:27 UTC). Before that, in 988 Linux smoke jobs over the previous 48 h, the only hit was on #346729's own branch. It times out after 120 s waiting for MOCKED_CHAT_SESSIONS_LOCAL_RESPONSE.

Mechanism

#346729 removed the Copilot CLI row, so Test Local session is now the first test of the suite and runs in a cold window.

  1. smoketest.openLocalChat first waits up to 60 s for workbench.action.chat.newLocalChat to register. Meanwhile the chat view binds its default session, which is Agent Host Copilot.
  2. openSession waited with waitForChatViewSessionChange, which accepts any new binding, so it returned on that Agent Host session.
  3. The prompt went there. In run 42856026314 (shard 3), the runner log shows the prompt typed at 16:38:04.538, then Materialized untitled session agent-host-copilotcli:/untitled-… into real session agent-host-copilotcli:/… and _invokeAgent called for resource: agent-host-copilotcli:/…. This suite doesn't warm up the Agent Host, so no reply came. The view then switched to the empty local chat that the failure screenshot shows.

Before #346729, the Copilot CLI editor test ran first and warmed the window, so the local chat command was already registered.

#345913 added waitForNewLocalChatViewSession for exactly this race and switched Browser View, Chat Model Configuration and Chat Sandbox to it. Chat Sessions kept the looser wait.

Change

  • Both 'view' sessions in chatSessions.test.ts are Local, so openSession now waits with waitForNewLocalChatViewSession. It returns only once the view is bound to a new vscode-chat-session://local/ session.
  • waitForChatViewSessionChange has no other callers, so this removes it.

Validation

  • A TypeScript check of test/automation gives the same error set before and after the change (the errors are environment-only, from missing local node_modules). PR CI compiles both projects.
  • Linux Electron-Smoke (shard 3/3) runs the suite. The flake hits roughly 1 in 10 shard-3 runs, so I'll watch the next few runs on main after this lands.

Authored with Copilot

Copilot AI balanced review requested due to automatic review settings November 10, 2026 17:17

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.

🟢 Approval recommended

No active review issues remain, although runtime validation is pending and missing dependencies limited the reported TypeScript check.

No open issues 🎉

What changed in this PR

This PR addresses a cold-window race in the Chat Sessions smoke tests by waiting for a new local chat session before sending a prompt, rather than accepting an intermediate Agent Host session.

Changes:

  • Uses waitForNewLocalChatViewSession for Local sessions opened in the chat view.
  • Removes the unused waitForChatViewSessionChange automation helper.

No actionable findings remain. Runtime validation is still pending; the reported TypeScript check was limited by missing dependencies.

File Description
test/​smoke/​src/​areas/​chat/​chatSessions.test.ts Waits for a new local session and documents the cold-window race.
test/​automation/​src/​chat.ts Removes the unused generic session-change wait helper.

Review effort: Balanced

Since #346729 removed the Copilot CLI row, Test Local session is the first
test of the Chat Sessions suite and runs in a cold window. There,
smoketest.openLocalChat still waits for workbench.action.chat.newLocalChat
to register while the chat view binds its default Agent Host Copilot
session. waitForChatViewSessionChange accepted that binding, so the prompt
went to the Agent Host session and the local reply never came (13 Linux
smoke failures on 12 unrelated PRs since). Use
waitForNewLocalChatViewSession, as the other local chat suites do since
#345913, and remove the looser wait, which has no other callers.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

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.

🟢 Approval recommended

No active review issues were identified for the local-chat binding wait and removal of the unused session-change helper.

No open issues 🎉

Review effort: Balanced

@bryanchen-d
Bryan Chen (bryanchen-d) merged commit 8670639 into main Nov 11, 2026
53 of 54 checks passed
@bryanchen-d
Bryan Chen (bryanchen-d) deleted the copilot/vscode/chat-sessions-local-wait branch November 11, 2026 00:45
@vs-code-engineering vs-code-engineering Bot added this to the 1.147.0 milestone Nov 11, 2026
Justin Chen (justschen) added a commit to justschen/vscode that referenced this pull request Nov 11, 2026
Resolve the conflict in test/smoke/src/areas/chat/chatSessions.test.ts by taking main's version: microsoft#347394 landed the same Local-session readiness fix.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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