Skip to content

refactor(plugin): add Python-free Windows OS primitives - #795

Open
kmbroai wants to merge 4 commits into
dev/kyleb/python-free-unix-primitivesfrom
dev/kyleb/python-free-windows-primitives
Open

refactor(plugin): add Python-free Windows OS primitives#795
kmbroai wants to merge 4 commits into
dev/kyleb/python-free-unix-primitivesfrom
dev/kyleb/python-free-windows-primitives

Conversation

@kmbroai

@kmbroai kmbroai commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add the Windows OS primitives needed for TypeScript to replace the Python filesystem and locking helpers.

Changes

  • Use Rust File to own Windows handles and provide ordinary I/O, cursor-preserving truncation, flush, and exclusive whole-file locks. Keep Win32 metadata, identity, paths, and exact-handle rename/deletion. Preserve raw UTF-16 paths and numeric Windows errors, including closed-handle error 6 and contention error 33.
  • Split the native crate into Unix and Windows modules, retaining the existing Unix implementation.
  • Add x64 and arm64 Windows artifact jobs with Node 20.0 and 22.13 proofs for directory sharing, junctions, handle lifetime, and cross-process locks.

Testing

  • Both x64 and arm64 MSVC-target Clippy checks, Rust formatting, CI-tool compilation, proof syntax, Prettier, actionlint, Ruff, portable source checks, and all nine checker tests passed locally.
  • Windows proofs cover I/O errors, cursor/EOF behavior, handle lifetime, whole-file contention, and unlock/close/process-death release. A separate Node 22 invocation compares both directions against the existing Python completion-lock functions.
  • Actual x64/arm64 Windows execution on Node 20.0 and 22.13, including the optional Python comparison, remains a hosted CI gate for this head.

Risk and rollout

Stacked on #794. This is opt-in preparation; product commands do not use the new bindings yet. Universal package assembly and successful native Windows proofs are required before the TypeScript callers replace Python.

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:19:36.048264Z 7eaffc5 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.

@mldangelo-oai

Copy link
Copy Markdown
Collaborator

Reviewed 90e2987. The native Windows x64 and arm64 proofs pass, and I found no actionable binding issues.

Holding approval for the Windows package verification timeout. The log reports successful installed-package validation before the outer smoke process hits its 210-second timeout. Please rerun this job on the reviewed head. If it repeats, investigate smoke-process exit and cleanup; the log alone does not establish a native-binding regression.

@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.

The Windows package verification rerun passed on the unchanged reviewed head, clearing my earlier hold. Both native Windows x64 and arm64 proofs pass. No actionable findings in the binding changes.

@kmbroai
kmbroai force-pushed the dev/kyleb/python-free-windows-primitives branch from 90e2987 to bcb8393 Compare September 3, 2026 18:27
@kmbroai
kmbroai force-pushed the dev/kyleb/python-free-windows-primitives branch from bcb8393 to 50b7aa2 Compare September 3, 2026 19:05
@kmbroai
kmbroai force-pushed the dev/kyleb/python-free-windows-primitives branch from 50b7aa2 to 93d63aa Compare September 4, 2026 23:32

@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.

The exact-head Windows proofs are green; this is a non-blocking simplification follow-up.

Comment thread plugins/codex-security/native/src/windows.rs Outdated
@kmbroai
kmbroai force-pushed the dev/kyleb/python-free-windows-primitives branch from 93d63aa to 7eaffc5 Compare September 5, 2026 01:15
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