mirror of
https://github.com/openai/codex.git
synced 2026-09-14 11:57:03 +00:00
codex: clarify compacted replacement history sync
Add an inline comment explaining why replacement_history is refreshed from the final in-memory items after the ghost snapshot tail merge. Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -3381,6 +3381,9 @@ impl Session {
|
||||
);
|
||||
state.replace_history(items.clone(), reference_context_item.clone());
|
||||
}
|
||||
// `items` may have gained a concurrent ghost snapshot tail under the
|
||||
// state lock, so refresh the persisted replacement history to match the
|
||||
// in-memory install.
|
||||
compacted_item.replacement_history = Some(items);
|
||||
|
||||
self.persist_rollout_items(&[RolloutItem::Compacted(compacted_item)])
|
||||
|
||||
Reference in New Issue
Block a user