mirror of
https://github.com/openai/codex.git
synced 2026-10-18 17:18:52 +00:00
Count Guardian denial-limit interruptions in telemetry (#51334)
## What changed Increment `codex.guardian.denial_limit_reached` when automatic approval review reaches a turn's denial limit, immediately before interrupting the turn. Record the counter once per turn, matching the denial warning's existing behavior. GitOrigin-RevId: ec8eeeff6a681a261572496e59cf694e87e813ce
This commit is contained in:
@@ -141,6 +141,12 @@ impl<H: ReviewHost> SynchronousApprovalReviewer for ReviewRequest<'_, H> {
|
||||
let denials = ReviewDenials::for_thread(self.thread_store);
|
||||
if completed.assessment_outcome == Some(GuardianAssessmentOutcome::Deny) {
|
||||
if let Some(message) = denials.record_denial(&turn_id, &model).await {
|
||||
// The denial window returns a warning only once per turn.
|
||||
self.telemetry.counter(
|
||||
"codex.guardian.denial_limit_reached",
|
||||
/*inc*/ 1,
|
||||
&[],
|
||||
);
|
||||
self.host
|
||||
.interrupt(
|
||||
&turn_id,
|
||||
|
||||
Reference in New Issue
Block a user