Keep Guardian v2 risk scores in memory (#39304)

## What changed

- Stop writing Guardian v2 security risk scores to rollout history.
- Treat resumed and forked threads as having no previous Guardian score, so their
  first tool approval is classified and reviewed normally.
- Remove the now-unused `codex-history` dependency from the Guardian v2
  extension.

## Testing

- Update app-server coverage for new, resumed, and forked threads to wait for
  classification completion and verify the expected approval reviews.

GitOrigin-RevId: 74d9caa903a1ff9d38e577b4697b5f8970f11ebb
This commit is contained in:
felixxia-oai
2026-08-18 22:18:08 +00:00
committed by copyberry
parent b473c4e6ab
commit e51a91b2f4
7 changed files with 38 additions and 100 deletions

View File

@@ -5,10 +5,10 @@ use serde::Deserialize;
use serde::Serialize;
use std::collections::BTreeMap;
/// A durable, thread-owned snapshot of security risk classifier scores.
/// A thread-owned, in-memory snapshot of security risk classifier scores.
///
/// These records belong to rollout history only and must not enter model-visible
/// conversation context or user-visible thread item projections.
/// Scores must not enter model-visible conversation context or user-visible thread
/// item projections.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, JsonSchema)]
pub struct SecurityRiskScore {
pub scores: BTreeMap<String, f64>,