mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +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
@@ -183,6 +183,8 @@ mod tests {
|
||||
use codex_tools::ExtensionTurnItem;
|
||||
use codex_utils_absolute_path::test_support::PathExt;
|
||||
use codex_utils_absolute_path::test_support::test_path_buf;
|
||||
use core_test_support::responses::strip_response_item_id;
|
||||
use core_test_support::responses::strip_response_item_ids;
|
||||
use pretty_assertions::assert_eq;
|
||||
use serde_json::json;
|
||||
use tokio::sync::Mutex;
|
||||
@@ -357,7 +359,10 @@ mod tests {
|
||||
let EventMsg::RawResponseItem(raw_history_item) = raw_history_event.msg else {
|
||||
panic!("expected raw response item event");
|
||||
};
|
||||
assert_eq!(raw_history_item.item, expected_history_item);
|
||||
assert_eq!(
|
||||
strip_response_item_id(raw_history_item.item),
|
||||
expected_history_item
|
||||
);
|
||||
let step_context = StepContext::for_test(Arc::clone(&turn));
|
||||
let invocation = ToolInvocation {
|
||||
session,
|
||||
@@ -397,8 +402,8 @@ mod tests {
|
||||
expected_sandbox_cwds
|
||||
);
|
||||
assert_eq!(
|
||||
captured_call.conversation_history.items(),
|
||||
std::slice::from_ref(&expected_history_item)
|
||||
strip_response_item_ids(captured_call.conversation_history.items()),
|
||||
vec![expected_history_item]
|
||||
);
|
||||
match captured_call.payload {
|
||||
ToolPayload::Function { arguments } => {
|
||||
|
||||
Reference in new issue
Block a user