Skip to content

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

Open
kmbroai wants to merge 6 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 6 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. Helpers receive original UTF-16 arguments, environment values, directory names, and paths, including lone surrogates.

Changes

  • Use std::fs::read_dir and cached entry types for one typed directory enumerator, preserving raw names and numeric Windows errors.
  • Delegate absolute paths to Rust std::path::absolute, preserving native errors and the existing empty-input result. Normalize verbatim paths below their drive or share root, including doubled separators and parent traversal.
  • Use the existing handles for metadata, reads, writes, and directory creation. Retain raw process-value transport.
  • Use Rust-created surrogate fixtures to test the adapter. A held file-sharing guard verifies enumeration succeeds while a data read fails.

Testing

  • After the Windows File integration: both MSVC-target Clippy checks, CI-tool compilation, proof syntax, Rust/TypeScript formatting, workflow lint, Ruff, portable source checks, and all nine checker tests passed.
  • Twelve normalization cases passed on Node 20.0.0 and 22.13.0, including doubled separators under drive and UNC roots.
  • Windows CI runs the actual filesystem and process proofs on x64 and arm64 with both Node versions. The SDK minimum remains 22.13.0; Node 20 is an additional native compatibility check.

Risk and rollout

Stacked on #797. Adds native operations without changing command routing or public CLI syntax. Junction directory entries now carry Rust's directory and symbolic-link flags; the following resolver still excludes their traversal. Sharing restrictions do not block attribute-only requests, so the proof checks a data read without changing product stat access.

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-05T01:28:16.520904Z b3609d5 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
Comment thread plugins/codex-security/native/windows-files.mts Outdated
Comment thread plugins/codex-security/native/src/windows.rs
Comment thread plugins/codex-security/native/src/windows.rs Outdated
Comment thread plugins/codex-security/native/examples/windows-wide-launcher.rs Outdated
@kmbroai
kmbroai force-pushed the dev/kyleb/python-free-windows-wide-paths branch from 0f1995a to 08a2ac5 Compare September 4, 2026 22:44
@kmbroai
kmbroai force-pushed the dev/kyleb/python-free-windows-wide-paths branch from 08a2ac5 to 6014da9 Compare September 4, 2026 23:39

@mldangelo-oai mldangelo-oai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed the exact current head after the latest fixes. The four earlier threads are resolved. I found one remaining Windows path correctness bug and two nonblocking simplifications.

Comment thread plugins/codex-security/native/windows-files.mts Outdated
Comment thread plugins/codex-security/native/src/windows.rs Outdated
Comment thread plugins/codex-security/native/proof-windows-wide.mts Outdated
@kmbroai
kmbroai force-pushed the dev/kyleb/python-free-windows-wide-paths branch from 6014da9 to c58c6d0 Compare September 5, 2026 00:51
@kmbroai
kmbroai force-pushed the dev/kyleb/python-free-windows-wide-paths branch from c58c6d0 to b3609d5 Compare September 5, 2026 01:22
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.

2 participants