Skip to content

Scan the session index backwards for batch thread name lookups - #49297

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/2ab9254ba8b718fe3e02c47fc9b0de20c09fd10f
Sep 29, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/2ab9254ba8b718fe3e02c47fc9b0de20c09fd10f

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Scan the session index backwards for batch thread name lookups

Why

Batch thread name lookups read the entire append-only session index even when all requested names could be found near the end.

What changed

Use ReverseJsonlScanner in spawn_blocking for find_thread_names_by_ids, stopping once every requested ID has a usable name. Preserve the latest nonempty, trimmed name for each ID while skipping malformed entries.

Testing

Add regression coverage for renamed threads, whitespace-only names, Unicode, reads across chunk boundaries, malformed entries, a partial final write, and missing IDs.

## Why

Batch thread name lookups read the entire append-only session index even when all requested names could be found near the end.

## What changed

Use `ReverseJsonlScanner` in `spawn_blocking` for `find_thread_names_by_ids`, stopping once every requested ID has a usable name. Preserve the latest nonempty, trimmed name for each ID while skipping malformed entries.

## Testing

Add regression coverage for renamed threads, whitespace-only names, Unicode, reads across chunk boundaries, malformed entries, a partial final write, and missing IDs.

GitOrigin-RevId: 2ab9254ba8b718fe3e02c47fc9b0de20c09fd10f
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/2ab9254ba8b718fe3e02c47fc9b0de20c09fd10f branch from 7aa3598 to d5e6526 Compare September 29, 2026 16:16
@copyberry
copyberry Bot merged commit d5e6526 into main Sep 29, 2026
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/2ab9254ba8b718fe3e02c47fc9b0de20c09fd10f branch September 29, 2026 16:16
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 29, 2026

This branch was successfully deployed

1 active deployment
issue-triage — d5e65263 Deployed Sep 29, 2026 by andrew05060414 via Translate non-English issue #16105
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