Add thread metadata store API#21873
Conversation
f8dfb0b to
8a074e0
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8a074e002c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| #[allow(dead_code)] | ||
| mod thread_metadata_handler; |
There was a problem hiding this comment.
Wire the metadata handler into LiveThread
This module is added under #[allow(dead_code)], so the new ThreadMetadataHandler is never owned by LiveThread; LiveThread::append_items still calls only append_items and never apply_thread_metadata. Stores that rely on the new explicit metadata API won't receive previews, token counts, memory mode, or git updates despite the README documenting that flow.
Useful? React with 👍 / 👎.
This does not change behavior yet. It adds new API substrate for moving thread metadata to be explicitly handled by the ThreadStore rather than implicitly handled by the RolloutRecorder. It large duplicates logic that lives in the rollout recorder today. #21874 removes that logic from the rollout recorder and starts calling these new methods.
Summary
ThreadStore::apply_thread_metadataAPI and metadata update paramsThreadMetadataHandlerwith focused tests for initial metadata, resume, user message, and metadata patchesLocalThreadStoremetadata application for SQLite plus name-index fallbackLiveThread/ThreadStore/RolloutRecorderresponsibilities