Revert "Move skills watcher to app-server"#21460
Conversation
This reverts commit d5eea22.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1c3adb364c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| id: sess.next_internal_sub_id(), | ||
| msg: EventMsg::SkillsUpdateAvailable, | ||
| }; | ||
| sess.send_event_raw(event).await; |
There was a problem hiding this comment.
Clear the skill cache before notifying clients
When a watched skill changes, this listener can now publish SkillsUpdateAvailable to the app-server before the separate cache-clearing task in thread_manager.rs has processed the same broadcast event. In the app-server flow, that immediately becomes SkillsChanged, whose schema tells clients to re-run skills/list; if they do so with forceReload: false, they can still read stale metadata because cache invalidation is racing in another task. The previous app-server watcher cleared the cache and then sent the notification in the same async path, so the notification should be ordered after skills_manager.clear_cache().
Useful? React with 👍 / 👎.
Reverts #21287