Preserve legacy semantics during rollout migration - #37191
Merged
copyberry[bot] merged 1 commit intoAug 6, 2026
Merged
Conversation
## Why Legacy rollouts can contain historical rollbacks, compaction checkpoints, and subagent copies of parent history. Migrating those records verbatim can change the visible conversation or the model context used when a thread resumes, and can retain large amounts of duplicated subagent history. ## What changed - Plan and replay historical rollbacks by logical turn, preserving surviving lifecycle events and the correct compaction anchor for future resumes. - Migrate subagent rollouts from a safe bounded replay when possible and record the history boundary so copied parent context is not projected as child turns. - Include archived and compressed rollouts while keeping their storage form and location intact. - Tolerate malformed, partial, oversized, and empty JSONL records during the migration scan. ## Testing Add coverage for rollback and compaction combinations, subagent replay bounds, archived and compressed rollouts, recovery, concurrent maintenance, and damaged JSONL input. GitOrigin-RevId: 3948e16d43f75df8571b0a92af12a181d1d08fdf
copyberry
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/3948e16d43f75df8571b0a92af12a181d1d08fdf
branch
from
August 6, 2026 00:55
7447946 to
aac9f84
Compare
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/3948e16d43f75df8571b0a92af12a181d1d08fdf
branch
August 6, 2026 00:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Preserve legacy semantics during rollout migration
Why
Legacy rollouts can contain historical rollbacks, compaction checkpoints, and
subagent copies of parent history. Migrating those records verbatim can change
the visible conversation or the model context used when a thread resumes, and
can retain large amounts of duplicated subagent history.
What changed
lifecycle events and the correct compaction anchor for future resumes.
the history boundary so copied parent context is not projected as child turns.
location intact.
migration scan.
Testing
Add coverage for rollback and compaction combinations, subagent replay bounds,
archived and compressed rollouts, recovery, concurrent maintenance, and damaged
JSONL input.