Add durable per-thread user submission queues (#36952)

## What changed

- Add a storage-neutral `QueueStore` interface backed by a dedicated SQLite
  database for ordered, thread-scoped user submissions.
- Support enqueueing, paginated listing, editing, deletion, and atomic
  reordering, with a limit of 100 pending items per thread.
- Remove queued submissions when their thread is deleted.

## Testing

- Cover concurrent inserts, ordering and pagination, edits, deletion,
  cross-thread isolation, queue limits, and thread cleanup.

GitOrigin-RevId: 0a8e95ac71137afc6f3a039d4b5fc8603110c891
This commit is contained in:
efrazer-oai authored and copyberry committed 2026-08-04 19:23:29 +00:00
1 parent 449f099f1c
commit b87981a510
14 files changed
+585 -2

No files matched your search

+5
View File
@@ -8,11 +8,14 @@ mod error;
mod in_memory;
mod live_thread;
mod local;
mod queue_store;
mod store;
mod thread_metadata_sync;
mod thread_sections;
mod types;
pub use codex_state::MAX_QUEUE_ITEMS;
pub use codex_state::QueuedUserSubmissionRecord;
pub use error::ThreadStoreError;
pub use error::ThreadStoreResult;
pub use in_memory::InMemoryThreadStore;
@@ -21,6 +24,8 @@ pub use live_thread::LiveThread;
pub use live_thread::LiveThreadInitGuard;
pub use local::LocalThreadStore;
pub use local::LocalThreadStoreConfig;
pub use queue_store::LocalQueueStore;
pub use queue_store::QueueStore;
pub use store::ThreadStore;
pub use store::ThreadStoreFuture;
pub use thread_sections::CreateThreadSectionParams;