Move Guardian reporting and denial accounting into the extension (#44544)

## What changed

- Move assessment event construction, metrics, and analytics tracking into `codex-guardian-reviewer` through `ReviewReport`.
- Store denial accounting in thread extension data through `ReviewDenials`, with core retaining turn interruption and lifecycle cleanup.
- Move failed-review record selection and bounded serialization into the extension, with core supplying captured review context.

## Testing

Add coverage that denial accounting clears on turn completion and interruption. Move the oversized-record test into the extension and exercise the new API.

GitOrigin-RevId: 6e5b3d9d4128b356f99b1d0e74a68111e40261ab
This commit is contained in:
jif
2026-09-10 14:13:57 +00:00
committed by copyberry
parent eca63f0803
commit 4e6d5c0a96
17 changed files with 455 additions and 296 deletions
+7
View File
@@ -3563,13 +3563,20 @@ dependencies = [
"codex-analytics",
"codex-extension-api",
"codex-features",
"codex-feedback",
"codex-mcp",
"codex-otel",
"codex-protocol",
"opentelemetry",
"opentelemetry_sdk",
"pretty_assertions",
"rand 0.9.3",
"serde",
"serde_json",
"test-case",
"tokio",
"tokio-util",
"tracing",
]
[[package]]