Files
codex/codex-rs/ext/guardian-v3
felixxia-oai 411e0f6235 Trim Guardian evidence by serialized JSON size (#65352)
## Why

JSON escaping can make a shorter tool output field consume more of the
evidence byte budget than a longer field. Ranking by raw string length
can truncate the build log while preserving a quote-heavy field that
takes up more space.

## What changed

When a Guardian response item exceeds the evidence budget, trim its
text fields in descending order of serialized JSON byte size.

## Testing

Extend the inbox truncation test to verify that a quote-heavy tool
result field is truncated while the build log and error summary stay
intact.

GitOrigin-RevId: de78c768e54e0fb020205aa5be14a9b6b3e8c1c9
2026-12-02 22:57:17 +00:00
..