feat(rollout): persist canonical items for paginated threads#30188
Draft
owenlin0 wants to merge 1 commit into
Draft
feat(rollout): persist canonical items for paginated threads#30188owenlin0 wants to merge 1 commit into
owenlin0 wants to merge 1 commit into
Conversation
4d6ed79 to
c80f9bc
Compare
ea6d2f0 to
909898e
Compare
35c6ad7 to
ee54284
Compare
909898e to
aab46a2
Compare
ee54284 to
d581108
Compare
30f1e4e to
334ca60
Compare
d581108 to
e9d6a09
Compare
334ca60 to
dbb8f8f
Compare
232e33c to
a6f98df
Compare
84244e6 to
9400737
Compare
acec956 to
f691f27
Compare
9400737 to
22e61fc
Compare
22e61fc to
5d24df7
Compare
9fd1ae2 to
9f2d003
Compare
5d24df7 to
ae5828a
Compare
d3204c7 to
3041d21
Compare
ae5828a to
f3fdff2
Compare
3041d21 to
5d4da6f
Compare
f3fdff2 to
20eca18
Compare
20eca18 to
aa40462
Compare
3a6d87b to
0c3b191
Compare
aa40462 to
bacfb43
Compare
This was referenced Jun 27, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR is the final CA-629 persistence layer on top of #30283.
Paginated rollouts now persist completed canonical
TurnItemsnapshots instead of the parallel legacy item-shaped events. Legacy rollouts keep the existing persistence behavior.Why
The later SQLite projector needs to read the JSONL suffix and materialize paginated
ThreadItems without reconstructing the whole thread first. That only works if new paginated rollouts already contain stable turn/item IDs and completed item snapshots.I left legacy rollout persistence alone because old binaries and historical rollouts still understand the old event shapes. The new storage contract is selected per thread with
historyMode = "paginated".What changed
ItemCompletedsnapshots and drop redundant persisted legacy item-shaped events; legacy threads keep current behavior.LiveThread, soThreadStore::append_itemsreceives the already-filtered durable batch.Feature::ItemIdsis off.Validation
cargo check -p codex-protocol -p codex-app-server-protocol -p codex-rollout -p codex-thread-store -p codex-core -p codex-app-server -p codex-stateI did not run the full
codex-coresuite.Follow-up
The later SQLite projection work can now consume completed canonical item snapshots from paginated rollout JSONL without reconstructing the full thread first.