Resume thread history projection from its SQLite checkpoint - #32928
Merged
copyberry[bot] merged 1 commit intoJul 14, 2026
Conversation
## Why Thread history JSONL is the durable source of truth, while SQLite is a rebuildable view. If a SQLite projection fails after a durable append, the next write must catch up the unprojected suffix instead of skipping it. ## What changed - Start materialization at the byte offset stored in `thread_history_projection_state`. - Project only complete newline-terminated rollout records, leaving a trailing partial record for a later pass. - Preserve validation for missing files, invalid offsets, and missing or out-of-order ordinals without advancing projection state. ## Testing Add coverage for catching up after projection failure, avoiding replay when already synchronized, retaining partial lines, and rejecting invalid suffixes without changing SQLite state. GitOrigin-RevId: 8a7200a77edd5411ddf5fe31ab6af5ee287ed7d7
copyberry
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/8a7200a77edd5411ddf5fe31ab6af5ee287ed7d7
branch
from
July 14, 2026 02:24
96a8dc5 to
b24aa20
Compare
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/8a7200a77edd5411ddf5fe31ab6af5ee287ed7d7
branch
July 14, 2026 02:25
liu2675712289
temporarily deployed
to
issue-triage
July 14, 2026 02:33 — with
GitHub Actions
Inactive
liu2675712289
temporarily deployed
to
issue-triage
July 14, 2026 02:33 — with
GitHub Actions
Inactive
liu2675712289
temporarily deployed
to
issue-triage
July 14, 2026 02:33 — with
GitHub Actions
Inactive
liu2675712289
temporarily deployed
to
issue-triage
July 14, 2026 02:34 — with
GitHub Actions
Inactive
drdave-flexnetos
temporarily deployed
to
issue-triage
July 14, 2026 02:43 — with
GitHub Actions
Inactive
drdave-flexnetos
temporarily deployed
to
issue-triage
July 14, 2026 02:43 — with
GitHub Actions
Inactive
drdave-flexnetos
temporarily deployed
to
issue-triage
July 14, 2026 02:43 — with
GitHub Actions
Inactive
marklyu1222-max
temporarily deployed
to
issue-triage
July 14, 2026 03:20 — with
GitHub Actions
Inactive
marklyu1222-max
temporarily deployed
to
issue-triage
July 14, 2026 03:20 — with
GitHub Actions
Inactive
marklyu1222-max
temporarily deployed
to
issue-triage
July 14, 2026 03:20 — with
GitHub Actions
Inactive
adonis-cyril
temporarily deployed
to
issue-triage
July 14, 2026 03:59 — with
GitHub Actions
Inactive
adonis-cyril
temporarily deployed
to
issue-triage
July 14, 2026 03:59 — with
GitHub Actions
Inactive
adonis-cyril
temporarily deployed
to
issue-triage
July 14, 2026 03:59 — with
GitHub Actions
Inactive
breakingtime126
temporarily deployed
to
issue-triage
July 14, 2026 04:09 — with
GitHub Actions
Inactive
breakingtime126
temporarily deployed
to
issue-triage
July 14, 2026 04:09 — with
GitHub Actions
Inactive
breakingtime126
temporarily deployed
to
issue-triage
July 14, 2026 04:09 — with
GitHub Actions
Inactive
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.
Resume thread history projection from its SQLite checkpoint
Why
Thread history JSONL is the durable source of truth, while SQLite is a rebuildable view. If a SQLite projection fails after a durable append, the next write must catch up the unprojected suffix instead of skipping it.
What changed
thread_history_projection_state.Testing
Add coverage for catching up after projection failure, avoiding replay when already synchronized, retaining partial lines, and rejecting invalid suffixes without changing SQLite state.