Repository navigation
research: evaluate a Rust prototype for native Windows support #122
Description
Problem
The production CLI supports macOS and Linux. Windows support requires more than replacing lsof: native coordination and thread locks, file identity/ownership, owner attribution, process identity, and cooperative termination need platform-specific evidence. Rust offers a shared implementation of file locking (flock on Unix and LockFileEx on Windows), but does not by itself establish safe owner identification or termination.
Experiment scope
Develop an unpublished prototype in experimental/rust/ in this repository, on an isolated branch. Keep the existing TypeScript CLI, npm artifact, supported-platform claims, JSON v1 contract, and release flow unchanged.
First increment:
- A distinctly named Rust executable with
publish = false, a pinned toolchain, and reproducible Cargo lockfile. - Only synthetic, newly created fixture files and cooperating fixture processes. No existing Codex home inputs, production session inspection, unlock command, process termination, or native file removal.
- Real cross-process exclusive lock contention/release and native-coordination ordering experiments on macOS, Linux, and Windows. Missing/busy coordination must never be reported as an unlocked production session.
- Machine-readable experimental results that explicitly state no owner attribution or safe-unlock authorization is established.
- Separate CI gates with actual Windows execution. A successful build or fixture run is not a Windows production support claim.
- Document the next gates: no-follow/reparse-point and file identity checks; SID/current-user ownership; PID/start-time and actual lock-holder attribution; cross-implementation parity with TypeScript on Unix; upstream protocol compatibility; safe cooperative Windows release/exit and transcript invariance.
Acceptance and decision
Record exact platform/toolchain evidence and limitations. Use the first prototype to decide whether a Rust helper, a full CLI replacement, or no migration is justified. This research issue remains open until the evaluation and remaining safety gates are explicitly resolved or split into follow-up issues. No npm/crates.io publication, release/tag creation, package-manager migration, force termination, or lock deletion is authorized by this experiment.
Related: #100 (holder attribution), #55 (native coordination), #26 (platform evidence). None provides Windows native support today.
Priority: P3 research. Initial unpublished fixture increments are scoped to v0.4.6 (#123, #128, #133). Remaining attribution, native-access, cooperative-recovery and migration decisions continue in milestone v0.4.7. The planning version does not imply production Windows support or a promised delivery date.
Activity
abruption commentedon Oct 13, 2026
First experiment is available in PR #123 (head
5422fd40de0e6ae76b5b72ade674b409211bef09).Rust experiment CI passed on Ubuntu 24.04 x64, macOS 15 arm64, and Windows Server 2022 x64 using Rust 1.90.0. All three ran four integration tests, formatting, Clippy, and the fixture-only CLI. Results demonstrate real cross-process contention, cooperative fixture release, missing/busy coordination as unknown, and unchanged fixture contents. The binary always reports no production support/safe-unlock authorization.
The existing TypeScript checks and 223 tests passed locally; package smoke confirms the Rust experiment is excluded from npm. This is only the initial lock-primitive feasibility increment. Actual Codex interoperability, file/process/owner identity, transcript evidence, and Windows cooperative recovery remain unimplemented. Keep this research issue open; no production Windows support or release is declared.
abruption commentedon Oct 13, 2026
The next experiment is PR #128, stacked on the initial fixture PR #123. It compares Rust standard locks and the existing TypeScript
guardedProbeOnceadapter on macOS/Linux in both directions, covering contention, cooperative release, busy/missing coordination, and file-evidence invariance.The Rust experiment CI passed all three jobs: Unix interoperation on Linux/macOS and the retained Rust-only fixture protocol on Windows. Local Rust checks and all five production npm checks also passed. Because the PR targets the experimental base branch, main-only CI and automated reviews must be rechecked after #123 is merged and #128 is retargeted; the four current successful checks are not represented as the full production gate.
Windows interoperability with actual Codex, SID/reparse-point/file identity checks, positive owner attribution, transcript evidence, and cooperative recovery remain open. No real Codex session was opened or signaled, and this does not change supported production platforms.
abruption commentedon Oct 14, 2026
Upstream source cross-check on 2026-10-14: GitHub's latest stable release remains
rust-v0.162.1. The writer-lock source at stable commit092d3acd6bec3e3a14bdc7e7a2810ab628ab759dand alpha.11 commit5425d3e625daa58eea3ad1de27c087eb3b2ffbd3has the same SHA-256:e9a49bef7540dc688de8243d6df1ee9a24cf328c082934b1352d8bebef857468.This confirms only the compared lock source, not the absence of every cooperative-release path. A complete protocol-to-guard-drop audit remains unverified. No additional Windows execution, actual Codex access, Medium-integrity run or ReFS test was performed. Previous High-integrity NTFS synthetic measurements do not establish native Windows recovery.
Draft #139 adds related attribution/liveness research evidence, but does not change Windows support or complete this issue. The remaining native attribution and cooperative recovery gates stay open in v0.4.7.
abruption commentedon Oct 18, 2026
PR #144 has merged as a974129. The evaluation and proposed W1–W7 follow-up gates are now on main. This does not implement Windows support or approve a Rust migration. Keep this issue open: native interoperability, holder attribution and cooperative-release gates remain unresolved, and follow-up units have not yet been split into issues.
abruption commentedon Oct 18, 2026
The remaining Windows evidence gates from merged PR #144 are now tracked separately:
The initial evaluation remains closed; its unresolved verification work continues in these issues under the v0.4.7 planning milestone. W4/W5 are P2 recovery gates; the supporting research is P3. No Windows product support or automatic recovery is approved. The existing TypeScript CLI remains in place; a helper or rewrite is not introduced by this split.