Skip to content

Add bounded batch lookups for message history - #33902

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/57e52a4ac150cd15a5bdc3fef8a351a1f2eb0e3c
Jul 17, 2026
Merged

Add bounded batch lookups for message history#33902
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/57e52a4ac150cd15a5bdc3fef8a351a1f2eb0e3c

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 17, 2026

Copy link
Copy Markdown

Add bounded batch lookups for message history

What changed

  • Add a public cursor-based API that reads history entries newest-first from an absolute offset.
  • Bound batches to 128 rows and 64 KiB while allowing a single oversized row so pagination always makes progress.
  • Reuse validated byte positions for unchanged, uncapped histories, and fall back to offset scans when files are rewritten or capped.
  • Preserve offsets for malformed rows and return them without parsed entries.

Testing

Add coverage for pagination, row and byte limits, oversized and malformed rows, file rewrites, capped-history trimming, appends, and log identity changes.

## What changed

- Add a public cursor-based API that reads history entries newest-first from an absolute offset.
- Bound batches to 128 rows and 64 KiB while allowing a single oversized row so pagination always makes progress.
- Reuse validated byte positions for unchanged, uncapped histories, and fall back to offset scans when files are rewritten or capped.
- Preserve offsets for malformed rows and return them without parsed entries.

## Testing

Add coverage for pagination, row and byte limits, oversized and malformed rows, file rewrites, capped-history trimming, appends, and log identity changes.

GitOrigin-RevId: 57e52a4ac150cd15a5bdc3fef8a351a1f2eb0e3c
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/57e52a4ac150cd15a5bdc3fef8a351a1f2eb0e3c branch from 58ef72d to 161748a Compare July 17, 2026 20:53
@copyberry
copyberry Bot merged commit 161748a into main Jul 17, 2026
14 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/57e52a4ac150cd15a5bdc3fef8a351a1f2eb0e3c branch July 17, 2026 20:55
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 17, 2026
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.

2 participants