Problem
In the dynamic engine actor (crates/engine/src/dynamic_actor.rs), if a background node creation task's NodeCreatedEvent send fails (e.g., because the actor's receiver has been dropped during shutdown), the pending connections referencing that node would remain in self.pending_connections indefinitely.
Details
The spawned creation task uses let _ = tx.send(...).await which silently drops send failures. While spawn_blocking panics are caught and converted to error results, the send itself could fail if the actor loop has moved on. In practice this is unlikely since the actor loop runs until explicit shutdown (which clears pending connections), but there's no defense-in-depth mechanism.
Suggested fix
Consider adding:
- A periodic sweep that removes pending connections referencing nodes no longer in
node_states
- Or a timeout on pending connections (e.g., if a connection has been pending for > 60s, log a warning and drain it)
Context
Identified during review of PR #286 (async AddNode). Low priority — the current code handles the common failure paths correctly (creation failure, initialization failure, RemoveNode while Creating, Shutdown).
Problem
In the dynamic engine actor (
crates/engine/src/dynamic_actor.rs), if a background node creation task'sNodeCreatedEventsend fails (e.g., because the actor's receiver has been dropped during shutdown), the pending connections referencing that node would remain inself.pending_connectionsindefinitely.Details
The spawned creation task uses
let _ = tx.send(...).awaitwhich silently drops send failures. Whilespawn_blockingpanics are caught and converted to error results, the send itself could fail if the actor loop has moved on. In practice this is unlikely since the actor loop runs until explicit shutdown (which clears pending connections), but there's no defense-in-depth mechanism.Suggested fix
Consider adding:
node_statesContext
Identified during review of PR #286 (async AddNode). Low priority — the current code handles the common failure paths correctly (creation failure, initialization failure, RemoveNode while Creating, Shutdown).