Skip to content

runtime: converge sweep_modules and sweep_providers behind a Sweepable trait #513

Description

@mfw78

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions