Skip to content

Release superseded assistant text from live paginated history - #58751

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/3229c0cea820f117dc6331312f1e6056a8d1d52c
Nov 1, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/3229c0cea820f117dc6331312f1e6056a8d1d52c

Conversation

@copyberry

@copyberry copyberry Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Release superseded assistant text from live paginated history

Why

Live paginated history retains completed assistant text even when summaries only need the latest message. Release older text for threads with persisted history while preserving full resume responses.

What changed

  • Evict superseded assistant text from live turn state while preserving corrected items and the latest assistant message.
  • Restore evicted text for full resume responses from prepared history pages, fetching remaining items by ID in bounded batches. Return an error if saved text is missing.
  • Only load the active turn when it belongs in the requested initial page, and use the item ID index for targeted history reads.

Testing

Add reducer coverage for text eviction and corrected messages. Extend running-thread resume coverage to compare full and summary items with live notifications, exercise restoration when the prepared page lacks the active turn, and check missing-text errors.

## Why

Live paginated history retains completed assistant text even when summaries only need the latest message. Release older text for threads with persisted history while preserving full resume responses.

## What changed

- Evict superseded assistant text from live turn state while preserving corrected items and the latest assistant message.
- Restore evicted text for full resume responses from prepared history pages, fetching remaining items by ID in bounded batches. Return an error if saved text is missing.
- Only load the active turn when it belongs in the requested initial page, and use the item ID index for targeted history reads.

## Testing

Add reducer coverage for text eviction and corrected messages. Extend running-thread resume coverage to compare full and summary items with live notifications, exercise restoration when the prepared page lacks the active turn, and check missing-text errors.

GitOrigin-RevId: 3229c0cea820f117dc6331312f1e6056a8d1d52c
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/3229c0cea820f117dc6331312f1e6056a8d1d52c branch from 773dea4 to fe16bc0 Compare November 1, 2026 20:10
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-11-01T20:10:45.263241Z 773dea4 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@copyberry
copyberry Bot merged commit fe16bc0 into main Nov 1, 2026
1 check passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/3229c0cea820f117dc6331312f1e6056a8d1d52c branch November 1, 2026 20:10
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 1, 2026

This branch was previously deployed

1 inactive deployment
issue-triage — fe16bc0a Deployed Nov 1, 2026 by energ00022 via Translate non-English issue #23992
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.

5 participants