Skip to content

Limit rollout metadata reads to headers - #33892

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

Limit rollout metadata reads to headers#33892
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/49576bd2877942e64082ce5ed057ecc848c025ec

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 17, 2026

Copy link
Copy Markdown

Limit rollout metadata reads to headers

Why

Callers that only need session metadata should not scan an entire rollout or fail on an unreadable tail after valid metadata.

What changed

  • Read session metadata directly from the rollout line reader, stopping as soon as it is found for both plain and compressed rollouts while preserving pre-header and validation behavior.
  • Bound the doctor thread inventory scan to the first 64 non-empty header lines. Prefer the metadata thread ID and retain the validated filename fallback for legacy rollouts without metadata.

Testing

  • Cover invalid UTF-8 tails, compressed rollouts, pre-header records, metadata and filename ID mismatches, the scan boundary, legacy fallback, and unusable headers.

## Why

Callers that only need session metadata should not scan an entire rollout or fail on an unreadable tail after valid metadata.

## What changed

- Read session metadata directly from the rollout line reader, stopping as soon as it is found for both plain and compressed rollouts while preserving pre-header and validation behavior.
- Bound the doctor thread inventory scan to the first 64 non-empty header lines. Prefer the metadata thread ID and retain the validated filename fallback for legacy rollouts without metadata.

## Testing

- Cover invalid UTF-8 tails, compressed rollouts, pre-header records, metadata and filename ID mismatches, the scan boundary, legacy fallback, and unusable headers.

GitOrigin-RevId: 49576bd2877942e64082ce5ed057ecc848c025ec
@github-actions

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/49576bd2877942e64082ce5ed057ecc848c025ec branch from 6472a93 to 24e9b84 Compare July 17, 2026 19:21
@copyberry
copyberry Bot merged commit 24e9b84 into main Jul 17, 2026
13 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/49576bd2877942e64082ce5ed057ecc848c025ec branch July 17, 2026 19:22
@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.

1 participant