Skip to content

Add ordinals to paginated rollout records#32332

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/3a9bb6cd2a1f674a9f154342e96e9aa3d8330781
Jul 11, 2026
Merged

Add ordinals to paginated rollout records#32332
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/3a9bb6cd2a1f674a9f154342e96e9aa3d8330781

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 11, 2026

Copy link
Copy Markdown

Add ordinals to paginated rollout records

Why

Paginated thread history needs durable ordering so consumers can process a rollout suffix without rebuilding all earlier history.

What changed

  • Add optional, zero-based ordinals to RolloutLine records in paginated rollouts while leaving legacy rollout serialization unchanged.
  • Continue ordinals from the last valid record when appending or resuming, including after gaps or an incomplete tail, and reject overflow without appending.
  • Add a stateless project_rollout_line helper that maps canonical turn lifecycle and completed-item records into thread-history change sets.

Testing

  • Cover ordinal assignment, legacy compatibility, resume and tail recovery, overflow handling, and thread-history projection for completed, failed, and interrupted turns.

## Why

Paginated thread history needs durable ordering so consumers can process a rollout suffix without rebuilding all earlier history.

## What changed

- Add optional, zero-based ordinals to `RolloutLine` records in paginated rollouts while leaving legacy rollout serialization unchanged.
- Continue ordinals from the last valid record when appending or resuming, including after gaps or an incomplete tail, and reject overflow without appending.
- Add a stateless `project_rollout_line` helper that maps canonical turn lifecycle and completed-item records into thread-history change sets.

## Testing

- Cover ordinal assignment, legacy compatibility, resume and tail recovery, overflow handling, and thread-history projection for completed, failed, and interrupted turns.

GitOrigin-RevId: 3a9bb6cd2a1f674a9f154342e96e9aa3d8330781
@copyberry copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/3a9bb6cd2a1f674a9f154342e96e9aa3d8330781 branch from 22ff20a to 5c19155 Compare July 11, 2026 04:16
@copyberry copyberry Bot merged commit 5c19155 into main Jul 11, 2026
14 of 32 checks passed
@copyberry copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/3a9bb6cd2a1f674a9f154342e96e9aa3d8330781 branch July 11, 2026 04:18
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 11, 2026
@Aiomx Aiomx temporarily deployed to issue-triage July 11, 2026 06:24 — with GitHub Actions Inactive
@Aiomx Aiomx temporarily deployed to issue-triage July 11, 2026 06:24 — with GitHub Actions Inactive
@Aiomx Aiomx temporarily deployed to issue-triage July 11, 2026 06:24 — with GitHub Actions Inactive
@Aiomx Aiomx temporarily deployed to issue-triage July 11, 2026 06:25 — with GitHub Actions Inactive
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.