Skip to content

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

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

luvs01 wants to merge 50 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 CLI updates through the existing durable job admission and fresh planId checks. Hold prefix and toolchain authority before packing, installing and checking the version, then verify the installed target.

Preserve unrelated packages, shims and npm metadata in bounded shared prefixes. Unknown child lifetime or incomplete native cleanup retains ownership, lease and staging. Result-persistence retries never rerun installation.

Stacked on #7626, with #7614, #7618 and #7619 as sibling prerequisites. Current head bc08a4849543994417f5fa14c8a5c30bb6b61dd8 incorporates their refreshed heads through normal merges. It preserves the original Windows transaction while adopting the parent's asynchronous metadata/process observation, post-scan synchronous guard, opt-in content observation and handles held across awaited callbacks. No history was rewritten.

Documentation now distinguishes read-only inspection from conditional applicability and confirmed apply in English and seven translated locales. The broken confirmation link now points to the actual heading fragment.

Verification

  • Current head bc08a4849543994417f5fa14c8a5c30bb6b61dd8 is the stack fan-in: a normal-merge composition of original head fb855aa4 and refreshed parent d06d85ec, which carries current dev (0aeaf0cb), the shared Bun 1.4.4 baseline from chore(test): align Bun runner with the 1.4.4 security baseline #7627 and all refreshed siblings.
  • Runtime and configured test runner are now both Bun 1.4.4.
  • On this exact head, official Bun 1.4.4, native Windows, bun test --isolate --timeout 60000: the 18-unit fan-in suite passed 510 tests / 64 platform skips / 0 failures / 2,911 assertions, covering the Windows apply file, real child/Job ownership, offline npm fixtures, shared-prefix preservation and mutation rejection, selection fencing and result-persistence retries. One initial sparse-fixture failure was classified as missing tracked fixture materialization, corrected, and retained as evidence; it was not a source assertion regression.
  • The committed duration-table contract check passed (7 tests / 7 skips) on this head; the new 94,979 ms row for tests/codex-integration/codex-cli-update-apply.test.ts matches the measured test blob here.
  • Root tsc --noEmit, structure SSOT, skill-surface and scoped static checks all exited 0. Dependency inputs are byte-identical across the eight refreshed heads; versus dev only testRunnerBun changes to 1.4.4.
  • Exact-head full cross-platform CI run 40109207642 passed. All native test jobs passed on the first attempt; only the final aggregation job needed one rerun after its success log was followed by a runner timeout. No test shard was rerun. Maintainer security acceptance of the installation/security boundary is a separate before-merge requirement. Vendor Codex, ARM64 and another Windows user's boundary are not established by these fixtures. Shared-prefix observation remains limited to 4,096 entries, 512 MiB total and 384 MiB per file; unsafe ACL, reparse and link layouts fail closed. No live user installation, automatic rollback, account or global configuration change was performed.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Required maintainer acceptance of the installation/security boundary.

Ready for review with exact-head full CI complete. Explicit maintainer/security acceptance is still required before merge; local fixtures and source review are not deployment or merge approval.

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

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 commented Oct 24, 2026

Copy link
Copy Markdown
Collaborator Author

I’m returning this PR to draft while integrating the updated Worker parent. The Windows transaction path needs to carry the shared cancellation and final installer commit gate through that execution boundary, followed by owned native-child and transaction tests. The earlier main-realm validation does not qualify that new integration; I’ll keep the existing evidence separate from the updated candidate.

@luvs01
luvs01 marked this pull request as draft October 24, 2026 23:07

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.

1 participant