mirror of
https://github.com/openai/codex.git
synced 2026-10-23 18:08:45 +00:00
Measure Guardian approval blocking time per turn (#55591)
## What changed Record `codex.guardian.turn.blocking_ms` when a turn completes or aborts, with an `outcome` label. Count overlapping approval waits once, exclude idle gaps, and split pending reviews across the active turns they span. Use each turn's telemetry so samples retain the servicing turn's model attribution. ## Testing Add unit coverage for overlapping waits, idle gaps, late turn completion, and duplicate stops. Extend integration coverage to verify attribution across turns and model changes for yielded command reviews and MCP elicitation, including aborted turns. GitOrigin-RevId: a3e6a0c32a06fe58ea93119ecd941076100fb82c
This commit is contained in:
@@ -21,6 +21,9 @@ impl Session {
|
||||
) {
|
||||
let metadata: Arc<dyn TurnAnalyticsMetadata> = turn_context.turn_metadata_state.clone();
|
||||
turn_context.extension_data.insert(metadata);
|
||||
turn_context
|
||||
.extension_data
|
||||
.insert(turn_context.session_telemetry.clone());
|
||||
let collaboration_mode = turn_context.collaboration_mode();
|
||||
for contributor in self.services.extensions.turn_lifecycle_contributors() {
|
||||
if contributor.turn_start_phase(&self.services.thread_extension_data) != phase {
|
||||
|
||||
Reference in New Issue
Block a user