mirror of
https://github.com/openai/codex.git
synced 2026-10-19 17:28:46 +00:00
Preserve independent Guardian history across parent compaction (#48779)
## Why Guardian reviews need to retain original evidence across parent compaction when checkpoint reuse is disabled, including after resume and rollback. ## What changed - Make disabling `guardian_reuse_parent_compaction` select a bounded, independent review transcript while preserving thread-owned authorization. - Keep synchronous reviews and asynchronous scoring independent of parent checkpoints, and allow reviewer sessions to continue using transcript deltas across parent compaction. - Persist transcript entries with rollback provenance while remaining compatible with older checkpoint readers and metadata-free checkpoints. - Exclude compaction output from the transcript and synthetic summaries from rollback turn boundaries. Use acceptance ordering to remove rolled-back evidence even when persistence order differs. ## Testing Add regression coverage for reviewer continuity, evidence retention across compaction and resume, rollback after local and remote compaction, and checkpoint serialization compatibility. GitOrigin-RevId: fea0852cc5537372854f4a34bacb6bfda6d13e88
This commit is contained in:
@@ -36,6 +36,12 @@ pub trait ConversationHistorySnapshot: Send + Sync {
|
||||
self.retained_context().is_some()
|
||||
}
|
||||
|
||||
/// Whether the host retains a bounded review transcript independently of parent compaction.
|
||||
/// Such snapshots must never seed reviewers with the parent's opaque checkpoint.
|
||||
fn uses_independent_review_history(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
/// Latest opaque checkpoint, including unusable items, with its recorded producer.
|
||||
/// Hosts without provenance leave the producer unknown rather than using the live model.
|
||||
fn latest_compaction(&self) -> Option<CompactionCheckpoint<'_>> {
|
||||
|
||||
Reference in New Issue
Block a user