Centralize Guardian action preparation for review (#45987)

## What changed

Move duplicated action preparation into `codex_guardian_context::action_for_review`, shared by approval rendering and cached-evidence size checks. Preserve the existing behavior: omit top-level `tool_description` and `connector_description` metadata from MCP tool calls while keeping tool arguments intact.

## Testing

Add unit tests verifying that MCP arguments retain description fields, including nested fields, and that other action types remain unchanged.

GitOrigin-RevId: 8e890fb263556596f695177f917750377c04d43c
This commit is contained in:
felixxia-oai authored and copyberry committed 2026-09-16 16:59:47 +00:00
1 parent 66dfadbe66
commit fd346b8dba
5 files changed
+61 -22

No files matched your search

+1
View File
@@ -23,6 +23,7 @@ use transcript::ConversationTranscriptSection;
pub use action::ActionPresentation;
pub use action::PlannedAction;
pub use action::PlannedActionKind;
pub use action::action_for_review;
pub use authorization::GuardianRootMessage;
pub use section::ContextSection;