Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9880db04e4
ℹ️ 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".
| if matches!(state.as_ref(), CoreState::Running) { | ||
| self.stop().await?; | ||
| } |
There was a problem hiding this comment.
Release manager lock before calling stop in restart
restart holds self.manager via manager_guard and then awaits self.stop(), but stop() acquires the same mutex, so restart requests deadlock whenever the core is running. This blocks the /core/restart flow and leaves the service unable to process that operation until restart logic is rewritten to drop the lock before awaiting.
Useful? React with 👍 / 👎.
| let socket_id = state.events_subscribers.len() + 1; | ||
| let (tx, mut rx) = tokio::sync::mpsc::channel(100); | ||
| state.events_subscribers.insert(socket_id, tx); |
There was a problem hiding this comment.
Generate unique websocket subscriber IDs
Using len() + 1 to assign socket_id can reuse an existing key after disconnect churn or concurrent connects, and DashMap::insert will replace the previous sender for that key. When that happens, an already-connected client is silently unsubscribed and stops receiving broadcast events.
Useful? React with 👍 / 👎.
| let name = name_str.as_str().to_fs_name::<GenericFilePath>()?; | ||
| #[cfg(unix)] | ||
| { | ||
| crate::utils::remove_socket_if_exists(placeholder).await?; |
There was a problem hiding this comment.
Remove or implement missing unix socket cleanup helper
On unix builds, create_server calls crate::utils::remove_socket_if_exists, but this helper is not defined in chimera_ipc::utils in this commit. That makes unix builds with the server feature fail at compile time, so the service cannot be built for that target.
Useful? React with 👍 / 👎.
@codex review