mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Preserve Guardian authorization evidence until request budgeting (#44570)
## Why Transcript limits could shorten user instructions or omit later messages before Guardian evaluated the complete request budget, losing restrictions or prior approvals even when they would fit. ## What changed - Keep user messages and manual approvals complete and in source order through transcript collection and retention. - Preserve historical instructions while synchronous review can still compact history. If the final request still cannot fit, discard optional evidence before shortening older historical entries with truncation markers, preserving later restrictions where possible. - Warn that shortened instructions and approvals are incomplete and that missing evidence does not authorize actions. - Let asynchronous review defer to synchronous review when complete instructions exceed its budget. ## Testing Add coverage for complete instruction retention, approval and restriction ordering, marked truncation of oversized Unicode text, compaction before truncation, and asynchronous fallback when instructions do not fit. GitOrigin-RevId: e6159e876231347986b937ee7e07f944b83bfbe6
This commit is contained in:
1 parent
9c4879f3a5
commit
287e4f7dbf
21 files changed
+575
-335
No files matched your search
@@ -29,9 +29,6 @@ pub use section::ContextSection;
|
||||
pub use entry::ConversationTranscriptEntry;
|
||||
pub use entry::ConversationTranscriptEntryKind;
|
||||
pub use history::TranscriptHistory;
|
||||
pub use retention::UserMessageCost;
|
||||
pub use retention::UserMessageSelection;
|
||||
pub use retention::select_user_messages;
|
||||
pub use transcript::ConversationTranscriptConfig;
|
||||
pub use transcript::ConversationTranscriptOptions;
|
||||
pub use transcript::MANUAL_APPROVAL_DEVELOPER_PREFIX;
|
||||
@@ -51,6 +48,7 @@ mod action;
|
||||
mod enforcement;
|
||||
pub(crate) use enforcement::BudgetPriority;
|
||||
pub use enforcement::Budgeted;
|
||||
pub use enforcement::HistoryTruncation;
|
||||
pub(crate) use enforcement::Retention;
|
||||
mod budget;
|
||||
mod composition;
|
||||
@@ -92,7 +90,6 @@ pub use reviews::RenderedReviewEvidence;
|
||||
pub use reviews::ReviewEvidence;
|
||||
pub use reviews::render_review_evidence;
|
||||
pub use truncation::TruncationObservation;
|
||||
mod retention;
|
||||
mod section;
|
||||
pub use permissions::PermissionContext;
|
||||
mod transcript;
|
||||
|
||||
Reference in new issue
Block a user