mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
Always assign response item IDs (#34645)
## What changed - Assign IDs to client-created response items in every session, including streamed items, forked history, compaction results, and non-OpenAI provider requests. - Preserve server-provided IDs and stable generated IDs across persisted and resumed conversations while continuing to omit unprefixed server IDs from outbound requests. - Retire `features.item_ids` as a configurable feature. Existing configuration and CLI toggles remain accepted as compatibility no-ops. ## Testing - Cover default ID assignment, persistence and resume behavior, remote compaction, provider requests, WebSocket requests, and removed-feature compatibility. GitOrigin-RevId: 7a09e2d07d2606c2ef1e8e2283d36cb555557eae
This commit is contained in:
1 parent
690995b7c1
commit
4a443994bd
36 files changed
+256
-196
No files matched your search
@@ -31,6 +31,7 @@ use codex_utils_path_uri::PathUri;
|
||||
use core_test_support::PathBufExt;
|
||||
use core_test_support::PathExt;
|
||||
use core_test_support::responses::mount_models_once;
|
||||
use core_test_support::responses::strip_response_item_ids_from_json;
|
||||
use pretty_assertions::assert_eq;
|
||||
use std::time::Duration;
|
||||
use tempfile::tempdir;
|
||||
@@ -1782,8 +1783,9 @@ async fn interrupted_fork_snapshot_does_not_synthesize_turn_id_for_legacy_histor
|
||||
rollout_items
|
||||
.iter()
|
||||
.filter(|item| {
|
||||
serde_json::to_value(item).expect("serialize rollout item")
|
||||
== interrupted_marker_json
|
||||
strip_response_item_ids_from_json(
|
||||
serde_json::to_value(item).expect("serialize rollout item"),
|
||||
) == interrupted_marker_json
|
||||
})
|
||||
.count(),
|
||||
1,
|
||||
@@ -1986,8 +1988,9 @@ async fn interrupted_fork_snapshot_uses_persisted_mid_turn_history_without_live_
|
||||
forked_rollout_items
|
||||
.iter()
|
||||
.filter(|item| {
|
||||
serde_json::to_value(item).expect("serialize forked rollout item")
|
||||
== interrupted_marker_json
|
||||
strip_response_item_ids_from_json(
|
||||
serde_json::to_value(item).expect("serialize forked rollout item"),
|
||||
) == interrupted_marker_json
|
||||
})
|
||||
.count(),
|
||||
1,
|
||||
@@ -2021,8 +2024,9 @@ async fn interrupted_fork_snapshot_uses_persisted_mid_turn_history_without_live_
|
||||
reforked_rollout_items
|
||||
.iter()
|
||||
.filter(|item| {
|
||||
serde_json::to_value(item).expect("serialize re-forked rollout item")
|
||||
== interrupted_marker_json
|
||||
strip_response_item_ids_from_json(
|
||||
serde_json::to_value(item).expect("serialize re-forked rollout item"),
|
||||
) == interrupted_marker_json
|
||||
})
|
||||
.count(),
|
||||
1,
|
||||
|
||||
Reference in new issue
Block a user