Files
codex/codex-rs/rollout
Charlie Marsh b7ca29d25b Recover inherited history from alternate rollout copies (#58959)
## Why

A fork's inherited history can become unreadable when the preferred ancestor rollout is truncated or has an incomplete compressed frame, even when a usable archived copy exists.

## What changed

- Retry failed ancestor reads using another copy of the same rollout, validating its owner and location before rebuilding the lineage.
- Apply fallback to model-context loading, fork and revert preparation, and paginated history reads. Preserve the original error when no usable replacement exists.
- Validate inherited byte offsets when opening ancestors for consumption, allowing a newer model-context checkpoint to avoid reading an unusable ancestor.
- Limit ancestor materialization to the inherited history boundary while preserving any existing progress beyond it.

## Testing

Add regression coverage for incomplete compressed ancestors, replacement ownership checks, archived-copy recovery during resume and fork, and materialization boundaries. Add an app-server test that cold-resumes a fork and pages inherited turns and items from an archived copy when the active ancestor is too short.

GitOrigin-RevId: 43730c17329ac759f7292b16ddf0d9eb463e3310
2026-11-02 19:44:42 +00:00
..