mirror of
https://github.com/openai/codex.git
synced 2026-11-23 23:10:47 +00:00
Add Guardian v2 approval review metrics (#39224)
## What changed - Pass metrics bound to the active turn's model to approval-review contributors. - Add counter support to `ExtensionMetrics` while preserving host session attribution. - Record Guardian v2 tool-call score lag and count stale-score fallbacks with the `score_lag` reason. ## Testing - Cover counter forwarding and session metadata tags. - Verify Guardian v2 metric samples for current and stale scores. GitOrigin-RevId: 0ec34736d29d2e37ed217a27e773b4f6230ae38a
This commit is contained in:
@@ -318,11 +318,13 @@ pub trait ToolLifecycleContributor: Send + Sync {
|
||||
|
||||
/// Extension contribution that can claim rendered approval-review prompts.
|
||||
pub trait ApprovalReviewContributor: Send + Sync {
|
||||
/// Reviews one action using metrics bound to the active turn's model.
|
||||
fn contribute<'a>(
|
||||
&'a self,
|
||||
session_store: &'a ExtensionData,
|
||||
thread_store: &'a ExtensionData,
|
||||
prompt: &'a str,
|
||||
extension_metrics: Option<Arc<dyn ExtensionMetrics>>,
|
||||
) -> ExtensionFuture<'a, Option<ReviewDecision>>;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user