mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
[codex] Move persistence policy application into ThreadStore (#27318)
Move the application of the persistence policy into the thread store, so thread stores can get raw append items rather than canonical append items. This will enable store-specific projections over the raw input items.
This commit is contained in:
@@ -36,11 +36,10 @@ pub trait ThreadStore: Any + Send + Sync {
|
||||
/// Reopens an existing thread for live appends.
|
||||
async fn resume_thread(&self, params: ResumeThreadParams) -> ThreadStoreResult<()>;
|
||||
|
||||
/// Appends canonical rollout items to a live thread.
|
||||
/// Appends raw rollout items to a live thread.
|
||||
///
|
||||
/// This is the raw history API. It does not infer metadata from item contents. Callers that
|
||||
/// need metadata updates should call [`ThreadStore::update_thread_metadata`] with explicit
|
||||
/// metadata facts prepared above the store.
|
||||
/// Implementations should apply the shared rollout persistence policy before writing durable
|
||||
/// replay history and before updating any implementation-owned projections.
|
||||
async fn append_items(&self, params: AppendThreadItemsParams) -> ThreadStoreResult<()>;
|
||||
|
||||
/// Materializes the thread if persistence is lazy, then persists all queued items.
|
||||
|
||||
Reference in New Issue
Block a user