mirror of
https://github.com/openai/codex.git
synced 2026-11-20 22:40:37 +00:00
Persist Guardian retention limits in thread settings (#62827)
## What changed At session startup, derive `assistant_record_bytes` from the Sync Elastic per-entry token limit for retained user instructions. Use the default section limit when the configuration omits that section. Store the resolved byte limit in the optional `guardian_retention` field of `ThreadSettingsSnapshot` and update the app-server schema. Fixed-mode snapshots omit the field, and older snapshots can still be read. GitOrigin-RevId: a8de88c5bd0e35c4a114577e70fb0c858acb13c9
This commit is contained in:
@@ -199,7 +199,8 @@ impl ElasticBudgetConfig {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub(crate) fn section_limits(&self, section: ElasticSection) -> ElasticSectionLimits {
|
||||
/// Returns the configured limits or the default for an omitted section.
|
||||
pub fn section_limits(&self, section: ElasticSection) -> ElasticSectionLimits {
|
||||
self.sections.get(§ion).copied().unwrap_or_else(|| {
|
||||
let entries = crate::ContextProfile::synchronous().transcript.entry_limits;
|
||||
let tokens = match section {
|
||||
|
||||
Reference in New Issue
Block a user