mirror of
https://github.com/openai/codex.git
synced 2026-11-14 14:49:31 +00:00
Centralize Guardian transcript policy in context profiles (#43806)
## What changed Add `ContextProfile` to `codex-guardian-context` and route synchronous and asynchronous Guardian transcript rendering through it. Move default limits, retention, formatting, and async chunked eviction into the shared crate while preserving the distinct retention policies and host-managed full/delta cursors. Carry transcript truncation observations through `RenderedTranscript` into context composition, and derive async image collection flags from the resolved profile. ## Testing Add a profile regression test covering distinct sync/async retention priorities, original entry numbering, omission notes, and async truncation observations. Adapt existing transcript tests to the updated input API. GitOrigin-RevId: 7f7dc249629d8017e9547085f6617f815ae43a1b
This commit is contained in:
1 parent
0034ef93a7
commit
0337192dfd
11 files changed
+412
-358
No files matched your search
@@ -4,7 +4,8 @@
|
||||
//! without section composition.
|
||||
//! Contributor failures abort collection without returning partial context.
|
||||
//! Sections preserve source-specific evidence and share prompt framing, while
|
||||
//! hosts retain transcript selection, compaction and request lifecycles.
|
||||
//! profiles retain the consumer-specific transcript policy. Hosts own full/delta
|
||||
//! cursors, compaction and request lifecycles.
|
||||
//! Registered contributors declare their scope once and are collected only for
|
||||
//! matching context consumers. History and collection settings are borrowed for
|
||||
//! each request so the default registry can be reused without retaining state.
|
||||
@@ -48,10 +49,12 @@ mod retained_instructions;
|
||||
|
||||
mod action;
|
||||
mod composition;
|
||||
mod profile;
|
||||
pub use composition::CollectedContext;
|
||||
pub use composition::ComposedContext;
|
||||
pub use composition::ContextPresentation;
|
||||
pub use composition::RenderedTranscript;
|
||||
pub use profile::ContextProfile;
|
||||
mod authorization;
|
||||
mod entry;
|
||||
mod history;
|
||||
|
||||
Reference in new issue
Block a user