Skip to content

Add chat terminal sandbox smoke tests - #324848

Merged
Dileep Yavanmandha (dileepyavan) merged 5 commits into
microsoft:mainfrom
dileepyavan:DileepY/smoke_tests
Jul 9, 2026
Merged

Add chat terminal sandbox smoke tests#324848
Dileep Yavanmandha (dileepyavan) merged 5 commits into
microsoft:mainfrom
dileepyavan:DileepY/smoke_tests

Conversation

@dileepyavan

@dileepyavan Dileep Yavanmandha (dileepyavan) commented Jul 7, 2026

Copy link
Copy Markdown
Member

Summary

  • add Linux and macOS smoke coverage for chat.agent.sandbox.enabled
  • verify sandboxed terminal execution, workspace and temporary-directory writes, outside-workspace read/write behavior, and default network denial
  • use deterministic mock LLM tool calls and a local HTTP probe rather than external network dependencies
  • register the suite for desktop, non-remote smoke runs

Validation

  • cd test/smoke && npm run compile
  • npm run precommit

The end-to-end suite has not completed successfully in the current local environment because Chat did not become ready during the smoke-test warm-up, so this is opened as a draft for CI validation and iteration.

Fixes #325052

Copilot AI review requested due to automatic review settings July 7, 2026 23:54

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.

Pull request overview

Adds a new Electron smoke-test suite to exercise the Chat terminal sandbox (chat.agent.sandbox.enabled) on Linux/macOS using deterministic mock-LLM tool calls plus a local HTTP probe, and wires the suite into the desktop (non-remote) smoke run.

Changes:

  • Register a new “Chat Sandbox” smoke-test suite in the main Electron smoke runner.
  • Add end-to-end sandbox validations for: terminal execution, workspace vs outside-workspace write behavior, outside-workspace reads, TMPDIR writes, and default network denial.
  • Use a mock LLM server + echo-last-message tool-result echoing to assert against the tool output payload.
Show a summary per file
File Description
test/smoke/src/main.ts Registers the new Chat Sandbox smoke suite for Electron non-remote runs.
test/smoke/src/areas/chat/chatSandbox.test.ts New Linux/macOS smoke suite that drives chat tool calls to validate terminal sandbox filesystem + network restrictions.

Review details

  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Low

Comment thread test/smoke/src/areas/chat/chatSandbox.test.ts Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@dileepyavan
Dileep Yavanmandha (dileepyavan) marked this pull request as ready for review July 9, 2026 00:44
@dileepyavan
Dileep Yavanmandha (dileepyavan) merged commit 1dc485d into microsoft:main Jul 9, 2026
29 checks passed
@vs-code-engineering vs-code-engineering Bot added this to the 1.129.0 milestone Jul 9, 2026
Giuseppe Cianci (Giuspepe) added a commit that referenced this pull request Jul 12, 2026
The macOS Seatbelt sandbox smoke tests added in #324848 are flaky on the
CI runners; maintainers have already skipped two of them (#325101, #325343).
'allows reading a home directory file configured in allowRead' fails
deterministically on the macOS smoke runner for unrelated PRs (it exercises
the terminal Seatbelt sandbox, not touched by this branch), so skip it too
until the underlying flakiness (#325266) is resolved.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Giuseppe Cianci (Giuspepe) added a commit that referenced this pull request Jul 12, 2026
The macOS Seatbelt sandbox smoke tests added in #324848 are flaky on the
CI runners; maintainers have already skipped two of them (#325101, #325343).
'allows reading a home directory file configured in allowRead' fails
deterministically on the macOS smoke runner for unrelated PRs (it exercises
the terminal Seatbelt sandbox, not touched by this branch), so skip it too
until the underlying flakiness (#325266) is resolved.

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.

Add smoke test coverage for sandboxing in local harness.

4 participants