pakrym-oai
70a6aa2634
core: assign item IDs to compacted replacement history ( #29012 )
...
## Why
Remote v2 compaction can return replacement-history items without IDs.
Because replacement history is installed directly, those items bypass
normal history preparation and remain ID-less in later Responses
requests even when the `item_ids` feature is enabled.
## What changed
- Pass the active `TurnContext` into `replace_compacted_history`.
- When `item_ids` is enabled, assign missing IDs before installing and
persisting replacement history.
- Rebuild `CompactedItem` from the prepared history so live and
persisted replacement histories match.
- Add integration coverage requiring IDs on every ID-capable input item
in the initial, remote v2 compaction, and post-compaction requests.
## Test plan
- `just test -p codex-core response_item_ids`
- `just test -p codex-core websocket_v2_test_codex_shell_chain`
- `just test -p codex-core remote_compaction_parity_pre_turn_auto`
- `just test -p codex-app-server
thread_inject_items_adds_raw_response_items_to_thread_history`
2026-06-18 18:49:57 -07:00
..
2026-06-18 17:00:49 -07:00
2026-04-21 10:22:36 -07:00
2026-04-07 00:32:41 +00:00
2026-06-18 19:11:21 -05:00
2026-06-19 01:46:57 +00:00
2026-06-17 18:27:43 -07:00
2026-06-18 19:40:28 +02:00
2026-06-15 22:07:07 +00:00
2026-06-18 14:09:38 +02:00
2026-06-18 18:49:57 -07:00
2026-06-18 17:00:49 -07:00
2026-06-18 14:09:38 +02:00
2026-06-19 01:46:57 +00:00
2026-06-18 14:09:38 +02:00
2026-03-24 18:10:53 -07:00
2026-06-18 16:13:07 -07:00
2026-06-18 16:16:19 -07:00
2026-06-18 19:31:19 +00:00
2026-06-18 19:31:19 +00:00
2026-05-08 12:36:02 -07:00
2026-06-17 18:27:43 -07:00
2026-06-16 22:17:24 -07:00
2026-06-18 17:30:55 -07:00
2026-06-18 17:30:55 -07:00
2026-06-17 19:52:43 +02:00
2026-06-18 19:18:42 +00:00
2026-06-18 15:06:23 -07:00
2026-03-12 08:16:36 -07:00
2026-04-01 23:06:24 -07:00
2026-06-18 18:49:57 -07:00
2026-06-18 18:49:57 -07:00
2026-06-17 18:27:43 -07:00
2026-06-18 18:49:57 -07:00
2026-06-10 12:54:21 +02:00
2026-06-18 17:19:24 -04:00
2026-06-18 17:19:24 -04:00
2026-03-12 00:35:21 -07:00
2026-06-18 19:18:42 +00:00
2026-06-16 21:42:28 +00:00
2026-06-17 18:27:43 -07:00
2026-06-18 18:52:19 +00:00
2026-04-26 15:10:53 -07:00
2026-04-26 15:10:53 -07:00
2026-06-05 11:20:52 -07:00
2026-06-05 11:20:52 -07:00
2026-06-05 11:20:52 -07:00
2026-06-18 14:09:38 +02:00
2026-06-18 14:09:38 +02:00
2026-05-13 11:31:27 +02:00
2026-06-08 21:32:46 -07:00
2026-06-16 14:34:54 +02:00
2026-06-17 18:27:43 -07:00
2026-06-15 15:05:28 -07:00
2026-04-28 13:03:28 +02:00
2026-04-28 19:43:44 -07:00
2026-06-18 19:18:42 +00:00
2026-06-16 21:42:28 +00:00
2026-06-12 22:03:51 +00:00
2026-05-26 20:59:47 -07:00
2026-06-18 14:02:54 -07:00
2026-06-18 14:02:54 -07:00
2026-06-15 15:24:33 -07:00
2026-06-15 15:24:33 -07:00
2026-06-15 11:10:51 +02:00
2026-06-15 08:28:02 -07:00
2026-03-25 11:05:35 -07:00
2026-04-02 23:00:02 -07:00
2026-04-09 10:53:06 -07:00
2026-05-20 17:10:37 -07:00
2026-06-11 18:16:39 -07:00
2026-04-24 17:49:29 -07:00
2026-05-11 11:32:40 -07:00
2026-06-02 12:10:14 +02:00
2026-06-14 00:14:26 -07:00
2026-06-18 19:18:42 +00:00
2026-06-17 18:52:18 +00:00
2026-06-16 11:46:59 +02:00
2026-06-18 02:22:29 +00:00
2026-06-18 19:11:21 -05:00
2026-06-01 18:45:07 +00:00
2026-06-11 13:42:09 -07:00
2026-05-26 11:01:18 +02:00
2026-04-01 23:06:24 -07:00
2026-06-18 18:52:19 +00:00
2026-06-01 23:33:42 +00:00
2026-06-18 19:31:19 +00:00
2026-06-18 19:31:19 +00:00
2026-05-15 10:58:50 -07:00
2026-05-15 10:58:50 -07:00
2026-06-16 14:34:54 +02:00
2026-06-16 14:34:54 +02:00
2026-04-03 00:33:34 -07:00
2026-06-11 16:55:01 -07:00
2026-06-15 20:10:53 -07:00
2026-06-16 21:42:28 +00:00
2026-06-15 08:18:13 -07:00
2026-06-15 08:18:13 -07:00
2026-06-17 17:01:06 +02:00
2026-06-03 10:41:41 -07:00
2026-05-04 11:46:03 -07:00
2026-06-17 18:27:43 -07:00
2026-06-17 18:27:43 -07:00
2026-06-18 11:54:49 -07:00
2026-06-18 19:18:42 +00:00
2026-06-18 19:18:42 +00:00
2026-06-17 18:27:43 -07:00
2026-06-12 13:50:04 -07:00
2026-06-18 19:31:19 +00:00
2026-06-10 17:17:44 -07:00
2026-06-11 13:42:09 -07:00
2026-06-11 13:42:09 -07:00
2026-06-17 18:27:43 -07:00
2026-06-15 15:05:28 -07:00
2026-04-20 22:39:17 -07:00
2026-06-16 22:17:24 -07:00
2026-05-14 16:54:59 -07:00
2026-05-14 16:54:59 -07:00
2026-01-30 16:37:56 -08:00
2026-05-28 15:26:55 -07:00
2026-05-28 15:26:55 -07:00
2026-05-22 12:13:52 +02:00
2026-05-29 11:01:44 -07:00