Skip to content

Add coverage for Copilot CLI node-pty shimming #314648

Merged
anthonykim1 merged 3 commits intomainfrom
anthonykim1/copilot-node-pty-shim-tests
May 6, 2026
Merged

Add coverage for Copilot CLI node-pty shimming #314648
anthonykim1 merged 3 commits intomainfrom
anthonykim1/copilot-node-pty-shim-tests

Conversation

@anthonykim1
Copy link
Copy Markdown
Contributor

@anthonykim1 anthonykim1 commented May 6, 2026

Resolves: #314128

This adds targeted coverage for the runtime node-pty shim regression from #313609 / #313550. The goal is to make PR checks catch the practical VSIX/Marketplace failure mode that blocked Copilot CLI shell commands in 1.118.x.

Coverage added:

  • CopilotCLISDK.ensureShims() is exercised through the real production path before SDK import.
  • The test uses a synthetic Marketplace-style layout by separating the Copilot extension extensionPath from VS Code appRoot.
  • Runtime shim materialization is asserted for both ripgrep and node-pty under the SDK expected locations.
  • copyNodePtyFiles() directly verifies pty.node and spawn-helper land in node_modules/@github/copilot/sdk/prebuilds/<platform>-<arch>.
  • The existing shims.txt skip behavior is covered without changing marker semantics.

This intentionally stays lighter than installing an actual VSIX in CI: it runs in the existing Copilot Vitest/unit PR checks (Copilot - Test) while still covering the runtime copy path that broke the marketplace-installed extension route.

@anthonykim1 anthonykim1 added this to the 1.120.0 milestone May 6, 2026
@anthonykim1 anthonykim1 self-assigned this May 6, 2026
Copilot AI review requested due to automatic review settings May 6, 2026 05:24
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

Base: ffb86233 Current: 7cdb4c92

No screenshot changes.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds unit test coverage in the Copilot CLI node test suite to guard against regressions in runtime shimming for ripgrep and node-pty (tracked in #314128), ensuring marketplace install layouts keep working.

Changes:

  • Adds a new Vitest spec that sets up a synthetic VS Code appRoot + extensionPath tree and asserts ripgrep/node-pty files are copied into the SDK’s expected shim locations.
  • Adds a test case to verify shim creation is skipped when shims.txt already exists.
Show a summary per file
File Description
extensions/copilot/src/extension/chatSessions/copilotcli/node/test/copilotCliShims.spec.ts New unit tests covering Copilot CLI shim materialization + shims.txt skip behavior.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 2

@anthonykim1 anthonykim1 marked this pull request as ready for review May 6, 2026 16:28
@anthonykim1 anthonykim1 merged commit f561081 into main May 6, 2026
26 checks passed
@anthonykim1 anthonykim1 deleted the anthonykim1/copilot-node-pty-shim-tests branch May 6, 2026 17:14
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 coverage for Copilot CLI node-pty shimming

3 participants