Skip to content

windows: add raw process command preparation#29983

Draft
anp-oai wants to merge 1 commit into
codex/pr3-04-elevated-runnerfrom
codex/pr3-05-command-preparation
Draft

windows: add raw process command preparation#29983
anp-oai wants to merge 1 commit into
codex/pr3-04-elevated-runnerfrom
codex/pr3-05-command-preparation

Conversation

@anp-oai

@anp-oai anp-oai commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Intent

Replacing Tokio's Windows pipe spawn path safely requires preserving the existing std::process::Command contract for executable lookup, batch dispatch, quoting, environment construction, and working-directory handling.

Implementation

  • Port the relevant Rust standard-library Windows command preparation under its MIT/Apache licensing.
  • Resolve executables using the child PATH first and preserve the current .exe suffix and search order.
  • Route .cmd and .bat files through cmd.exe with Windows-compatible argument escaping.
  • Build case-insensitive, sorted, double-null-terminated Unicode environment blocks.
  • Normalize and validate the current directory.
  • Add focused command-preparation unit tests; this module remains test-only until the next PR activates the raw launcher.

Manual validation

  • Cross-compiled the codex-utils-pty Windows test target with cargo +1.95.0 check --target x86_64-pc-windows-msvc -p codex-utils-pty --tests.

Stack

1. job primitives2. local ConPTY3. restricted sessions4. elevated runner5. command preparation6. raw pipe launcher7. command parity

@anp-oai anp-oai force-pushed the codex/pr3-05-command-preparation branch from 24d6479 to d050472 Compare June 25, 2026 04:26
@anp-oai anp-oai force-pushed the codex/pr3-04-elevated-runner branch from 6d50418 to 27d1e6a Compare June 25, 2026 04:26
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