pub fn compute_reverse_stop_order(active_ids: &[DaemonId]) -> Vec<Vec<DaemonId>>Expand description
Compute the order in which daemons should be stopped, respecting reverse dependency order (dependents first, then their dependencies).
This is a shared helper used by both the supervisor’s close() and
the IPC stop_daemons() batch operation.
Returns a list of levels in reverse dependency order. Each level is a
Vec<DaemonId> of daemons that can be stopped concurrently.
Ad-hoc daemons (not in config) are placed in the first level.
Falls back to a single level containing all IDs if config loading or dependency resolution fails.