mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:50:52 +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:
@@ -2638,7 +2638,7 @@ async fn spawn_agent_fork_strips_parent_usage_hints_from_compacted_history() {
|
||||
),
|
||||
retained_context: Some(retained_context),
|
||||
guardian_history: Some(codex_history::GuardianHistoryCheckpoint(vec![
|
||||
user_message("Parent-local approval must not be inherited."),
|
||||
user_message("Parent-local approval must not be inherited.").into(),
|
||||
])),
|
||||
mcp_resource_origins: None,
|
||||
window_number: None,
|
||||
|
||||
Reference in New Issue
Block a user