mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Route rollout reads through the canonical JSON decoder (#42378)
## Why Directly deserializing the flattened `RolloutLine` envelope can reject nested decimal values, preventing affected paginated sessions from resuming. ## What changed - Add canonical string, byte, and reverse-scanner helpers that decode rollout records through `serde_json::Value` before decoding the flattened item. - Route rollout readers across session discovery, history, migration, search, thread storage, and transcript previews through those helpers. - Remove `Deserialize` from `RolloutLine` so new readers cannot bypass the canonical persistence decoder. ## Testing Add coverage that resumes a paginated rollout after a token-count record with a decimal rate-limit value and verifies that ordinal sequencing continues. GitOrigin-RevId: 49abac1e0751c073daa5a93a840d8a483fd2d013
This commit is contained in:
1 parent
e1d0ef995f
commit
69cebb5d15
49 files changed
+184
-114
No files matched your search
@@ -232,7 +232,11 @@ impl From<CompactedItem> for ResponseItem {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone, JsonSchema)]
|
||||
/// One persisted rollout JSONL record.
|
||||
///
|
||||
/// This intentionally does not implement Deserialize: JSONL readers must use
|
||||
/// codex_rollout's canonical parser so nested decimal values survive the flattened envelope.
|
||||
#[derive(Serialize, Clone, JsonSchema)]
|
||||
pub struct RolloutLine {
|
||||
pub timestamp: String,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
|
||||
Reference in new issue
Block a user