mirror of
https://github.com/openai/codex.git
synced 2026-10-26 18:38:47 +00:00
Move trusted skill evidence into the Guardian context registry (#43599)
## What changed Move trusted skill rendering into `codex-guardian-context` as `TrustedSkills` and collect it through an async-only context section. Pass the collected section to the sampler, preserving the separate developer message and bounded JSON rendering. Omit skill paths from `Debug` output, exposing only their count. ## Testing Move rendering tests alongside the shared type, covering multiple paths and escaped UTF-8 within the size budget. Extend registry tests to cover async-only inclusion, omission for empty input, section ordering, and path redaction in debug output. GitOrigin-RevId: c0778067f19d31e693ca954aee1a7d7be8f9739a
This commit is contained in:
@@ -248,7 +248,9 @@ pub(crate) async fn build_guardian_prompt_items_with_parent_turn(
|
||||
push_text(text);
|
||||
}
|
||||
}
|
||||
ContextSection::PreviousReviews(_) | ContextSection::TrustedTool(_) => {
|
||||
ContextSection::PreviousReviews(_)
|
||||
| ContextSection::TrustedTool(_)
|
||||
| ContextSection::TrustedSkills(_) => {
|
||||
unreachable!("trusted review and tool sections are async-only")
|
||||
}
|
||||
ContextSection::ConversationTranscript { .. } => {}
|
||||
@@ -485,6 +487,7 @@ pub(super) fn collect_guardian_context(
|
||||
permissions,
|
||||
previous_reviews: None,
|
||||
trusted_tool: None,
|
||||
trusted_skill_paths: &[],
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user