Add coverage for Copilot CLI node-pty shimming #314648
Merged
anthonykim1 merged 3 commits intomainfrom May 6, 2026
Merged
Conversation
Contributor
|
Base:
|
Contributor
There was a problem hiding this comment.
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.txtalready 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
rzhao271
approved these changes
May 6, 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.
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.extensionPathfrom VS CodeappRoot.copyNodePtyFiles()directly verifiespty.nodeandspawn-helperland innode_modules/@github/copilot/sdk/prebuilds/<platform>-<arch>.shims.txtskip 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.