codex-rs: grep_files tests fail due unknown test-model fallback; unified_exec test races end event

Resolved 💬 1 comment Opened Feb 12, 2026 by yash27-lab Closed Feb 13, 2026

Summary

I hit three failing tests in codex-rs on main while validating local changes:

  • suite::grep_files::grep_files_tool_collects_matches
  • suite::grep_files::grep_files_tool_reports_empty_results
  • suite::unified_exec::unified_exec_emits_one_begin_and_one_end_event

(related closed PR context: https://github.com/openai/codex/pull/11648)

Reproduction

From repo root:

cd codex-rs
cargo test -p codex-core --test all suite::grep_files::grep_files_tool_collects_matches -- --nocapture
cargo test -p codex-core --test all suite::grep_files::grep_files_tool_reports_empty_results -- --nocapture
cargo test -p codex-core --test all suite::unified_exec::unified_exec_emits_one_begin_and_one_end_event -- --nocapture

Observed failures:

  • grep_files tests fail with:
  • assertion 'left == right' failed: content: unsupported call: grep_files
  • unified_exec test intermittently fails with:
  • expected end event for the write_stdin call
  • end events count is 0.

Analysis

1) grep_files tests depend on an unknown test model slug

core/tests/suite/grep_files.rs uses:

  • MODEL_WITH_TOOL = "test-gpt-5.1-codex"

This slug is not present in core/models.json.

When the slug is unknown, model_info_from_slug fallback in:

  • core/src/models_manager/model_info.rs

sets:

  • experimental_supported_tools: []

Then grep_files is never registered because tool registration in:

  • core/src/tools/spec.rs

gates on experimental_supported_tools containing "grep_files".

Result: tool call is treated as unsupported during the test.

2) unified_exec event test appears race-prone

core/tests/suite/unified_exec.rs currently stops event collection as soon as TurnComplete is seen.

ExecCommandEnd for the unified-exec session can be emitted by the async exit watcher shortly after, so depending on timing the loop can exit before end-event arrival.

Result: flaky end_events.len() == 0 assertion.

Suggested direction

  • For grep_files tests:
  • avoid relying on unknown-slug fallback behavior for tool availability;
  • explicitly provide model metadata in-test (or use a known model slug with explicit test setup) that includes experimental_supported_tools entries expected by the suite.
  • For unified_exec test:
  • keep waiting for ExecCommandEnd with a timeout even after TurnComplete is seen.

Environment

  • macOS (Apple Silicon)
  • Rust toolchain: stable via repo toolchain

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗