Repository navigation
Install TypeScript LSP from a pinned npm lockfile - #79888
Conversation
Co-authored-by: Copilot App <[email protected]>
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ PR Code Quality Reviewer completed the code quality review. PR Code Quality ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Specification Reviewer completed successfully! PR Specification ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Found two blocking issues in the bundled TypeScript LSP install:
- The embedded npm lockfile omits the language server transitive runtime dependencies, so
npm cicannot reliably produce a working server. - The Windows path branch invokes
wslpathfrom a Git Bash step, which is not guaranteed to exist and will fail underset -e.
Static review only; repository tests were not run per review instructions.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~4 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again
Comment MemoryPeek at saved memory (spec-review-history)History |
🏗️ Design Decision Gate — ADR RequiredThis PR makes significant changes to core business logic (166 added lines under 📄 Draft ADR committed:
📋 What to do next
Once an ADR is linked in the PR body, this gate will re-run and verify the implementation matches the decision. 🔍 Evidence and open itemsChecked: the PR has no Decision: install the built-in TypeScript language server with Open
❓ Why ADRs Matter
ADRs create a searchable, permanent record of why the codebase looks the way it does. Future contributors (and your future self) will thank you. References: §44950599438
|
Comment MemoryPeek at saved memory (review-history)History |
There was a problem hiding this comment.
🟡 Changes recommended
The Windows WSL installer does not forward runner-provided npm registry and credential settings, so installs can fail when only an authenticated mirror is accessible.
3 open issues
1 file not reviewed
pkg/workflow/lsp/typescript/package-lock.json: Generated file
What changed in this PR
Replaces gh-aw’s generated global TypeScript LSP install with a lockfile-based install for Copilot workflows, addressing the reported code-scanning concerns.
Changes:
- Bundles exact TypeScript and language-server versions with SHA-512 integrity metadata and installs them using
npm ci. - Stages binaries in an isolated runner directory and restores their PATH during Copilot startup.
- Restricts built-in server version overrides and updates tests, schema descriptions, and migration guidance.
| File | Description |
|---|---|
pkg/workflow/lsp/typescript/package.json |
Pins both TypeScript dependencies. |
pkg/workflow/lsp/typescript/package-lock.json |
Locks package downloads and integrity hashes. |
pkg/workflow/lsp/typescript/.npmrc |
Configures the bundled npm project’s registry. |
pkg/workflow/lsp_validation.go |
Enforces the bundled server version. |
pkg/workflow/lsp_validation_test.go |
Tests accepted versions and custom-server migration. |
pkg/workflow/lsp_typescript.go |
Embeds npm files and generates isolated installation and PATH setup. |
pkg/workflow/lsp_manager.go |
Routes TypeScript through the locked installer and shares npm policy handling. |
pkg/workflow/lsp_manager_test.go |
Updates installation and version-override assertions. |
pkg/workflow/copilot_engine_execution.go |
Restores the staged LSP PATH before execution. |
pkg/workflow/copilot_engine_execution_test.go |
Checks generated PATH restoration. |
pkg/parser/schemas/main_workflow_schema.json |
Clarifies version-override restrictions. |
docs/src/content/docs/reference/glossary.md |
Documents locked installation and custom-version migration. |
CHANGELOG.md |
Records the breaking compatibility change. |
.github/aw/lsp.md |
Updates installation details and the custom-server example. |
.changeset/lock-typescript-lsp.md |
Adds major-release notes and migration guidance. |
Review effort: Max (adaptive)
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /diagnosing-bugs and /codebase-design. Requesting changes on one likely Windows break and one dead file. The pinned-lockfile direction is sound.
📋 Key Themes & Highlights
Key Themes
- Dead artifact:
pkg/workflow/lsp/typescript/.npmrcis never embedded or copied, and it commits an internal registry URL. - Untested Windows branch: the
wslpathpath inlsp_typescript.goruns in ashell: bashstep with no test coverage. - Scope creep: the
sorttoslicesswap inlsp_manager.gois unrelated to this PR.
Positive Highlights
- ✅ Pinning
typescriptandtypescript-language-serverthrough an embedded lock withnpm ciremoves the floatingnpm install -grisk. - ✅ The breaking
lsp.typescript.versionrestriction has a clear error message, amajorchangeset, and tests inlsp_validation_test.go. - ✅ The PATH restore is covered by
copilot_engine_execution_test.go.
Unverified
- I could not confirm that
[email protected]has zero transitive dependencies or that the lock integrity hashes match the registry. The sandbox rejects the registry TLS certificate. The lock lists no nested packages, so please confirm withnpm cion a clean runner.
@copilot please address the review comments above.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~9 AIC · ⌖ ~2 AIC · ⊞ 6.6K
Comment /matt to run again
Co-authored-by: Copilot App <[email protected]>
|
In response to comment 7069356754: I addressed the Windows path finding, clarified why the npm config is kept for local maintenance, and explained the linter requirement in the sorting thread. |
|
In response to comment 7069358365: I addressed both inline findings: the Windows installer now supports both path converters, and a clean install confirmed the two-package lockfile is complete. |
|
In response to comment 7069358401: This status update has no separate change request. I addressed the concrete findings in their inline threads. |
|
In response to comment 7069359094: No separate change was requested here. The follow-up adds focused coverage for Windows path handling and npm configuration forwarding. |
|
In response to comment 7069359352: No separate change was requested by this review summary. |
|
In response to comment 7069360143: I completed the ADR draft from 603cb1d and linked it in the PR body. Its status remains Proposed pending maintainer review. |
|
In response to comment 7069427936: This is a review history record, not a change request; the ledger is unchanged. |
|
In response to comment 7069435029: I completed and linked ADR-79888 in the PR body, including the lockfile rationale, alternatives, and migration path. The ADR remains Proposed rather than claiming maintainer approval. |
|
In response to comment 7069435810: This is a review history record; I left it unchanged and replied to the code-quality findings in their inline threads. |
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>


The generated TypeScript LSP setup uses
npm install -g, which does not enforce a lockfile. This is the compiler-side fix for code-scanning alerts 1082, 1083, and 1084.The compiler now embeds the full SHA-512-verified npm lockfile and emits
npm ciin an isolated runner directory. The install honors the runner's npm registry and keeps the language server and TypeScript binaries onPATH. On Windows, the compiler forwards npm settings to the built-in WSL installer without adding them to agent steps.Compatibility: The experimental built-in
lsp.typescriptentry now accepts only the bundled server version (4.3.3). To use another version, move the entry tolsp.typescript-custom, install from a checked-in npm lockfile inpre-agent-steps, and pointcommandto the installed executable.Validation: Focused Go and parser tests and ShellCheck passed. The installed server initialized with TypeScript 5.8.3 in an empty workspace. Windows-specific regression tests cover WSL and Git Bash path conversion and a registry override from an earlier step; no live Windows workflow was run. The original full compile covered all 370 workflows and identified drift in
eslint-miner,jsweep, andsmoke-copilot. This PR leaves their generated locks unchanged for regeneration after SDK integration. No workflows were dispatched and no alert states were changed.ADR: ADR-79888: Install TypeScript LSP from a Pinned npm Lockfile