core-agent-ide/codex-rs/utils/cargo-bin
Charley Cunningham 7ba1fccfc1
fix(ci): restore guardian coverage and bazel unit tests (#13912)
## Summary
- restore the guardian review request snapshot test and its tracked
snapshot after it was dropped from `main`
- make Bazel Rust unit-test wrappers resolve runfiles correctly on
manifest-only platforms like macOS and point Insta at the real workspace
root
- harden the shell-escalation socket-closure assertion so the musl Bazel
test no longer depends on fd reuse behavior

## Verification
- cargo test -p codex-core
guardian_review_request_layout_matches_model_visible_request_snapshot
- cargo test -p codex-shell-escalation
- bazel test //codex-rs/exec:exec-unit-tests
//codex-rs/shell-escalation:shell-escalation-unit-tests

Supersedes #13894.

---------

Co-authored-by: Ahmed Ibrahim <aibrahim@openai.com>
Co-authored-by: viyatb-oai <viyatb@openai.com>
Co-authored-by: Codex <noreply@openai.com>
2026-03-08 12:05:19 -07:00
..
src feat: experimental flags (#10231) 2026-02-02 11:06:50 +00:00
BUILD.bazel fix(ci): restore guardian coverage and bazel unit tests (#13912) 2026-03-08 12:05:19 -07:00
Cargo.toml [bazel] Improve runfiles handling (#10098) 2026-01-29 00:15:44 +00:00
README.md [bazel] Improve runfiles handling (#10098) 2026-01-29 00:15:44 +00:00
repo_root.marker [bazel] Improve runfiles handling (#10098) 2026-01-29 00:15:44 +00:00

codex-utils-cargo-bin runfiles strategy

We disable the directory-based runfiles strategy and rely on the manifest strategy across all platforms. This avoids Windows path length issues and keeps behavior consistent in local and remote builds on all platforms. Bazel sets RUNFILES_MANIFEST_FILE, and the codex-utils-cargo-bin helpers use the runfiles crate to resolve runfiles via that manifest.

Function behavior:

  • cargo_bin: reads CARGO_BIN_EXE_* environment variables (set by Cargo or Bazel) and resolves them via the runfiles manifest when RUNFILES_MANIFEST_FILE is present. When not under runfiles, it only accepts absolute paths from CARGO_BIN_EXE_* and returns an error otherwise.
  • find_resource!: used by tests to locate fixtures. It chooses the Bazel runfiles resolution path when RUNFILES_MANIFEST_FILE is set, otherwise it falls back to a CARGO_MANIFEST_DIR-relative path for Cargo runs.

Background: