Skip to content

Preserve JSON number precision in exec-server RPC messages - #33031

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/a6e0a3fba6f88e4e8a6ff414832f078beb2d2a70
Jul 14, 2026
Merged

Preserve JSON number precision in exec-server RPC messages#33031
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/a6e0a3fba6f88e4e8a6ff414832f078beb2d2a70

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 14, 2026

Copy link
Copy Markdown

Preserve JSON number precision in exec-server RPC messages

Why

Exec-server JSON-RPC payloads can contain decimals, exponent notation, and
integers outside the native 64-bit range. Decoding these values should preserve
their original JSON representation without weakening the existing message
complexity limit.

What changed

  • Enable serde_json arbitrary-precision number and raw-value support for the
    exec-server protocol.
  • Decode serde's number and raw-value wrappers in the bounded JSON visitor,
    charging nested raw values against the 256K-value limit.
  • Select the JSON-RPC envelope variant from its fields after bounded decoding so
    arbitrary-precision values survive message deserialization.

Testing

Add coverage for exact arbitrary-precision number round trips and for enforcing
the value limit inside raw-value wrappers.

## Why

Exec-server JSON-RPC payloads can contain decimals, exponent notation, and
integers outside the native 64-bit range. Decoding these values should preserve
their original JSON representation without weakening the existing message
complexity limit.

## What changed

- Enable `serde_json` arbitrary-precision number and raw-value support for the
  exec-server protocol.
- Decode serde's number and raw-value wrappers in the bounded JSON visitor,
  charging nested raw values against the 256K-value limit.
- Select the JSON-RPC envelope variant from its fields after bounded decoding so
  arbitrary-precision values survive message deserialization.

## Testing

Add coverage for exact arbitrary-precision number round trips and for enforcing
the value limit inside raw-value wrappers.

GitOrigin-RevId: a6e0a3fba6f88e4e8a6ff414832f078beb2d2a70
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/a6e0a3fba6f88e4e8a6ff414832f078beb2d2a70 branch from e95fdbf to 7790524 Compare July 14, 2026 10:27
@copyberry
copyberry Bot merged commit 7790524 into main Jul 14, 2026
14 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/a6e0a3fba6f88e4e8a6ff414832f078beb2d2a70 branch July 14, 2026 10:28
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 14, 2026
@dbt1
dbt1 temporarily deployed to issue-triage July 14, 2026 10:29 — with GitHub Actions Inactive
@dbt1
dbt1 temporarily deployed to issue-triage July 14, 2026 10:29 — with GitHub Actions Inactive
@dbt1
dbt1 temporarily deployed to issue-triage July 14, 2026 10:29 — with GitHub Actions Inactive
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.

4 participants