mirror of
https://github.com/openai/codex.git
synced 2026-08-23 13:09:46 +00:00
Persist security risk scores in rollout history (#38363)
## What changed - Add a `SecurityRiskScore` rollout item containing a category and numeric score. - Persist the item in both thread history modes while excluding it from model context, user-visible thread history, search text, forks, and reconstructed conversation history. - Re-export the score type from the extension API. ## Testing - Cover serialization, persistence and loading, thread history projection, session reconstruction, append planning, and memory filtering. GitOrigin-RevId: 1926fe366aeaa75052708a6da589f45a38eefb52
This commit is contained in:
@@ -35,6 +35,7 @@ pub mod protocol;
|
||||
pub mod request_permissions;
|
||||
pub mod request_user_input;
|
||||
pub mod review_format;
|
||||
pub mod security_risk;
|
||||
pub mod shell_environment;
|
||||
pub mod turn_input;
|
||||
pub mod user_input;
|
||||
|
||||
13
codex-rs/protocol/src/security_risk.rs
Normal file
13
codex-rs/protocol/src/security_risk.rs
Normal file
@@ -0,0 +1,13 @@
|
||||
use schemars::JsonSchema;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
/// A durable, thread-owned security risk classifier score.
|
||||
///
|
||||
/// These records belong to rollout history only and must not enter model-visible
|
||||
/// conversation context or user-visible thread item projections.
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, JsonSchema)]
|
||||
pub struct SecurityRiskScore {
|
||||
pub category: String,
|
||||
pub score: f64,
|
||||
}
|
||||
Reference in New Issue
Block a user