Move tool registry plan tests into codex-tools (#16521)

## Why

#16513 moved pure tool-registry planning into `codex-tools`, but much of
the corresponding spec/feature-gating coverage still lived in
`codex-core`. That leaves the tests for planner behavior in the crate
that no longer owns that logic and makes the next extraction steps
harder to review.

## What

Move the planner-only `spec_tests.rs` coverage into
`codex-rs/tools/src/tool_registry_plan_tests.rs` and wire it up from
`codex-rs/tools/src/tool_registry_plan.rs` using the crate-local `#[path
= "tool_registry_plan_tests.rs"] mod tests;` pattern.

The `codex-core` test file now keeps the core-side integration checks:
router-visible model tool lists, namespaced handler alias registration,
shell adapter behavior, and MCP schema edge cases that still exercise
the `core` binding layer.

## Verification

- `cargo test -p codex-tools`
- `cargo test -p codex-core tools::spec::tests`
This commit is contained in:
Michael Bolin
2026-04-02 00:26:51 -07:00
committed by GitHub
parent 828b837235
commit 5131e0de45
3 changed files with 1882 additions and 1848 deletions

View File

@@ -486,3 +486,7 @@ pub fn build_tool_registry_plan(
plan
}
#[cfg(test)]
#[path = "tool_registry_plan_tests.rs"]
mod tests;