Problem
When RemoveNode is called for a node in Creating state (crates/engine/src/dynamic_actor.rs), the node is removed from node_states but no state update is broadcast to engine-level state subscribers. Subscribers that received the initial Creating notification will retain a stale entry until their next snapshot query via get_node_states().
Details
This is consistent with shutdown_node's existing pattern — it also doesn't broadcast an explicit removal event, relying on the node transitioning through Failed/Stopped before being cleaned up. For the Creating→removed path there is no intermediate state.
Note that UI consumers are unaffected because the WebSocket layer handles NodeRemoved separately via handle_remove_node, which broadcasts to clients before sending the engine control message.
Suggested fix
Consider broadcasting a NodeState::Stopped or a dedicated removal event before removing the node from node_states, so that engine-level state subscribers (e.g., metrics collectors, monitoring tools) get an explicit signal.
Context
Identified during review of PR #286 (async AddNode). Low priority — UI consumers are already notified through the API layer.
Problem
When
RemoveNodeis called for a node inCreatingstate (crates/engine/src/dynamic_actor.rs), the node is removed fromnode_statesbut no state update is broadcast to engine-level state subscribers. Subscribers that received the initialCreatingnotification will retain a stale entry until their next snapshot query viaget_node_states().Details
This is consistent with
shutdown_node's existing pattern — it also doesn't broadcast an explicit removal event, relying on the node transitioning through Failed/Stopped before being cleaned up. For the Creating→removed path there is no intermediate state.Note that UI consumers are unaffected because the WebSocket layer handles
NodeRemovedseparately viahandle_remove_node, which broadcasts to clients before sending the engine control message.Suggested fix
Consider broadcasting a
NodeState::Stoppedor a dedicated removal event before removing the node fromnode_states, so that engine-level state subscribers (e.g., metrics collectors, monitoring tools) get an explicit signal.Context
Identified during review of PR #286 (async AddNode). Low priority — UI consumers are already notified through the API layer.