Repository navigation
feat(codex): add proof-bound Windows CLI update planning - #7596
Conversation
(cherry picked from commit ad1bb33)
(cherry picked from commit a38c1a0)
(cherry picked from commit 25b698e)
(cherry picked from commit be9df8a)
…imes (cherry picked from commit f33757a)
Carry only the request-id, POSIX job-store and status usage hunks from 86ad5a0; Windows read-only plan tests remain separate.
(cherry picked from commit 7db5a1e)
(cherry picked from commit 1c61f31)
(cherry picked from commit 951e594)
(cherry picked from commit b1dc856)
…lans Port the Windows-plan hunks of 44353b9, 86ad5a0 and c291ff8 onto the 7586 POSIX stack head 4c22308. A proof-captured absolute standard npm codex.cmd shim, its global-prefix package, prefix-local Node/npm and the prefix-local optional backing are bound by held-handle identity re-verification; the plan then reports applicable: false with refusal windows_apply_disabled. PATH-only selection and separate-prefix Node stay refused; Windows apply remains disabled. The independent cli-installation-targets refused-probe fix (#7577) is intentionally not included.
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Bounded Windows installation provenance src/codex/cli-install-provenance.ts, src/codex/cli-installation-identity.ts, src/codex/cli-installation-limits.ts, src/codex/cli-windows-plan-provenance.ts, src/codex/windows-installation-files.ts, structure/runtime.md, structure/codex-cli-update.md |
Inspection validates a proof-captured standard npm codex.cmd selection and observes its prefix-local package, Node, npm, and platform backing. Held handles reject reparses. Hash-only observations use the shared 1 GiB limit. |
Read-only Windows update planning src/codex/cli-update-artifacts.ts, src/codex/cli-update-plan.ts, src/codex/cli-update-apply.ts, src/codex/cli-update-job-execution.ts |
The planner queries target metadata using the observed Node/npm toolchain and rechecks its identity. A resolved Windows plan has applicable: false and refusal windows_apply_disabled. Windows apply remains disabled. |
Windows behavior validation and documentation tests/codex-integration/codex-cli-windows-plan.test.ts, tests/codex-integration/codex-cli-windows-installation-files.test.ts, tests/cli/cli-codex-cli-update.test.ts, tests/codex-integration/codex-cli-update-artifacts.test.ts, scripts/test-layout/layout-codex-collision.json, tests/fixtures/test-layout-expected.json, docs-site/src/content/docs/*/reference/cli* |
Tests cover supported inspection and planning, identity changes, size limits, and refusal paths. Translated documentation describes supported and deferred Windows layouts. |
Priority:
Estimated code review effort: 4 (Complex) | ~45 minutes
Change: Feature
Sequence Diagram(s)
sequenceDiagram
participant Selection as Proof-captured codex.cmd selection
participant Provenance as Windows installation provenance
participant Files as Windows installation file inspection
participant Planner as Codex CLI update planner
participant Toolchain as Observed Node and npm toolchain
participant Registry as npm registry
Selection->>Provenance: Provide selected command path
Provenance->>Files: Request bounded installation-file observations
Files-->>Provenance: Return observed files and identity evidence
Provenance-->>Planner: Provide validated Windows plan evidence
Planner->>Toolchain: Query target metadata under rechecked identity
Toolchain->>Registry: Request target package metadata
Registry-->>Toolchain: Return target metadata
Toolchain-->>Planner: Return target metadata
Planner-->>Selection: Return deterministic plan with Windows apply disabled
Possibly related PRs
- lidge-jun/opencodex#7586: Defines the Codex CLI update plan, artifact, and inspection contracts extended here.
Merge Risk: 
Minimal · previous review 18895
-
The Windows runtime documentation matches the inspected behavior, so no actionable merge-blocking risk remains.
Pre-merge checks: 
5
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- 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.
Comment @coderabbitai help to get the list of available commands.
|
✅ Deterministic PR hygiene checks passed. |
# Conflicts: # scripts/test-layout/layout-codex-collision.json
…ovenance-stack-20261023
…losure is verified Holding node.exe and npm-cli.js does not cover npm's module closure or Node's executable dependencies. The default Windows plan now reports target_unresolved instead of running npm. The regression uses an npm entrypoint that requires a separate module and asserts it never runs.
|
Maintainer integration decision: merging into
Next in the stack: #7626, then #7648 (which adds the verified toolchain authority that re-enables Windows metadata). |
Rebased onto the rebased #7626 head: this single commit carries the #7648 layer delta (40 commits on codex/windows-apply-transaction-20261023). It replaces the #7596 refusal of Windows npm metadata with the verified, held toolchain authority. Supersedes #7614, #7618 and #7619, whose commits are contained in this layer. Co-authored-by: Epinephrine <luvs01@hanmail.net> Co-authored-by: JUN <243035832+lidge-jun@users.noreply.github.com>
Summary
Windows x64 CLI inspection produces a read-only update plan only for an explicitly selected supported npm installation whose prefix-local Node, npm, package and backing files pass held-identity checks.
Windows evidence is rebuilt in the Worker realm; private native handles are not cloned. The plan remains inapplicable with
windows_apply_disabled. Direct Windows apply refuses before inspection/lease acquisition. Unsupported layouts and existing API boundaries remain unchanged.Stacked on #7586 at
eec0d143d990eff3c43d5673cad30832711cf47e. Candidated662a41ed4e97d60d22a48d504921d22643a1237normally merges previous public486768f0with that refreshed parent. The parent-relative scope is 33 files (+704/-72). Retarget to dev only after the parent lands.Verification
At this refreshed head, source TypeScript, structure/INDEX consistency, generated skill surface, both layout guards (29 cases / 579 assertions) and parent-relative privacy/file-size checks passed under Bun 1.4.4. Native processes exited with both output streams at EOF and no remaining direct child. The whitespace check also passed.
d10c5c9dWindows Worker planning evidence (1 pass / 8 assertions) and affected CLI/HTTP/apply-disabled controls (3 pass / 21 assertions) remain historical source-unit evidence. The planner/Worker evidence is not a full-suite result for this refreshed head.PR CI 40177221119 passed on this exact head. Its Ubuntu lane does not establish native Windows coverage. Full cross-platform CI 40189941034 passed on this exact head: 28 jobs passed / 6 conditional jobs skipped, including all nine Windows shards, all three macOS shards and macOS control. Actual npm/vendor installation, other users, ARM64, compiled FFI behavior and explicit maintainer security acceptance remain separate conditions. Windows apply support belongs to the separate transaction child.
Checklist
Summary by CodeRabbit