Files
codex/codex-rs/core/tests
ioanbudea-OAI e52045f989 Move Guardian tool description preparation into context composition (#56493)
## What changed

Move `GuardianToolDescriptions` into `codex-guardian-context` and carry structured tool and connector descriptions in `PlannedAction` instead of pre-rendered text. Prepare them during synchronous context composition, escaping closing tags before applying the existing 400-token limit to each source and rendering the untrusted-description fragment.

Keep descriptions optional under the context budget and preserve the complete action JSON. Reject descriptions that reach rendering without preparation.

## Testing

Strengthen the MCP approval integration test to assert the exact rendered descriptions, including independent truncation and escaped closing markers. Adapt the budget enforcement test to use structured descriptions.

GitOrigin-RevId: 4a9f1855f2958758b4be711914c00e4d954cee39
2026-10-23 14:58:20 +00:00
..