Skip to content

refactor(plugin): preserve Windows filenames in native helpers - #798

Open
kmbroai wants to merge 4 commits into
dev/kyleb/python-free-native-packagingfrom
dev/kyleb/python-free-windows-wide-paths
Open

refactor(plugin): preserve Windows filenames in native helpers#798
kmbroai wants to merge 4 commits into
dev/kyleb/python-free-native-packagingfrom
dev/kyleb/python-free-windows-wide-paths

Conversation

@kmbroai

@kmbroai kmbroai commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

Preserve Windows filenames when replacing Python path handling with TypeScript. Node can replace lone UTF-16 surrogates in arguments, environment variables, and directory names, so helpers need the original Windows values.

Stacked on #797.

Changes

  • Add native access to original arguments, environment values, absolute paths, and directory entries as UTF-16LE buffers.
  • Preserve cached directory attributes and symbolic-link tags so inventory can distinguish directory symlinks from junctions without opening unrelated files.
  • Add a typed filesystem adapter using the existing Windows handles, including canonical paths, metadata, bounded reads, output writes, and recursive directory creation. Path normalization follows CPython's Windows behavior, including UNC/device prefixes and drive-relative paths.
  • Exercise surrogate and replacement-character filenames, verbatim and long paths, inaccessible unrelated files, directory links, and process values through a Rust-launched Windows proof. The test executable is excluded from uploaded runtime artifacts.

Testing

  • On the rebased head: TypeScript compilation, SDK/MCP types, formatting, Rust formatting, Ruff, portable source checks, and all nine checker tests passed.
  • A fresh Linux native build and behavioral proof passed. The Windows implementation is unchanged by the rebase; earlier 5,545 C-normalizer comparisons per Node version are recorded in the PR history.
  • Actual Windows x64/arm64 execution remains a hosted CI gate.

Risk and rollout

This prepares the following helper migration. It adds native operations without changing existing command routing or public CLI syntax. Windows CI must validate the updated native library and process proofs before merge.

Public disclosure review

  • No customer, partner, prospect, or user identities, data, or identifying details are included.
  • No credentials, personal data, private source, scan findings, or nonpublic links or tickets are included.
  • I reviewed the branch name, title, description, commits, changes, comments, logs, screenshots, attachments, and links for public disclosure.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review Completed 2026-09-03T19:21:11.374559Z 0f1995a New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@kmbroai
kmbroai force-pushed the dev/kyleb/python-free-windows-wide-paths branch from 98e64e2 to f5bfd66 Compare September 3, 2026 18:27
@kmbroai
kmbroai force-pushed the dev/kyleb/python-free-windows-wide-paths branch from f5bfd66 to 0f1995a Compare September 3, 2026 19:17
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