Skip to content

Stage Windows primitive; OPE2-00126/00127 protect production#263

Merged
andrei-hasna merged 16 commits into
mainfrom
task/367c9ec3-windows-launch-primitive
Jul 19, 2026
Merged

Stage Windows primitive; OPE2-00126/00127 protect production#263
andrei-hasna merged 16 commits into
mainfrom
task/367c9ec3-windows-launch-primitive

Conversation

@andrei-hasna

@andrei-hasna andrei-hasna commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Why

Windows package-manager shims are batch programs; executing arbitrary batch content would reinterpret user arguments. This PR supplies narrowly recognized native launch-plan groundwork without a generic shell fallback.

This remains staged only: OPE2-00126 and OPE2-00127 must adopt the primitive before production Claude or ACP launches are protected.

Exact accepted scope

  • Exact static cmd-shim@9.0.2 Node and direct-executable templates, plus exact legacy cmd-shim@5.0.0/Corepack template spacing only.
  • Local node_modules/.bin shims may use one bounded leading .. and must canonicalize beneath that parent node_modules; prefix/global shims must begin node_modules and stay under the shim parent.
  • No generic cmd-shim compatibility is claimed: shebang arguments, target environment-variable expansion, malformed grammar, dot/repeated-separator paths, device/verbatim ambiguity, escapes, and reparse escapes fail closed.
  • node.exe resolution is source-environment-PATH only. COMSPEC is ignored and no command string or cmd.exe is executed.

Validation

  • just test-fast -p codex-external-agent (44 passed)
  • just check-fast -p codex-external-agent
  • Bazel Windows gnullvm library build: bazel build //codex-rs/external-agent:external-agent --platforms=//:windows_x86_64_gnullvm
  • just fix -p codex-external-agent, then just fmt
  • Staged and PR-range Gitleaks scans clean

The local host cannot execute the Windows test target because it lacks a Windows execution platform; exact-head Windows CI and two fresh independent parent reviews remain required before merge.

@andrei-hasna andrei-hasna changed the title Add safe Windows npm shim launch primitive Add staged Windows launch-plan API groundwork Jul 19, 2026
@andrei-hasna andrei-hasna changed the title Add staged Windows launch-plan API groundwork Stage Windows primitive; OPE2-00126/00127 protect production Jul 19, 2026
@andrei-hasna
andrei-hasna merged commit e39f43c into main Jul 19, 2026
38 of 39 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant