Skip to content

tools: remove is_mutating dispatch gating#22382

Merged
pakrym-oai merged 5 commits into
mainfrom
pakrym/remove-is-mutating-parallel-policy
May 12, 2026
Merged

tools: remove is_mutating dispatch gating#22382
pakrym-oai merged 5 commits into
mainfrom
pakrym/remove-is-mutating-parallel-policy

Conversation

@pakrym-oai
Copy link
Copy Markdown
Collaborator

@pakrym-oai pakrym-oai commented May 12, 2026

Why

Tool dispatch had two serialization mechanisms:

  • supports_parallel_tool_calls decides whether a tool participates in the shared parallel-execution lock.
  • is_mutating separately gated some calls inside dispatch.

That second hook no longer carried its weight. The remaining parallel-support flag is already the per-tool concurrency policy, so keeping a second mutating gate made dispatch harder to follow and left behind extra session plumbing that only existed for that path.

What changed

  • Removed is_mutating from tool handlers and deleted the tool_call_gate path that existed only to support it.
  • Simplified dispatch and routing to rely on the existing per-tool supports_parallel_tool_calls boolean.
  • Dropped the now-unused handler overrides and related session/test scaffolding.
  • Kept the router/parallel tests focused on the surviving per-tool behavior.
  • Removed the unused codex-utils-readiness dependency from codex-core as a follow-up fix for cargo shear.

Testing

  • cargo test -p codex-core parallel_support_does_not_match_namespaced_local_tool_names
  • cargo test -p codex-core mcp_parallel_support_uses_handler_data
  • cargo test -p codex-core tools_without_handlers_do_not_support_parallel

@pakrym-oai pakrym-oai closed this May 12, 2026
@pakrym-oai pakrym-oai reopened this May 12, 2026
Copy link
Copy Markdown
Collaborator

@jif-oai jif-oai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lfg

@pakrym-oai pakrym-oai changed the title tools: fold mutating gating into parallel support tools: remove is_mutating dispatch gating May 12, 2026
@pakrym-oai pakrym-oai marked this pull request as ready for review May 12, 2026 22:25
@pakrym-oai pakrym-oai requested a review from a team as a code owner May 12, 2026 22:25
@pakrym-oai pakrym-oai enabled auto-merge (squash) May 12, 2026 22:25
@pakrym-oai pakrym-oai merged commit 862b212 into main May 12, 2026
30 checks passed
@pakrym-oai pakrym-oai deleted the pakrym/remove-is-mutating-parallel-policy branch May 12, 2026 22:44
@github-actions github-actions Bot locked and limited conversation to collaborators May 12, 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.

2 participants