mirror of
https://github.com/openai/codex.git
synced 2026-09-02 14:49:14 +00:00
## Why Compaction and host-injected context can rewrite the model-visible conversation without changing what the user authorized. Treating those updates as authorization changes prevents Guardian from reusing an otherwise valid review. ## What changed - Track a host-owned user-message revision separately from the conversation history generation. - Advance the revision for genuine user messages and history resets, while preserving it across compaction and internal context injection. - Use message content-kind metadata to distinguish host context from user input, conservatively treating unknown or incomplete metadata as user authorization. ## Testing Added coverage that cached Guardian authorization survives compaction and internal context, but is invalidated by user input and rollback. GitOrigin-RevId: c7960fa182d1686042c23764d2abc58acbc4b882