mirror of
https://github.com/openai/codex.git
synced 2026-11-14 14:49:31 +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:
1 parent
2554239561
commit
f5331dc237
14 files changed
+222
-129
No files matched your search
@@ -51,7 +51,9 @@ mod authorization;
|
||||
mod entry;
|
||||
mod history;
|
||||
mod permissions;
|
||||
mod trusted_skills;
|
||||
mod trusted_tool;
|
||||
pub use trusted_skills::TrustedSkills;
|
||||
pub use trusted_tool::TrustedTool;
|
||||
mod reviews;
|
||||
pub use reviews::MAX_PREVIOUS_REVIEWS;
|
||||
@@ -118,6 +120,8 @@ pub struct SectionInput<'a> {
|
||||
pub previous_reviews: Option<&'a PreviousReviews>,
|
||||
/// Metadata verified by the host for the exact action being classified.
|
||||
pub trusted_tool: Option<&'a TrustedTool>,
|
||||
/// Current-turn and delegated skill paths verified and bounded by the host.
|
||||
pub trusted_skill_paths: &'a [String],
|
||||
}
|
||||
|
||||
/// Supplies repeatable, zero-copy access to a host-owned conversation snapshot.
|
||||
@@ -207,6 +211,7 @@ pub fn default_registry() -> &'static SectionRegistry {
|
||||
let mut registry = SectionRegistry::default();
|
||||
registry.register(reviews::PreviousReviewsSection);
|
||||
registry.register(trusted_tool::TrustedToolSection);
|
||||
registry.register(trusted_skills::TrustedSkillsSection);
|
||||
registry.register(RootConversationSection);
|
||||
registry.register(RetainedUserInstructionsSection);
|
||||
registry.register(TrustedUserAnswersSection);
|
||||
|
||||
Reference in new issue
Block a user