codex: move unloaded thread writes into store (#18361)

- Migrates unloaded `thread/name/set` and `thread/memoryModeSet`
app-server writes behind the generic
`ThreadStore::update_thread_metadata` API rather than adding one-off
store methods for setting thread name or memory mode.
- Implements the local ThreadStore metadata patch path for thread name
and memory mode, including rollout append, legacy name index updates,
SessionMeta validation/update, SQLite reconciliation, and re-reading the
stored thread.
- Adds focused local thread-store unit coverage plus app-server
integration coverage for the migrated unloaded write paths.
This commit is contained in:
Tom authored and GitHub committed 2026-04-20 09:50:01 -07:00
1 parent 0dc503ba6e
commit ac7c9a685f
7 files changed
+458 -135

No files matched your search

+3 -7
View File
@@ -3,6 +3,7 @@ mod helpers;
mod list_threads;
mod read_thread;
mod unarchive_thread;
mod update_thread_metadata;
#[cfg(test)]
mod test_support;
@@ -17,7 +18,6 @@ use crate::ListThreadsParams;
use crate::LoadThreadHistoryParams;
use crate::ReadThreadParams;
use crate::ResumeThreadRecorderParams;
use crate::SetThreadNameParams;
use crate::StoredThread;
use crate::StoredThreadHistory;
use crate::ThreadPage;
@@ -75,15 +75,11 @@ impl ThreadStore for LocalThreadStore {
list_threads::list_threads(self, params).await
}
async fn set_thread_name(&self, _params: SetThreadNameParams) -> ThreadStoreResult<()> {
unsupported("set_thread_name")
}
async fn update_thread_metadata(
&self,
_params: UpdateThreadMetadataParams,
params: UpdateThreadMetadataParams,
) -> ThreadStoreResult<StoredThread> {
unsupported("update_thread_metadata")
update_thread_metadata::update_thread_metadata(self, params).await
}
async fn archive_thread(&self, params: ArchiveThreadParams) -> ThreadStoreResult<()> {