mirror of
https://github.com/openai/codex.git
synced 2026-09-17 12:23:33 +00:00
1.2 KiB
1.2 KiB
Rust/codex-rs
In the codex-rs folder where the rust code lives:
- Never add or modify any code related to
CODEX_SANDBOX_NETWORK_DISABLED_ENV_VARorCODEX_SANDBOX_ENV_VAR.- You operate in a sandbox where
CODEX_SANDBOX_NETWORK_DISABLED=1will be set whenever you use theshelltool. Any existing code that usesCODEX_SANDBOX_NETWORK_DISABLED_ENV_VARwas authored with this fact in mind. It is often used to early exit out of tests that the author knew you would not be able to run given your sandbox limitations. - Similarly, when you spawn a process using Seatbelt (
/usr/bin/sandbox-exec),CODEX_SANDBOX=seatbeltwill be set on the child process. Integration tests that want to run Seatbelt themselves cannot be run under Seatbelt, so checks forCODEX_SANDBOX=seatbeltare also often used to early exit out of tests, as appropriate.
- You operate in a sandbox where
Before creating a pull request with changes to codex-rs, run just fmt (in codex-rs directory) to format the code and just fix (in codex-rs directory) to fix any linter issues in the code, ensure the test suite passes by running cargo test --all-features in the codex-rs directory.
When making individual changes prefer running tests on individual files or projects first.