Fix TypeScript SDK driver: resolve ts-node from workspace-local node_modules/.bin#48018
Conversation
The copilot engine harness failed to spawn ts-node because it was installed
locally via npm into ${GITHUB_WORKSPACE}/node_modules/.bin/ which is not in
PATH inside the firewall container.
Change copilotSDKDriverExecArgs to use the full workspace-relative path
"${GITHUB_WORKSPACE}/node_modules/.bin/ts-node" instead of bare "ts-node"
for .ts/.mts driver files, matching how npm installs it locally.
Recompile the daily-github-docs-seo-optimizer workflow to pick up the fix.
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot do not use ts-node, node 24 runs typescript natively |
… drivers Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done. Switched
|
|
@copilot resolve the merge conflicts on this branch. |
There was a problem hiding this comment.
Pull request overview
Attempts to fix TypeScript SDK driver startup by switching execution from ts-node to native Node.js.
Changes:
- Runs
.ts/.mtsdrivers withGH_AW_NODE_EXEC. - Removes TypeScript toolchain installation.
- Recompiles the affected workflow.
Show a summary per file
| File | Description |
|---|---|
pkg/workflow/copilot_engine_execution.go |
Changes TypeScript driver execution. |
pkg/workflow/copilot_engine_installation.go |
Removes ts-node and TypeScript installation. |
pkg/workflow/copilot_engine_test.go |
Updates execution and installation assertions. |
.github/workflows/daily-github-docs-seo-optimizer.lock.yml |
Regenerates the workflow. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 4/4 changed files
- Comments generated: 3
- Review effort level: Medium
| // Node 24 runs TypeScript natively; use the same node executor as .js drivers. | ||
| return `"$GH_AW_NODE_EXEC"`, driverName |
| case "typescript": | ||
| spec.stepName = "Install GitHub Copilot SDK (TypeScript)" | ||
| spec.command = workspaceCommandPrefix + "npm install --ignore-scripts --no-save @github/copilot-sdk@" + version + " ts-node typescript" | ||
| spec.command = workspaceCommandPrefix + "npm install --ignore-scripts --no-save @github/copilot-sdk@" + version |
| if !strings.Contains(stepContent, "GH_AW_NODE_EXEC") { | ||
| t.Fatalf("Expected TypeScript SDK driver mode to use native node executor, got:\n%s", stepContent) | ||
| } |
…github-docs-seo-optimizer # Conflicts: # .github/workflows/daily-github-docs-seo-optimizer.lock.yml Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done. Merged |
|
@copilot please run the Unresolved review feedback (newest first):
|
… for engine.command: ts-node, improve tests Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Done. Three review threads addressed in commit
CI needs a human re-trigger (close/reopen PR or push from a maintainer) before merge. |
|
@copilot please run the Unresolved review feedback (newest first):
Failed checks: The branch has a follow-up response, but the review threads still appear unresolved and
|
…ime_detection.go Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Fixed the All three review threads were addressed in the prior commit (
CI needs a human re-trigger (close/reopen or push from maintainer) before merge. |
🤖 PR Triage
Rationale: Fixes a real runtime failure (ts-node not found in PATH) in the Copilot engine execution path, affecting TypeScript SDK workflows. Changes are focused (6 files, path resolution logic). CI checks are passing. Medium risk due to touching core workflow runtime code.
|
The Daily GitHub Docs SEO Optimizer failed immediately because the copilot harness tried to spawn
ts-nodeas a bare command, but npm installs it locally into${GITHUB_WORKSPACE}/node_modules/.bin/which is not in the firewall container's PATH.Changes
pkg/workflow/copilot_engine_execution.go—copilotSDKDriverExecArgsnow returns the full workspace-relative path for.ts/.mtsdrivers instead of a bare command name:pkg/workflow/copilot_engine_test.go— Updated assertion to verify the full path rather than the barets-nodename..github/workflows/daily-github-docs-seo-optimizer.lock.yml— Recompiled to pick up the fix.The install step (
npm install --ignore-scripts --no-save ... ts-node typescript) is unchanged; only the execution invocation is corrected to match where npm actually places the binary.