Skip to content

fix: preserve paginated history offsets - #25

Merged
Wangnov merged 3 commits into
fix/codex-home-via-dirsfrom
codex/fix-paginated-rollout-checkpoints
Jul 21, 2026
Merged

fix: preserve paginated history offsets#25
Wangnov merged 3 commits into
fix/codex-home-via-dirsfrom
codex/fix-paginated-rollout-checkpoints

Conversation

@Wangnov

@Wangnov Wangnov commented Jul 21, 2026

Copy link
Copy Markdown
Owner

What changed

  • detect paginated history from the rollout session metadata
  • keep paginated rollouts unchanged when a provider rewrite would grow the first line
  • exclude only those blocked thread IDs from the SQLite provider update
  • report a partial result instead of claiming full success
  • preserve the existing in-place patch path for fixed-length changes and the cold rewrite path for legacy history
  • cache stable blocked rollouts in watch and reevaluate them on config changes or the 60-second full scan
  • use a temporary SQLite exclusion table so large blocked sets do not hit the variable limit
  • document the compatibility boundary in Chinese and English

Root cause

Current Codex persists next_rollout_byte_offset in thread_history_1.sqlite. Replacing a short provider with a longer one in the first JSONL line shifts all later bytes while leaving that checkpoint unchanged. The next projection then starts inside an existing record and stalls.

Validation

  • cargo fmt --check
  • cargo test --locked: 77 passed
  • cargo clippy --locked --all-targets -- -D warnings
  • python -m py_compile scripts/smoke_release.py
  • node --check scripts/build-npm-matrix.mjs
  • macOS release smoke test passed
  • 32,767 blocked-ID regression test passed without hitting the SQLite variable limit
  • final local codex review: no findings
  • end-to-end probe against Codex a30aee8d906c2ec4dfa07c794504d4ee7099f98a:
    • sync exited partial and kept provider L, rollout bytes, and checkpoint unchanged
    • after resume, checkpoint advanced from 17183|5 to 18788|9
    • projected turns increased from 1 to 2
    • no rejected-line or ordinal projection errors

Fixes #24

@Wangnov
Wangnov marked this pull request as ready for review July 21, 2026 04:13
@Wangnov

Wangnov commented Jul 21, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 939571f476

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Wangnov
Wangnov merged commit c949aa3 into fix/codex-home-via-dirs Jul 21, 2026
8 checks passed
@Wangnov
Wangnov deleted the codex/fix-paginated-rollout-checkpoints branch July 21, 2026 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant