Files
codex/codex-rs/core
Michael Bolin 6311cd8b59 Remove deterministic_process_ids feature to avoid duplicate codex-core builds
## Why

`codex-core` enabled `deterministic_process_ids` through a self dev-dependency.
That forced a second feature-resolved build of the same crate, which increased
compile time and test latency.

## What Changed

- Removed the `deterministic_process_ids` feature from `codex-rs/core/Cargo.toml`.
- Removed the self dev-dependency on `codex-core` that enabled that feature.
- Removed the Bazel `deterministic_process_ids` crate feature for `codex-core`.
- Added a test-only `AtomicBool` override in unified exec process-id allocation.
- Added a test-support setter for that override and re-exported it from `codex-core`.
- Enabled deterministic process IDs in integration tests via `core_test_support` ctor.

## Behavior

- Production behavior remains random process IDs.
- Unit tests remain deterministic via `cfg(test)`.
- Integration tests remain deterministic via explicit test-support initialization.

## Validation

- `just fmt`
- `cargo test -p codex-core unified_exec::`
- `cargo test -p codex-core --test all unified_exec -- --test-threads=1`
- `cargo tree -p codex-core -e features` (verified the removed feature path)
2026-02-10 18:51:47 -08:00
..
2026-02-10 23:22:55 +00:00
2026-02-10 17:25:35 -08:00

codex-core

This crate implements the business logic for Codex. It is designed to be used by the various Codex UIs written in Rust.

Dependencies

Note that codex-core makes some assumptions about certain helper utilities being available in the environment. Currently, this support matrix is:

macOS

Expects /usr/bin/sandbox-exec to be present.

When using the workspace-write sandbox policy, the Seatbelt profile allows writes under the configured writable roots while keeping .git (directory or pointer file), the resolved gitdir: target, and .codex read-only.

Linux

Expects the binary containing codex-core to run the equivalent of codex sandbox linux (legacy alias: codex debug landlock) when arg0 is codex-linux-sandbox. See the codex-arg0 crate for details.

All Platforms

Expects the binary containing codex-core to simulate the virtual apply_patch CLI when arg1 is --codex-run-as-apply-patch. See the codex-arg0 crate for details.