Files
codex/codex-rs/core/tests
olliem-oai a0b85c7a66 Fix Guardian retained context spacing and empty assistant handling (#48158)
## Why

Complete assistant messages with empty text can produce misleading omitted-context notices in Guardian reviews.

## What changed

- Skip complete, empty assistant messages when recording and rendering retained context, while preserving omission notices for incomplete messages.
- Separate retained instruction fragments with blank lines and keep blank lines free of role prefixes, while labeling every nonempty line with its original role.
- Update source-order guidance detection and empty-section deduplication for the added spacing.

## Testing

Extend retained-context tests to cover empty completed messages across resume, restored empty messages, incomplete-message notices, blank-line spacing, and role labeling. Update Guardian prompt snapshots.

GitOrigin-RevId: e945717b18689fa4538d9b617b89a644858ab1c8
2026-09-25 18:28:46 +00:00
..