Skip to content

Preserve floating-point values when decoding rollout lines - #38399

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/59c7f6fbcf83162b5ed6980a69381fe45fc20a0a
Aug 13, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/59c7f6fbcf83162b5ed6980a69381fe45fc20a0a

Conversation

@copyberry

@copyberry copyberry Bot commented Aug 13, 2026 •

Copy link
Copy Markdown

Preserve floating-point values when decoding rollout lines

Why

Serde's generic buffering for flattened and internally tagged fields is incompatible with serde_json's arbitrary_precision representation. As a result, persisted rollout items containing nested floating-point values can fail to decode.

What changed

  • Decode the rollout envelope at the JSON persistence boundary before deserializing the item payload.
  • Use the shared decoder for both session resume and thread-history projection.
  • Cover token-count floats, response-item metadata, field ordering, and ignored metadata in the decoder compatibility test.

## Why

Serde's generic buffering for flattened and internally tagged fields is incompatible with `serde_json`'s `arbitrary_precision` representation. As a result, persisted rollout items containing nested floating-point values can fail to decode.

## What changed

- Decode the rollout envelope at the JSON persistence boundary before deserializing the item payload.
- Use the shared decoder for both session resume and thread-history projection.
- Cover token-count floats, response-item metadata, field ordering, and ignored metadata in the decoder compatibility test.

GitOrigin-RevId: 59c7f6fbcf83162b5ed6980a69381fe45fc20a0a
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/59c7f6fbcf83162b5ed6980a69381fe45fc20a0a branch from cfc8366 to 2bd8727 Compare August 13, 2026 16:04
@copyberry
copyberry Bot merged commit 2bd8727 into main Aug 13, 2026
28 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/59c7f6fbcf83162b5ed6980a69381fe45fc20a0a branch August 13, 2026 16:05
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 13, 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