Adam Perry @ OpenAI
a4b69a0ae9
Add session-scoped stores for stable model-facing IDs ( #61339 )
...
## What changed
- Add `SessionModelIdStore` with SQLite and in-memory implementations for looking up and assigning aliases by session, namespace, and external key.
- Commit SQLite assignments before returning them, and recheck under a write transaction so concurrent writers reuse the same alias.
- Support snapshotting and initializing alias maps from generator state and ordered keys, and remove mappings when their thread is deleted.
- Expose alias stores through `ThreadStore` and add distinct types for registered environment IDs and model-facing `env` aliases.
## Testing
Add a test using two SQLite runtime instances to verify that concurrent assignments return the same alias, different keys receive different aliases, and lookups and snapshots preserve the assignments.
GitOrigin-RevId: 2668f605251ca76d4891f70f94bfb4151ba8142c
2026-11-13 18:43:58 +00:00
..
2026-11-12 17:31:24 +00:00
2026-10-29 17:25:51 +00:00
2026-11-12 23:51:52 +00:00
2026-11-12 22:41:50 +00:00
2026-11-05 16:08:23 +00:00
2026-11-13 04:51:06 +00:00
2026-11-13 07:35:46 +00:00
2026-11-12 23:08:59 +00:00
2026-11-10 01:31:19 +00:00
2026-11-13 04:51:06 +00:00
2026-11-10 11:17:06 +00:00
2026-11-07 10:41:36 +00:00
2026-11-02 17:05:56 +00:00
2026-11-04 00:19:12 +00:00
2026-11-07 10:41:36 +00:00
2026-11-13 04:48:28 +00:00
2026-11-05 22:03:29 +00:00
2026-11-13 07:35:46 +00:00
2026-11-12 21:03:47 +00:00
2026-11-05 04:25:19 +00:00
2026-11-05 05:09:32 +00:00
2026-11-05 05:09:32 +00:00
2026-11-12 16:38:13 +00:00
2026-11-12 16:38:13 +00:00
2026-11-12 23:51:52 +00:00
2026-11-12 23:51:52 +00:00
2026-11-13 05:04:45 +00:00
2026-11-13 04:51:06 +00:00
2026-11-13 08:25:41 +00:00
2026-11-10 03:02:25 +00:00
2026-11-13 01:08:55 +00:00
2026-11-07 05:59:44 +00:00
2026-11-13 18:43:21 +00:00
2026-11-12 22:43:14 +00:00
2026-11-13 08:25:41 +00:00
2026-11-12 23:51:52 +00:00
2026-11-03 23:49:01 +00:00
2026-11-03 04:08:59 +00:00
2026-11-13 04:51:06 +00:00
2026-11-13 18:42:34 +00:00
2026-11-05 04:25:19 +00:00
2026-11-12 23:51:52 +00:00
2026-11-05 00:55:46 +00:00
2026-11-13 07:35:46 +00:00
2026-11-12 23:51:52 +00:00
2026-11-13 00:29:24 +00:00
2026-11-11 19:16:19 +00:00
2026-11-06 00:37:27 +00:00
2026-11-10 08:52:35 +00:00
2026-11-10 21:58:49 +00:00
2026-11-12 21:40:00 +00:00
2026-11-12 00:27:01 +00:00
2026-11-10 03:02:25 +00:00
2026-11-13 05:16:33 +00:00
2026-11-12 04:32:34 +00:00
2026-11-13 04:50:31 +00:00
2026-11-12 23:53:50 +00:00
2026-11-13 04:36:03 +00:00
2026-11-12 22:41:50 +00:00
2026-11-02 20:34:35 +00:00
2026-11-12 19:43:12 +00:00
2026-11-06 04:24:04 +00:00
2026-11-09 16:37:22 +00:00
2026-11-13 01:43:44 +00:00
2026-11-13 18:42:34 +00:00
2026-11-12 23:08:59 +00:00
2026-11-13 00:29:24 +00:00
2026-11-13 05:04:45 +00:00
2026-11-11 18:58:21 +00:00
2026-11-12 04:32:34 +00:00
2026-11-12 21:03:15 +00:00
2026-11-13 18:43:21 +00:00
2026-11-07 10:41:36 +00:00
2026-11-13 06:39:52 +00:00
2026-11-12 23:51:52 +00:00
2026-11-04 23:46:52 +00:00
2026-11-12 23:51:52 +00:00
2026-11-06 17:47:31 +00:00
2026-11-13 18:43:58 +00:00
2026-11-13 05:06:18 +00:00
2026-10-30 07:11:56 +00:00
2026-11-13 00:28:10 +00:00
2026-11-13 18:43:58 +00:00
2026-11-11 06:41:15 +00:00
2026-11-13 06:07:04 +00:00
2026-11-12 00:44:27 +00:00
2026-11-13 18:43:58 +00:00
2026-10-30 16:35:54 +00:00
2026-11-12 23:51:52 +00:00
2026-11-12 23:51:52 +00:00
2026-11-03 15:02:57 +00:00
2026-11-12 05:21:30 +00:00
2026-11-13 01:31:24 +00:00
2026-11-12 23:53:50 +00:00
2026-10-28 21:09:05 +00:00
2026-11-13 18:43:58 +00:00
2026-11-12 23:53:50 +00:00
2026-11-12 17:31:24 +00:00
2026-11-12 23:51:52 +00:00