Skip to content

fix(codegraph): resolve safe Windows npm entry - #1

Draft
MarsSall wants to merge 1 commit into
fix/codegraph-runner-foundationfrom
fix/windows-codegraph-npm-entry
Draft

fix(codegraph): resolve safe Windows npm entry#1
MarsSall wants to merge 1 commit into
fix/codegraph-runner-foundationfrom
fix/windows-codegraph-npm-entry

Conversation

@MarsSall

Copy link
Copy Markdown
Owner

Draft dependency

Depends on upstream PR Gentleman-Programming#163.

This fork-local Draft keeps the second review slice visible with a clean diff while Gentleman-Programming#163 is under review. It must not be merged independently. After Gentleman-Programming#163 merges, this branch will be proposed to Gentleman-Programming/gentle-pi:main as the official follow-up PR.

Tracks Gentleman-Programming#160.

Summary

  • Resolve the globally installed CodeGraph npm entry safely on Windows.
  • Execute it through process.execPath without shell: true, cmd, or PowerShell.
  • Preserve argument boundaries, cancellation, workspace confinement, and output-buffer limits.
  • Reject malformed package metadata, unsafe bin paths, non-regular entries, and escaping symlinks.

Changes

File Change
extensions/codegraph-tools.ts Adds safe Windows npm package-entry resolution and process.execPath dispatch.
tests/codegraph-tools.test.ts Covers Windows dispatch, argv safety, unavailable behavior, malformed metadata, traversal, symlinks, and deterministic Unix behavior.

Test plan

  • node --experimental-strip-types --test tests/codegraph-tools.test.ts — 14/14 passing on Windows.
  • git diff --check passed.
  • Independent bounded reliability review approved.

Chain Context

Field Value
Chain Windows CodeGraph runner
Position 2 of 2
Base fix/codegraph-runner-foundation
Depends on Gentleman-Programming#163
Follow-up Official upstream PR after Gentleman-Programming#163 merges
Review budget 234 / 400 changed lines
Starts at PR1 commit 1b6aea11
Ends with Complete Windows CodeGraph fix

Chain Overview

upstream/main
 └── Gentleman-Programming/gentle-pi#163
      └── 📍 This fork-local Draft: Windows npm entry resolution

Scope

Autonomy

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.

1 participant