aKode fase 2c: eliminato il codice di invio dati (crate analytics, otel-trace-websocket, sentry, esportatori OTLP); /feedback salva solo in locale; chiavi legacy [analytics]/[otel] accettate e ignorate; test di analytics/OTLP/upload rimossi
Some checks failed
blocking-ci / rust-ci (push) Has been cancelled
blocking-ci / sdk (push) Has been cancelled
blocking-ci / CI required (push) Has been cancelled
blocking-ci / Bazel (push) Has been cancelled
blocking-ci / Blob size policy (push) Has been cancelled
blocking-ci / cargo-deny (push) Has been cancelled
blocking-ci / Codespell (push) Has been cancelled
blocking-ci / repo-checks (push) Has been cancelled
postmerge-ci / rust-ci-full (push) Has been cancelled
postmerge-ci / v8-canary (push) Has been cancelled
postmerge-ci / Postmerge CI results (push) Has been cancelled
Some checks failed
blocking-ci / rust-ci (push) Has been cancelled
blocking-ci / sdk (push) Has been cancelled
blocking-ci / CI required (push) Has been cancelled
blocking-ci / Bazel (push) Has been cancelled
blocking-ci / Blob size policy (push) Has been cancelled
blocking-ci / cargo-deny (push) Has been cancelled
blocking-ci / Codespell (push) Has been cancelled
blocking-ci / repo-checks (push) Has been cancelled
postmerge-ci / rust-ci-full (push) Has been cancelled
postmerge-ci / v8-canary (push) Has been cancelled
postmerge-ci / Postmerge CI results (push) Has been cancelled
This commit is contained in:
@@ -2,10 +2,10 @@
|
||||
//! Resubmissions are independent; this layer keeps no state between approval requests.
|
||||
//! Changed local evidence retries cooperatively without service backoff, under the same limits.
|
||||
|
||||
use crate::GuardianReviewDetails;
|
||||
use crate::GuardianReviewError;
|
||||
use crate::GuardianReviewOutcome;
|
||||
use crate::ReviewDeadline;
|
||||
use codex_analytics::GuardianReviewAnalyticsResult;
|
||||
use codex_protocol::protocol::CodexErrorInfo;
|
||||
use rand::Rng;
|
||||
use std::future::Future;
|
||||
@@ -28,7 +28,7 @@ pub async fn run_with_retry<Evidence, F, Attempt>(
|
||||
mut run_attempt: F,
|
||||
) -> (
|
||||
GuardianReviewOutcome,
|
||||
GuardianReviewAnalyticsResult,
|
||||
GuardianReviewDetails,
|
||||
Option<Evidence>,
|
||||
)
|
||||
where
|
||||
@@ -36,7 +36,7 @@ where
|
||||
Attempt: Future<
|
||||
Output = (
|
||||
GuardianReviewOutcome,
|
||||
GuardianReviewAnalyticsResult,
|
||||
GuardianReviewDetails,
|
||||
Option<Evidence>,
|
||||
),
|
||||
>,
|
||||
@@ -49,12 +49,12 @@ where
|
||||
let mut attempt_count = 1;
|
||||
let mut context_changed = false;
|
||||
loop {
|
||||
let (outcome, mut analytics_result, evidence) = run_attempt(deadline).await;
|
||||
analytics_result.attempt_count = attempt_count;
|
||||
context_changed |= analytics_result.context_changed;
|
||||
analytics_result.context_changed = context_changed;
|
||||
let (outcome, mut details, evidence) = run_attempt(deadline).await;
|
||||
details.attempt_count = attempt_count;
|
||||
context_changed |= details.context_changed;
|
||||
details.context_changed = context_changed;
|
||||
if attempt_count >= max_attempts || !should_retry_guardian_review(&outcome) {
|
||||
return (outcome, analytics_result, evidence);
|
||||
return (outcome, details, evidence);
|
||||
}
|
||||
let retry_at = match &outcome {
|
||||
GuardianReviewOutcome::Error(GuardianReviewError::Session { retry_at, .. }) => {
|
||||
@@ -97,7 +97,7 @@ where
|
||||
}
|
||||
}
|
||||
if let Some(error) = wait_error {
|
||||
return (GuardianReviewOutcome::Error(error), analytics_result, None);
|
||||
return (GuardianReviewOutcome::Error(error), details, None);
|
||||
}
|
||||
attempt_count += 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user