Skip to content

feat(codex): apply Windows CLI updates with owned transactions - #7648

Open
luvs01 wants to merge 91 commits into
codex/windows-cli-job-store-20261023from
codex/windows-apply-transaction-20261023
Open

luvs01 wants to merge 91 commits into
codex/windows-cli-job-store-20261023from
codex/windows-apply-transaction-20261023

Conversation

@luvs01

@luvs01 luvs01 commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Enable explicitly confirmed Windows x64 npm-global Codex CLI updates through durable job admission and fresh plan checks. Hold prefix and toolchain authority through packing, installation and version verification. Preserve unrelated packages, shims and npm metadata; retain ownership when child lifetime or native cleanup is uncertain. Retrying result persistence never repeats installation.

Worker completion distinguishes the installation outcome from later resource cleanup. A late Worker close releases proven resources without rewriting an ambiguous result as success. The shared selection gate fences shim install, restore and removal while a Worker commits. This remains stacked on #7626 at 6577d55.

The final test follow-up at 99778ca adds bounded diagnostics to the standalone GUI-pair test after an otherwise opaque child exit in Windows CI. It reports only a fixed failure class, exit/signal and stream-observation state; credential-bearing output remains withheld. The original assertions, product code and deadlines are unchanged. Five focused tests cover the diagnostic reader's EOF, byte-window eviction, read failure and cancellation behavior.

Verification

  • Exact-head full CI 40244408601 on 99778ca passed: 28 successful jobs / 6 conditional skips, including all nine Windows shards, macOS shards/control and the desktop checks.
  • Published-head automatic CI 40250973916 also passed on the same commit.
  • Official Windows Bun 1.4.4: the original six-file GUI batch plus diagnostic cases passed 47 tests / 371 assertions. Native processes reached terminal exit with both streams complete, no remaining direct child and verified isolated-fixture cleanup. An earlier local attempt lacked React; that input-environment failure is preserved separately.
  • The previous public 56effd8 full run failed because the GUI-pair child exited 1, not because of a timeout. The original failure has not been reproduced or attributed to a confirmed cause. The passing diagnostic candidate is useful evidence, not proof of that cause.
  • Earlier Windows plan assertion corrections and sparse-fixture path investigation remain recorded. The failed local sparse preparation was retained; the unchanged case passed with a short isolated TEMP. Current full CI covers the final source tree.
  • Earlier controlled native apply/Worker tests covered retained authority, native exit, output completion, cleanup and Worker join inside and beyond the host grace period. These are fixture results, not actual vendor-installation evidence.

Limits

Actual vendor Codex installation, another Windows user's boundary, ARM64 and compiled Worker/FFI execution remain unverified. Shared-prefix limits and rejection of unsafe ACL, reparse and link layouts remain in force. No live application, account, certificate store or global configuration changed. Maintainer acceptance of the installation/security boundary remains required before merge.

Checklist

  • Current parent and preserved transaction guards reviewed.
  • Final-head full CI passed with local and hosted evidence kept distinct.
  • GUI-pair diagnostics remain bounded and do not print credential-bearing output.
  • Installation limits and unresolved original CI failure cause are documented.
  • Final published-head automatic checks passed.
  • Maintainer installation/security review before merge.

luvs01 added 17 commits October 23, 2026 17:11
Opt-in helper for the disabled Windows CLI apply path (#2811). Starts an
explicit drive-absolute .exe via CreateProcessW(CREATE_SUSPENDED), assigns it
to an unnamed non-inheritable Job, then resumes. STARTUPINFOEXW whitelists
exactly the three owned inheritable stdio handles; output flows over a private
single-principal overlapped named pipe. Terminal proof requires the original
primary handle signaled plus a successful Job accounting query reporting zero
active processes; WAIT_FAILED, query failure, PID absence, acknowledged
termination and exit 259 are handled exactly. Installer and pack policies add
no deadline, process cap, abort kill or kill-on-close; only the version probe
keeps its existing 16 KiB / 8 s / 1 s reap policy. No consumer imports it yet;
Windows apply remains refused and ARM64 is unsupported.
…ndows-apply-transaction-20261023

# Conflicts:
#	scripts/test-layout/layout-codex-collision.json
#	structure/codex-cli-update.md
@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review: 2
  • ^dev$
  • ^preview$

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

luvs01 commented Oct 24, 2026

Copy link
Copy Markdown
Collaborator Author

There are no GUI layout or interaction changes requiring screenshots. The only gui/ paths are package.json and bun.lock, inherited from the current dev dependency baseline. The Windows transaction changes backend execution and validation; this comment records the screenshot exemption under the repository's collaborator-comment gate.

@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the enhancement New feature or request label Oct 24, 2026

luvs01 commented Oct 24, 2026

Copy link
Copy Markdown
Collaborator Author

Fixed the two Windows 3/9 fixture failures from run 40052614948 in 4b87e15aa05e0cb191098699cba450f21d7992ba.

The unsafe-store test now creates an explicit junction and verifies rejection before ledger creation. The metadata test uses a private fixture, checks applicability against the observed session state, and verifies exactly three metadata queries, no candidate/installer execution, unchanged files, and child cleanup. Production code and security checks are unchanged.

The changed cases passed under official Bun 1.4.4; the final ACL preparation change passed its affected case (31 assertions). The earlier 1.4.3 run is comparison evidence only. Independent review found the assertions stronger; its remaining fixture-ACL concern is addressed in this head. Type/privacy checks passed before the final fixture-only adjustment. Fresh hosted CI remains pending; this PR stays Draft.

Align the seven locale summaries (fr, ja, ko, ru, tr, zh-cn, zh-tw) in cli.md and cli/agents.md with the English contract: the held-bound Node/npm toolchain is prefix-local when present, otherwise the captured-PATH pair anchored to the launcher architecture; a managed Windows result classifies the observed installation layout only and does not guarantee which interpreter a later codex.cmd resolves; PATH-only selection, OpenCodex autostart wrappers, and global/vendor fallback stay deferred with apply disabled.
…48-fanin-current-parent-20261024

# Conflicts:
#	docs-site/src/content/docs/ko/reference/cli.md
#	src/codex/cli-update-apply.ts
#	src/codex/cli-windows-plan-provenance.ts
#	src/codex/windows-installation-files.ts
#	tests/codex-integration/codex-cli-update-artifacts.test.ts
#	tests/codex-integration/codex-cli-windows-plan.test.ts
luvs01 added 16 commits October 25, 2026 09:16
…-write

Move cliEntry, windowsShimContent, writeShim, ownedWrapperFingerprint, and wrapperInodeIsOurs verbatim into src/codex/shim-wrapper-write.ts so shim.ts returns under the file-size ratchet cap after the selection-gate wrappers grew it past 1246. One-directional import edge shim.ts -> shim-wrapper-write.ts; no behavior change, no new public surface.
The verbatim extraction moved windowsShimContent/writeShim out of
src/codex/shim.ts into src/codex/shim-wrapper-write.ts. Update the two
source-oracle assertions accordingly: the BOM assert and the Git-Bash
render assert now read the new module; the Windows target-discovery
asserts keep reading shim.ts since discovery stayed there. No assertion
softened or removed.
@luvs01
luvs01 marked this pull request as ready for review October 25, 2026 10:28
…48-parent6577-merge-20261026

# Conflicts:
#	tests/codex-integration/codex-cli-windows-plan.test.ts
@luvs01
luvs01 marked this pull request as draft October 25, 2026 20:17
… 56eff failure context

Diagnostic source: acd7e3aa976eadef6098f9f01cfc11951b519a16 (dev 8ebe46b lineage). Only tests/gui/gui-pair-http.test.ts is applied here; every other path is identical to parent 56effd8, so a rerun exercises the same input as the failed CI job. The rejected two-parent candidate 94b4069320343074f45820d30c739f23b7c0d887 is DO_NOT_PUBLISH: it recorded acd7 as a merge parent while excluding the dev-8ebe delta from the tree, which would let later merges misjudge that delta as already integrated.
@luvs01
luvs01 marked this pull request as ready for review October 26, 2026 01:09
@lidge-jun

Copy link
Copy Markdown
Owner

Release decision for v2.93.0: DEFERRED_POST_RELEASE. This PR is part of the Codex CLI updater stack (#7586 → #7596 → #7626 → #7648, siblings #7614/#7618/#7619), which is deferred as a whole until after v2.93.0. The evidence and the suggested landing order are in #7586 (comment).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants