From 8147a26b8caf91659533eddc331d0e8548358b5d Mon Sep 17 00:00:00 2001 From: jif-oai Date: Thu, 14 May 2026 13:24:50 +0100 Subject: [PATCH] fix simplify tools CI --- codex-rs/core/src/tools/registry.rs | 2 +- codex-rs/core/src/tools/spec_plan_tests.rs | 26 ++++++++++++---------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/codex-rs/core/src/tools/registry.rs b/codex-rs/core/src/tools/registry.rs index 0575691900..1cf0e00623 100644 --- a/codex-rs/core/src/tools/registry.rs +++ b/codex-rs/core/src/tools/registry.rs @@ -36,7 +36,7 @@ pub use codex_tools::ToolExposure; /// Typed runtime contract for locally executed tools. /// -/// Implementors provide the shared `ToolExecutor` behavior plus optional +/// Implementers provide the shared `ToolExecutor` behavior plus optional /// core-owned metadata for hooks, telemetry, tool search, and argument diffs. pub(crate) trait CoreToolRuntime: ToolExecutor { fn search_info(&self) -> Option { diff --git a/codex-rs/core/src/tools/spec_plan_tests.rs b/codex-rs/core/src/tools/spec_plan_tests.rs index 84e39e6acb..063d75e6e8 100644 --- a/codex-rs/core/src/tools/spec_plan_tests.rs +++ b/codex-rs/core/src/tools/spec_plan_tests.rs @@ -2109,18 +2109,19 @@ fn code_mode_augments_mcp_tool_descriptions_with_namespaced_sample() { &[], ); - let ResponsesApiTool { description, .. } = - find_namespace_function_tool(&tools, "mcp__sample__", "echo"); + let ToolSpec::Freeform(FreeformTool { description, .. }) = find_tool(&tools, "exec") else { + panic!("expected freeform tool"); + }; - assert_eq!( - description, - r#"Echo text + assert!(description.contains( + r#"### `mcp__sample__echo` +Echo text exec tool declaration: ```ts declare const tools: { mcp__sample__echo(args: { message: string; }): Promise; }; ```"# - ); + )); } #[test] @@ -2536,18 +2537,19 @@ fn code_mode_augments_mcp_tool_descriptions_with_structured_output_sample() { &[], ); - let ResponsesApiTool { description, .. } = - find_namespace_function_tool(&tools, "mcp__sample__", "echo"); + let ToolSpec::Freeform(FreeformTool { description, .. }) = find_tool(&tools, "exec") else { + panic!("expected freeform tool"); + }; - assert_eq!( - description, - r#"Echo text + assert!(description.contains( + r#"### `mcp__sample__echo` +Echo text exec tool declaration: ```ts declare const tools: { mcp__sample__echo(args: { message: string; }): Promise>; }; ```"# - ); + )); } fn discoverable_connector(id: &str, name: &str, description: &str) -> DiscoverableTool {