Files
codex/codex-rs/code-mode-runtime
cassirer-openai 96be88cb53 Reject reserved Serde JSON keys in code mode (#52681)
## Why

JavaScript objects containing Serde's reserved JSON keys can be reinterpreted during deserialization, allowing nested `RawValue` markers to bypass the parser's normal recursion limit.

## What changed

Reject `$serde_json::private::RawValue` and `$serde_json::private::Number` object keys before passing V8's serialized JSON to `serde_json`. Report a `reserved JSON object key` serialization error while continuing to allow marker text in strings and longer keys.

## Testing

Add runtime regression coverage for nested and escaped marker keys, recursion limits, normal JSON conversion, and session recovery without overwriting stored values. Extend the host-backed integration test to verify that stored values remain available across turns after rejection.

GitOrigin-RevId: 27ddce08e1ffe98ec9dffe02473a815ceae2cc89
2026-10-09 19:46:36 +00:00
..