Files
codex/codex-rs/guardian-context/src
ioanbudea-OAI 0a0b1021f0 Apply elastic Guardian budgets to retained user and sender evidence (#62829)
## Why

Fixed retention limits could discard long user instructions or leave
older sender messages out of Guardian review even when the configured
elastic budget had room for them.

## What changed

- Apply the configured retained-instruction entry limit when capturing
  and restoring user messages. Fixed-budget reviewers use the fixed
  retention window for both user and assistant messages.
- Build elastic sender snapshots at delivery using the receiver's sender
  evidence budget. Give recent user messages first claim on space, then
  include preceding assistant context where it fits. Mark omitted
  evidence and save the snapshot for review and rollback.

## Testing

Add coverage for cross-host delivery after compaction, large sender
snapshots through checkpoint restore and rollback, and how synchronous
and asynchronous reviewers read saved or empty sender snapshots.

GitOrigin-RevId: f0b01a2d558e3286335efac85a4f8645dd9b954b
2026-11-20 20:11:57 +00:00
..