Skip to content

Remove async-trait from extension contributors - #27383

Merged
jif-oai merged 2 commits into
mainfrom
jif/remove-async-trait-extension-api
Jun 10, 2026
Merged

Remove async-trait from extension contributors#27383
jif-oai merged 2 commits into
mainfrom
jif/remove-async-trait-extension-api

Conversation

@jif-oai

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

Copy link
Copy Markdown
Contributor

Why

Extension contributors are registered behind dyn Trait objects, so native async fn/RPITIT methods would make these traits non-object-safe. Spell out the boxed, Send future contract directly so extension-api no longer needs async-trait while retaining the existing runtime model.

What changed

  • add a shared ExtensionFuture alias and use it for asynchronous contributor methods
  • migrate production and test implementations to return Box::pin(async move { ... })
  • remove async-trait dependencies where they are no longer used, keeping it dev-only where unrelated test executors still require it

Behavior

No behavior change is intended. Contributor futures remain boxed, Send, dynamically dispatched, and lazily executed; cancellation and callback ordering stay unchanged.

Testing

  • just test -p codex-extension-api (11 passed)
  • affected extension crates (64 passed)
  • targeted codex-core contributor tests (14 passed)
  • just fmt
  • just bazel-lock-update
  • just bazel-lock-check

A broad local codex-core run compiled successfully but encountered unrelated sandbox and missing test-binary fixture failures; CI will run the full checks.

@jif-oai
jif-oai marked this pull request as ready for review June 10, 2026 12:05
@jif-oai
jif-oai requested a review from a team as a code owner June 10, 2026 12:05
@jif-oai

jif-oai commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. What shall we delve into next?

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@jif-oai
jif-oai merged commit d2f6d23 into main Jun 10, 2026
31 checks passed
@jif-oai
jif-oai deleted the jif/remove-async-trait-extension-api branch June 10, 2026 12:31
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant