rollout: add ordinals to rollout JSONL lines#31859
Closed
owenlin0 wants to merge 2 commits into
Closed
Conversation
owenlin0
force-pushed
the
owen/rollout_ordinals
branch
from
July 9, 2026 20:47
03989c7 to
f04dbe7
Compare
owenlin0
force-pushed
the
owen/reverse_jsonl_scanner
branch
from
July 9, 2026 21:07
89ed20b to
8c750e4
Compare
owenlin0
force-pushed
the
owen/rollout_ordinals
branch
from
July 9, 2026 21:08
f04dbe7 to
77c3655
Compare
owenlin0
force-pushed
the
owen/reverse_jsonl_scanner
branch
from
July 9, 2026 21:23
8c750e4 to
b70fee9
Compare
owenlin0
force-pushed
the
owen/rollout_ordinals
branch
from
July 9, 2026 21:26
77c3655 to
132432a
Compare
owenlin0
force-pushed
the
owen/reverse_jsonl_scanner
branch
from
July 9, 2026 22:06
b70fee9 to
c0b4b7a
Compare
owenlin0
force-pushed
the
owen/rollout_ordinals
branch
from
July 9, 2026 22:07
132432a to
76fc070
Compare
owenlin0
force-pushed
the
owen/reverse_jsonl_scanner
branch
from
July 9, 2026 23:26
c0b4b7a to
6a09208
Compare
owenlin0
force-pushed
the
owen/rollout_ordinals
branch
from
July 9, 2026 23:30
76fc070 to
5bc52c8
Compare
owenlin0
force-pushed
the
owen/reverse_jsonl_scanner
branch
from
July 9, 2026 23:57
6a09208 to
0d139e9
Compare
owenlin0
force-pushed
the
owen/rollout_ordinals
branch
from
July 10, 2026 00:01
5bc52c8 to
5c059c3
Compare
owenlin0
force-pushed
the
owen/reverse_jsonl_scanner
branch
from
July 10, 2026 00:09
0d139e9 to
ce5433a
Compare
owenlin0
force-pushed
the
owen/rollout_ordinals
branch
from
July 10, 2026 00:13
5c059c3 to
be36b03
Compare
owenlin0
force-pushed
the
owen/reverse_jsonl_scanner
branch
from
July 10, 2026 03:27
ce5433a to
fdc193c
Compare
owenlin0
force-pushed
the
owen/rollout_ordinals
branch
from
July 10, 2026 03:27
be36b03 to
fb7b102
Compare
owenlin0
force-pushed
the
owen/reverse_jsonl_scanner
branch
from
July 10, 2026 04:16
930e827 to
239e27c
Compare
owenlin0
force-pushed
the
owen/rollout_ordinals
branch
3 times, most recently
from
July 10, 2026 04:31
404f923 to
a77e380
Compare
owenlin0
force-pushed
the
owen/rollout_ordinals
branch
from
July 10, 2026 04:41
a77e380 to
3b1fd5b
Compare
Contributor
Author
|
Ported to https://github.com/openai/codex-internal/pull/1376. Continuing review and merge there per the codex-internal repository migration. |
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 adds an optional integer
ordinalto each rollout JSONL line and emits them only forthread.history_mode = 'paginated'threads. Since we haven't started writing any yet, we can guarantee that all paginated threads are new rollouts and can start with ordinal 0. We don't have to deal with populating 0 in the middle of a rollout.For legacy rollouts, we don't write ordinals and leave it as
ordinal: None.Why
Ordinals give paginated rollout records a durable ordering position for later projection and thread forking optimizations. Having a monotonically increasing integer for an append-only log just makes a lot of sense and makes things downstream easier.