Conversation
This was referenced Apr 13, 2026
8de4171 to
9f94b82
Compare
044b9ef to
73130f4
Compare
748a64f to
8508629
Compare
c23fbb6 to
8e51b64
Compare
cc931a9 to
6b895cd
Compare
dylan-hurd-oai
left a comment
Collaborator
There was a problem hiding this comment.
LGTM once we fix the error enum
| Completed(GuardianAssessment), | ||
| Failed(GuardianReviewFailure), | ||
| TimedOut, | ||
| Aborted, |
Collaborator
There was a problem hiding this comment.
Failed / TimedOut / Aborted feels like a messy mix here
| } | ||
|
|
||
| #[derive(Debug)] | ||
| pub(super) enum GuardianReviewFailure { |
Collaborator
There was a problem hiding this comment.
nit, if this is an error type, we should name it Error rather than failure
342c93c to
e116329
Compare
Collaborator
Author
Contributor
|
Codex Review: Didn't find any major issues. Chef's kiss. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
33e3764 to
e1bd596
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Guardian approvals now run as review sessions, but Codex analytics did not have a terminal event for those reviews. That made it hard to measure approval outcomes, failure modes, Guardian session reuse, model metadata, token usage, and timing separately from the parent turn.
What changed
Adds
codex_guardian_reviewanalytics emission for Guardian approval reviews. The event is emitted from the Guardian review path with review identity, target item id, approval request source, a PII-minimized reviewed-action shape, terminal decision/status, failure reason, Guardian assessment fields, Guardian session metadata, token usage, and timing metadata.The reviewed-action payload intentionally omits high-risk fields such as shell commands, working directories, argv, file paths, network targets/hosts, rationale, retry reason, and permission justifications. It also classifies prompt-build failures separately from Guardian session/runtime failures so fail-closed cases are distinguishable in analytics.
Verification
cargo clippy -p codex-core --lib --tests -- -D warningsStack created with Sapling. Best reviewed with ReviewStack.