Move Guardian approval routing into the reviewer extension (#45693)

## What changed

Introduce `ReviewRequest` in `codex-guardian-reviewer` to own contributor routing, cached approvals, synchronous fallback, and review cancellation. Keep action validation and session-specific preparation in the host.

Track the complete approval operation through parent shutdown, driving cancellation through reporting and reviewer cleanup before releasing it. Preserve fresh-review requirements and validate cached approvals before recording their outcome.

## Testing

Extend coverage for cancellation before routing and during cached approval, parent shutdown cleanup, and required fresh review overriding a cached allow result with matching assessment events and a denial warning.

GitOrigin-RevId: 8dcf26cc3660e91ef94e28e0bee7327ebe34ae6c
This commit is contained in:
jif authored and copyberry committed 2026-09-15 12:53:42 +00:00
1 parent 508a006d7a
commit 7f01a84eff
12 files changed
+387 -207

No files matched your search

+4 -1
View File
@@ -35,7 +35,10 @@ pub(crate) fn install(session: &Session, config: &Config) {
/*attestation_provider*/ None,
/*external_time_provider*/ None,
));
let runtime = Arc::new(codex_guardian_reviewer::ReviewerTasks::default());
let runtime = session
.services
.thread_extension_data
.get_or_init(codex_guardian_reviewer::ReviewerTasks::default);
session
.services
.thread_extension_data