Skip to content

No explicit state broadcast when RemoveNode cancels a Creating node #290

@staging-devin-ai-integration

Description

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions