pakrym-oai and GitHub
5c12034e42
core: add UUIDv7 context window IDs ( #28953 )
...
## Why
The token-budget context currently identifies a context window by its
thread-local sequence number. A UUIDv7 gives the model a stable opaque
identity that remains fixed for a window and rotates when compaction or
`new_context` starts the next one.
## What changed
- Preserve the existing monotonic value as `window_number` and add a
UUIDv7 `window_id` to `CompactedItem`.
- Generate and rotate the UUID with auto-compaction window state,
persist it alongside the number, and reconstruct it on resume and
rollback.
- Accept legacy compacted rollout records where the numeric `window_id`
represented the window number.
- Use the UUID only in token-budget context; existing request headers
and metadata continue using `thread_id:window_number`.
## Testing
- `just test -p codex-protocol compacted_item::tests`
- `just test -p codex-core token_budget`
2026-06-18 17:00:49 -07:00
..
2026-06-18 17:00:49 -07:00
2026-06-08 13:55:15 -07:00
2026-06-08 13:55:15 -07:00
2026-06-08 14:21:28 +02:00
2026-06-15 21:53:47 -07:00
2026-05-27 11:09:33 -07:00
2026-06-18 15:06:23 -07:00
2026-06-15 21:53:47 -07:00
2026-06-18 15:13:55 +02:00
2026-06-15 21:53:47 -07:00
2026-06-15 21:53:47 -07:00
2026-06-15 21:53:47 -07:00
2026-06-18 19:18:42 +00:00
2026-06-16 20:14:23 -07:00
2026-05-14 16:15:56 -07:00
2026-06-08 13:55:15 -07:00
2026-06-15 21:53:47 -07:00
2026-06-18 02:22:29 +00:00
2026-06-18 11:54:49 -07:00
2026-06-18 15:06:23 -07:00
2026-06-18 19:18:42 +00:00
2026-05-14 18:04:26 -07:00
2026-06-15 21:53:47 -07:00
2026-06-18 14:09:38 +02:00
2026-06-11 16:32:52 -07:00
2026-06-18 11:54:49 -07:00
2026-06-08 13:55:15 -07:00
2026-06-15 21:53:47 -07:00
2026-06-15 21:53:47 -07:00
2026-06-15 15:05:28 -07:00
2026-06-17 06:03:00 +00:00
2026-06-08 13:55:15 -07:00
2026-06-15 21:53:47 -07:00
2026-06-18 04:07:54 +00:00
2026-06-17 08:50:39 -07:00
2026-06-18 16:13:07 -07:00
2026-05-18 21:03:51 -07:00
2026-06-11 23:23:44 -07:00
2026-06-10 20:42:55 -07:00
2026-06-15 21:53:47 -07:00
2026-06-10 20:42:55 -07:00
2026-06-08 13:55:15 -07:00
2026-06-16 11:27:46 -07:00
2026-06-08 13:55:15 -07:00
2026-06-08 13:55:15 -07:00
2026-06-15 21:53:47 -07:00
2026-06-08 13:55:15 -07:00
2026-06-02 12:10:14 +02:00
2026-06-10 20:42:55 -07:00
2026-06-15 21:53:47 -07:00
2026-06-15 21:53:47 -07:00
2026-06-15 15:05:28 -07:00
2026-06-08 13:55:15 -07:00
2026-06-18 11:54:49 -07:00
2026-06-18 23:39:21 +00:00
2026-06-15 21:53:47 -07:00
2026-06-08 13:55:15 -07:00
2026-06-15 21:53:47 -07:00
2026-06-16 20:45:57 +00:00
2026-06-16 23:44:42 +00:00
2026-06-15 21:53:47 -07:00
2026-06-08 13:55:15 -07:00
2026-06-11 10:07:19 +00:00
2026-06-18 11:54:49 -07:00
2026-06-08 13:55:15 -07:00
2026-06-15 21:53:47 -07:00
2026-06-18 14:02:54 -07:00
2026-06-18 18:52:19 +00:00
2026-06-15 21:53:47 -07:00
2026-06-08 13:55:15 -07:00
2026-06-18 14:02:54 -07:00
2026-06-15 21:53:47 -07:00
2026-06-15 21:53:47 -07:00
2026-06-15 21:53:47 -07:00
2026-06-08 13:55:15 -07:00
2026-06-15 21:53:47 -07:00
2026-06-15 21:53:47 -07:00
2026-06-15 08:06:14 -07:00
2026-06-08 13:55:15 -07:00
2026-06-08 13:55:15 -07:00
2026-06-18 11:54:49 -07:00
2026-06-18 17:00:49 -07:00
2026-06-15 21:53:47 -07:00
2026-06-15 21:53:47 -07:00
2026-06-15 21:53:47 -07:00
2026-06-15 21:53:47 -07:00
2026-06-15 21:53:47 -07:00
2026-06-08 13:55:15 -07:00
2026-06-18 05:00:04 +00:00
2026-06-18 16:13:07 -07:00
2026-06-08 13:55:15 -07:00
2026-06-16 10:37:06 -07:00
2026-06-16 00:38:41 +00:00
2026-06-15 21:53:47 -07:00
2026-06-08 13:55:15 -07:00
2026-06-15 21:53:47 -07:00
2026-06-18 14:09:38 +02:00