mirror of
https://github.com/openai/codex.git
synced 2026-11-14 21:40:39 +00:00
Defer Guardian context limits to request preparation (#61185)
## What changed Preserve original root conversation evidence, retained instructions, assistant context, and verified answers until request preparation. Apply shared section preparation to both synchronous and asynchronous reviews, preserving fixed limits and omission notices while allowing elastic preparation to use the originals. Cache the fixed root view for reuse. Split classifier setup from final input assembly and normalize new images before deduplication and token accounting, preserving committed history. ## Testing Extend tests for fixed and elastic preparation across both review profiles, original root evidence after handoff, and image normalization during retained-request preparation. GitOrigin-RevId: 86c83384c1f5be3707622d675fc54b4c8e1ddc0a
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
//! Marks bounded assistant evidence used to interpret user replies in Guardian reviews.
|
||||
//! Marks assistant evidence used to interpret user replies in Guardian reviews.
|
||||
//! Assistant text remains conversational context and never grants authorization.
|
||||
|
||||
use codex_history::RetainedUserMessage;
|
||||
@@ -39,8 +39,8 @@ pub fn render_retained_assistant_context(message: &RetainedUserMessage) -> Optio
|
||||
render_original_assistant_context(message)
|
||||
}
|
||||
|
||||
/// Preserves the host fragment boundary while deferring sync size admission.
|
||||
pub(crate) fn render_original_assistant_context(message: &RetainedUserMessage) -> Option<String> {
|
||||
/// Preserves the host fragment boundary while deferring request size admission.
|
||||
pub fn render_original_assistant_context(message: &RetainedUserMessage) -> Option<String> {
|
||||
if !message.complete {
|
||||
return None;
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ pub(crate) use current_time_reminder::CurrentTimeUnavailable;
|
||||
pub(crate) use developer_instructions::DeveloperInstructions;
|
||||
pub(crate) use environments_instructions::EnvironmentsInstructions;
|
||||
pub(crate) use guardian_approved_action::GuardianApprovedAction;
|
||||
pub(crate) use guardian_assistant_context::render_original_assistant_context;
|
||||
pub use guardian_assistant_context::render_original_assistant_context;
|
||||
pub use guardian_assistant_context::render_retained_assistant_context;
|
||||
pub(crate) use guardian_conversation_history::GuardianConversationHistory;
|
||||
pub(crate) use guardian_followup_review_reminder::GuardianFollowupReviewReminder;
|
||||
|
||||
Reference in New Issue
Block a user