Reuse Guardian reviews in async risk scoring (#40013)

## What changed

- Retain bounded evidence from completed synchronous Guardian allow and deny reviews and supply it to subsequent Guardian v2 async classifier samples as trusted developer context.
- Keep review evidence isolated from the conversation transcript, escape and truncate its fields, and ignore failed or incomplete reviews.
- Invalidate retained evidence after conversation history rewrites or new user messages, including authorization changes in a worker's root thread.

## Testing

- Cover approved, denied, malformed, and forged review inputs, plus root rollback and authorization-change scenarios.

GitOrigin-RevId: 27817e1fde9a136de727048c4220d148fcf72f42
This commit is contained in:
felixxia-oai authored and copyberry committed 2026-08-21 21:22:35 +00:00
1 parent ab8768306f
commit 9949c9eafa
16 files changed
+688 -74

No files matched your search

+2
View File
@@ -42,7 +42,9 @@ pub use codex_protocol::protocol::EnvironmentConfig;
pub use codex_thread::BackgroundTerminalInfo;
pub use codex_thread::CodexThread;
pub use codex_thread::CodexThreadSettingsOverrides;
pub use codex_thread::GuardianAuthorizationVersion;
pub use codex_thread::GuardianRootMessage;
pub use codex_thread::GuardianRootSnapshot;
pub use codex_thread::ThreadConfigSnapshot;
pub use session::turn_context::TurnContext;
mod agent;