WIP fase 2b-3: rimozione sottosistemi solo-ChatGPT (plugin remoti, image gen, daybreak, cyber, attestation, cloud config, app/connettori) - test in corso
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -13,7 +13,6 @@ use crate::ReviewRequest;
|
||||
use codex_extension_api::ExtensionFuture;
|
||||
use codex_extension_api::SynchronousApprovalReviewer;
|
||||
use codex_protocol::approvals::GuardianReviewReason;
|
||||
use codex_protocol::openai_models::ModelInfo;
|
||||
use codex_protocol::protocol::CodexErrorInfo;
|
||||
use codex_protocol::protocol::ErrorEvent;
|
||||
use codex_protocol::protocol::EventMsg;
|
||||
@@ -39,7 +38,7 @@ pub trait ReviewHost: Clone + Send + Sync + 'static {
|
||||
/// Returns the target's rules, or no evidence when they cannot be resolved.
|
||||
fn permissions(&self) -> Option<codex_guardian_context::PermissionContext>;
|
||||
/// Captures the turn currently servicing reviews, which may differ from a yielded cell's origin.
|
||||
fn servicing_turn(&self) -> impl Future<Output = Option<(String, Arc<ModelInfo>)>> + Send;
|
||||
fn servicing_turn(&self) -> impl Future<Output = Option<String>> + Send;
|
||||
/// Returns the owning turn and optional target item after validating the action.
|
||||
fn validate_action(&self) -> Result<(&str, Option<&str>), ReviewDecision>;
|
||||
/// Prepares evidence and accounting, with a client event only for supported actions.
|
||||
@@ -205,10 +204,10 @@ impl<H: ReviewHost> SynchronousApprovalReviewer for ReviewRequest<'_, H> {
|
||||
if cached_approval {
|
||||
return Some(self.cached_approval().await);
|
||||
}
|
||||
if let Some((turn_id, model)) = self.host.servicing_turn().await {
|
||||
if let Some(turn_id) = self.host.servicing_turn().await {
|
||||
let denials = ReviewDenials::for_thread(self.thread_store);
|
||||
if completed.assessment_outcome == Some(GuardianAssessmentOutcome::Deny) {
|
||||
if let Some(message) = denials.record_denial(&turn_id, &model).await {
|
||||
if let Some(message) = denials.record_denial(&turn_id).await {
|
||||
// The denial window returns a warning only once per turn.
|
||||
self.telemetry.counter(
|
||||
"codex.guardian.denial_limit_reached",
|
||||
|
||||
Reference in New Issue
Block a user