Skip to content

Avoid scanning archived rollouts when archiving threads - #41908

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/46367127578f20bfa46a8db5c6f2b7f59d29f7a9
Aug 31, 2026
Merged

Avoid scanning archived rollouts when archiving threads#41908
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/46367127578f20bfa46a8db5c6f2b7f59d29f7a9

Conversation

@copyberry

@copyberry copyberry Bot commented Aug 31, 2026

Copy link
Copy Markdown

Avoid scanning archived rollouts when archiving threads

Why

Archiving a thread only needs to locate rollout files that have not already
been moved, so reading the entire rollout archive on every request is
unnecessary.

What changed

  • Add RolloutReferenceIndex::scan_unarchived to scan only the active
    sessions directory.
  • Use the active-only index when archiving threads while retaining full scans
    for operations that require archived-history reference counts.
  • Cover discovery of compressed and uncompressed active rollouts and exclusion
    of archived and unrelated rollouts.

## Why

Archiving a thread only needs to locate rollout files that have not already
been moved, so reading the entire rollout archive on every request is
unnecessary.

## What changed

- Add `RolloutReferenceIndex::scan_unarchived` to scan only the active
  `sessions` directory.
- Use the active-only index when archiving threads while retaining full scans
  for operations that require archived-history reference counts.
- Cover discovery of compressed and uncompressed active rollouts and exclusion
  of archived and unrelated rollouts.

GitOrigin-RevId: 46367127578f20bfa46a8db5c6f2b7f59d29f7a9
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/46367127578f20bfa46a8db5c6f2b7f59d29f7a9 branch from 4971bb7 to 2f0a5d5 Compare August 31, 2026 20:40
@copyberry
copyberry Bot merged commit 2f0a5d5 into main Aug 31, 2026
27 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/46367127578f20bfa46a8db5c6f2b7f59d29f7a9 branch August 31, 2026 20:41
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 31, 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.

1 participant