Skip to content

Add plumbing to approve stored Auto-Review denials#18955

Merged
won-openai merged 2 commits into
mainfrom
auto-review-denial-struct
Apr 22, 2026
Merged

Add plumbing to approve stored Auto-Review denials#18955
won-openai merged 2 commits into
mainfrom
auto-review-denial-struct

Conversation

@won-openai

@won-openai won-openai commented Apr 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

This adds the structural plumbing needed for an app-server client to approve a previously denied Guardian review and carry that approval context into the next model turn.

This PR does not add the actual /auto-review-denials tool

What Changed

  • Added app-server v2 RPC thread/approveGuardianDeniedAction.
  • Added generated JSON schema and TypeScript fixtures for ThreadApproveGuardianDeniedAction*.
  • Added core Op::ApproveGuardianDeniedAction.
  • Added a core handler that validates the event is a denied Guardian assessment and injects a developer message containing the stored denial event JSON.
  • Queues the approval context for the next turn if there is no active turn yet.
  • Added the TUI app-server bridge so Op::ApproveGuardianDeniedAction { event } is routed to the app-server request.

What This Does Not Do

  • Does not add /auto-review-denials.
  • Does not add chat widget recent-denial state.
  • Does not add popup/list UI.
  • Does not add a product-facing denial lookup/store.
  • Does not change where Guardian denials are originally emitted or persisted.

Verification

  • cargo test -p codex-tui thread_approve_guardian_denied_action

@won-openai won-openai requested a review from a team as a code owner April 22, 2026 05:49
@won-openai won-openai force-pushed the auto-review-denial-struct branch from 3c2a46c to 994baf7 Compare April 22, 2026 05:54

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3c2a46c480

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

Comment on lines +3756 to +3768
let (_, thread) = match self.load_thread(&thread_id).await {
Ok(v) => v,
Err(error) => {
self.outgoing.send_error(request_id, error).await;
return;
}
};

match self
.submit_core_op(
&request_id,
thread.as_ref(),
Op::ApproveGuardianDeniedAction { event },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Validate denial event matches the target thread

The RPC accepts any deserialized GuardianAssessmentEvent and submits it to the loaded thread_id without checking that the event belongs to that thread/turn. This allows replaying or forging denied events across threads, injecting authorization context into unrelated conversations.

Useful? React with 👍 / 👎.

Comment thread codex-rs/core/src/session/handlers.rs Outdated
@won-openai won-openai changed the title Add plumbing to approve stored Guardian denials Add plumbing to approve stored Auto-Review denials Apr 22, 2026
@won-openai won-openai merged commit 11e5af5 into main Apr 22, 2026
25 checks passed
@won-openai won-openai deleted the auto-review-denial-struct branch April 22, 2026 17:38
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants