Skip to content

[codex] Outline extension ToolExecutor handlers - #27303

Closed
anp-oai wants to merge 1 commit into
codex/outline-remaining-core-tool-executor-handlersfrom
codex/outline-extension-tool-executor-handlers
Closed

[codex] Outline extension ToolExecutor handlers#27303
anp-oai wants to merge 1 commit into
codex/outline-remaining-core-tool-executor-handlersfrom
codex/outline-extension-tool-executor-handlers

Conversation

@anp-oai

@anp-oai anp-oai commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Why

ToolExecutor's async_trait usage is a significant contributor to slow debug builds for codex-core unit tests. Removing it makes those builds materially faster, but the direct trait flip is easier to review once large handler bodies are outside ToolExecutor::handle.

Stacked on #27302, this PR finishes the behavior-preserving handler preparation in extension crates before the trait change.

What Changed

Outlined the existing ToolExecutor::handle bodies into inherent async handle_call methods for image generation, memories, and web search extension tools.

The trait methods still use async_trait and now just delegate to self.handle_call(call).await.

Validation

No new tests; this is a behavior-preserving refactor.

@anp-oai
anp-oai force-pushed the codex/outline-extension-tool-executor-handlers branch from 637d93b to c8718d2 Compare June 10, 2026 04:01
@anp-oai
anp-oai force-pushed the codex/outline-remaining-core-tool-executor-handlers branch from ab59a6d to 4e310a8 Compare June 10, 2026 04:01
@anp-oai
anp-oai force-pushed the codex/outline-remaining-core-tool-executor-handlers branch from 4e310a8 to 8a4f370 Compare June 10, 2026 04:11
@anp-oai
anp-oai force-pushed the codex/outline-extension-tool-executor-handlers branch from c8718d2 to 039d199 Compare June 10, 2026 04:11
@anp-oai

anp-oai commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

[from Codex]: Collapsed into #27299 after the handler extraction diff became small enough to review as one mechanical prep PR.

@anp-oai anp-oai closed this Jun 10, 2026
@anp-oai
anp-oai deleted the codex/outline-extension-tool-executor-handlers branch June 10, 2026 04:39
anp-oai added a commit that referenced this pull request Jun 12, 2026
## Why

First-party async traits should expose their `Send` contracts explicitly
without requiring `async_trait`. This completes the migration pattern
established in #27303 and #27304.

## What changed

- Replaced the remaining first-party `async_trait` traits with native
return-position `impl Future + Send` where statically dispatched and
explicit boxed `Send` futures where object safety is required.
- Kept implementations behavior-preserving, outlining existing async
bodies into inherent methods where that keeps the diff reviewable.
- Removed all direct first-party `async-trait` dependencies and the
workspace dependency declaration.
- Added a cargo-deny policy that permits `async-trait` only through the
remaining transitive wrapper crates.
- Updated `rand` from 0.8.5 to 0.8.6 to resolve RUSTSEC-2026-0097 and
keep the full cargo-deny check passing.

## Validation

- `just test -p codex-exec-server`: 216 passed, 2 skipped.
- `just test -p codex-model-provider`: 39 passed.
- `just test -p codex-core` and `just test`: changed tests passed;
remaining failures are environment-sensitive suites unrelated to this
migration.
- `cargo deny check`
- `just fix`
- `just fmt`
- `cargo shear`
- `just bazel-lock-check`
GLBB pushed a commit to GLBB/codex that referenced this pull request Jun 12, 2026
## Why

First-party async traits should expose their `Send` contracts explicitly
without requiring `async_trait`. This completes the migration pattern
established in openai#27303 and openai#27304.

## What changed

- Replaced the remaining first-party `async_trait` traits with native
return-position `impl Future + Send` where statically dispatched and
explicit boxed `Send` futures where object safety is required.
- Kept implementations behavior-preserving, outlining existing async
bodies into inherent methods where that keeps the diff reviewable.
- Removed all direct first-party `async-trait` dependencies and the
workspace dependency declaration.
- Added a cargo-deny policy that permits `async-trait` only through the
remaining transitive wrapper crates.
- Updated `rand` from 0.8.5 to 0.8.6 to resolve RUSTSEC-2026-0097 and
keep the full cargo-deny check passing.

## Validation

- `just test -p codex-exec-server`: 216 passed, 2 skipped.
- `just test -p codex-model-provider`: 39 passed.
- `just test -p codex-core` and `just test`: changed tests passed;
remaining failures are environment-sensitive suites unrelated to this
migration.
- `cargo deny check`
- `just fix`
- `just fmt`
- `cargo shear`
- `just bazel-lock-check`
wangjiecloud pushed a commit to wangjiecloud/codex that referenced this pull request Jun 27, 2026
## Why

First-party async traits should expose their `Send` contracts explicitly
without requiring `async_trait`. This completes the migration pattern
established in openai#27303 and openai#27304.

## What changed

- Replaced the remaining first-party `async_trait` traits with native
return-position `impl Future + Send` where statically dispatched and
explicit boxed `Send` futures where object safety is required.
- Kept implementations behavior-preserving, outlining existing async
bodies into inherent methods where that keeps the diff reviewable.
- Removed all direct first-party `async-trait` dependencies and the
workspace dependency declaration.
- Added a cargo-deny policy that permits `async-trait` only through the
remaining transitive wrapper crates.
- Updated `rand` from 0.8.5 to 0.8.6 to resolve RUSTSEC-2026-0097 and
keep the full cargo-deny check passing.

## Validation

- `just test -p codex-exec-server`: 216 passed, 2 skipped.
- `just test -p codex-model-provider`: 39 passed.
- `just test -p codex-core` and `just test`: changed tests passed;
remaining failures are environment-sensitive suites unrelated to this
migration.
- `cargo deny check`
- `just fix`
- `just fmt`
- `cargo shear`
- `just bazel-lock-check`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant