mirror of
https://github.com/openai/codex.git
synced 2026-11-14 21:40:39 +00:00
Record Guardian context mode in review and classification telemetry (#49294)
## Why Guardian review and classification telemetry lacks the context mode needed to distinguish `legacy`, `independent`, and `thread_owned` reviews. ## What changed - Add `guardian_context_mode` to review and classification analytics and `context_mode` to their metrics. - Capture the mode from the conversation history snapshot before review preparation or classification setup so failure metrics retain it, including when review preparation or reviewer startup fails. - Use `unknown` for review metric tags when no context mode is available. ## Testing Update metric assertions to cover `thread_owned` classification tags and the `unknown` review fallback. GitOrigin-RevId: 79f7d11b3e4ccfc53681890d75fbc7c54e1ce7de
This commit is contained in:
@@ -292,6 +292,7 @@ async fn guardian_review_event_ingests_custom_fact_with_optional_target_item() {
|
||||
.ingest(
|
||||
AnalyticsFact::Custom(CustomAnalyticsFact::GuardianReview(Box::new(
|
||||
GuardianReviewEventParams {
|
||||
guardian_context_mode: None,
|
||||
thread_id: "thread-guardian".to_string(),
|
||||
turn_id: "turn-guardian".to_string(),
|
||||
review_id: "review-guardian".to_string(),
|
||||
|
||||
Reference in New Issue
Block a user