From #445 review (comment). Confirmed still valid at HEAD. Follow-up, not blocking. Target: L1 nexum-runtime (src/supervisor.rs).
sweep_providers / try_restart_provider / LoadedProvider / defer_provider_restart (supervisor.rs:1583 / 1640 / 270 / 1922) are a hand-duplicated copy of sweep_modules / try_restart / LoadedModule / record_failure_and_maybe_poison (:1490ish / 1547 / 197 / 1898): the same death-detection, backoff, poison, and restart control flow, not a shared generic loop. A third actor kind needing sweep participation would need its own bespoke sweep_x / try_restart_x / LoadedX.
Change
Introduce a Sweepable trait (is_alive / mark_checked / restart, plus failure-count and poison accessors) so sweep_modules and sweep_providers converge into one generic loop over &mut [impl Sweepable].
Acceptance criteria
- A single generic sweep loop drives both modules and providers; adding a third actor kind is a trait impl, not a copied loop.
sweep_providers/try_restart_provider/LoadedProvider/defer_provider_restart(supervisor.rs:1583/1640/270/1922) are a hand-duplicated copy ofsweep_modules/try_restart/LoadedModule/record_failure_and_maybe_poison(:1490ish /1547/197/1898): the same death-detection, backoff, poison, and restart control flow, not a shared generic loop. A third actor kind needing sweep participation would need its own bespokesweep_x/try_restart_x/LoadedX.Change
Introduce a
Sweepabletrait (is_alive/mark_checked/restart, plus failure-count and poison accessors) sosweep_modulesandsweep_providersconverge into one generic loop over&mut [impl Sweepable].Acceptance criteria