Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

Measure total Guardian approval decision duration (#51330)

jiff5fa209bb02c
diff --git a/codex-rs/ext/guardian-reviewer/src/routing.rs b/codex-rs/ext/guardian-reviewer/src/routing.rs
index e12a6ecefb..aed5e95409 100644
--- a/codex-rs/ext/guardian-reviewer/src/routing.rs
+++ b/codex-rs/ext/guardian-reviewer/src/routing.rs
@@ -66,6 +66,11 @@ impl<H: ReviewHost> ReviewRequest<'_, H> {
mut self,
registry: &ExtensionRegistry<C>,
) -> Option<ReviewDecision> {
+ // Include fast decisions, preparation and cancellation, not just model review time.
+ let _decision_timer = self
+ .telemetry
+ .start_timer("codex.guardian.decision.duration_ms", &[])
+ .ok();
let runtime = self.thread_store.get::<crate::ReviewerTasks>();
let _task = runtime.as_ref().map(|runtime| runtime.tasks.token());
if runtime