mirror of
https://github.com/openai/codex.git
synced 2026-08-23 13:09:46 +00:00
Distinguish Guardian review threads from subagents (#40221)
## Why Guardian reviews were reported with the generic `subagent` thread source, making them indistinguishable from other delegated threads in persisted metadata and analytics. ## What changed - Add the `guardian_review` thread source to the core protocol and app-server schema. - Assign it to Guardian reviewer sessions and propagate the configured source through turn metadata, rollouts, and analytics. - Continue treating Guardian reviews like subagents for paginated history and trusted-provenance checks. ## Testing - Cover protocol round trips, delegate source selection, emitted analytics, request metadata, and persisted rollout metadata. GitOrigin-RevId: 07480c122715812874c9d3b48bb39fc5c86b2367
This commit is contained in:
@@ -2604,6 +2604,7 @@ pub enum SessionSource {
|
||||
pub enum ThreadSource {
|
||||
User,
|
||||
Subagent,
|
||||
GuardianReview,
|
||||
Feature(String),
|
||||
MemoryConsolidation,
|
||||
}
|
||||
@@ -2613,6 +2614,7 @@ impl ThreadSource {
|
||||
match self {
|
||||
ThreadSource::User => "user",
|
||||
ThreadSource::Subagent => "subagent",
|
||||
ThreadSource::GuardianReview => "guardian_review",
|
||||
ThreadSource::Feature(feature) => feature,
|
||||
ThreadSource::MemoryConsolidation => "memory_consolidation",
|
||||
}
|
||||
@@ -2646,6 +2648,7 @@ impl FromStr for ThreadSource {
|
||||
match value {
|
||||
"user" => Ok(ThreadSource::User),
|
||||
"subagent" => Ok(ThreadSource::Subagent),
|
||||
"guardian_review" => Ok(ThreadSource::GuardianReview),
|
||||
"memory_consolidation" => Ok(ThreadSource::MemoryConsolidation),
|
||||
other => Ok(ThreadSource::Feature(other.to_string())),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user