mirror of
https://github.com/openai/codex.git
synced 2026-11-18 22:20:48 +00:00
## Why Guardian review counts need a way to distinguish automation-triggered turns from other turns, including when a subagent requests the review. ## What changed Add a `turn_origin` tag to the `codex.guardian.review` counter based on the trigger recorded when the turn started. Recognized automation triggers map to `automation`, missing or empty triggers map to `unknown`, and all other values map to `other`. This keeps the set of metric labels bounded. ## Testing Cover trigger classification for both allow and deny verdicts and verify that a later user turn on the same thread is counted separately from an automation turn in both main and subagent threads. GitOrigin-RevId: 6a5808798df7d184203cea18e60a94a82d71f036