Skip to content

with_supervision_strategy() and with_restart_limiter() are public API with no runtime effect #7

Description

@rrrodzilla

Problem

ActorConfig::with_supervision_strategy() and ActorConfig::with_restart_limiter() are public, documented configuration API, but the runtime never reads either value. Users who configure them get no behavior change.

Evidence (v8.1.1)

  • SupervisionStrategy::decide() (acton-reactive/src/actor/supervision.rs:157), requires_group_restart() (:180), RestartLimiter::can_restart() (acton-reactive/src/actor/restart_limiter.rs:171), and record_restart() (:200) have zero non-test call sites in src/.
  • ManagedActor.supervision_strategy (managed_actor.rs:114) is written during actor construction (idle.rs:828) and moved on state transition (idle.rs:978) but never read by framework code.
  • ActorConfig::restart_limiter_config() is annotated #[allow(dead_code)] // Will be used when supervision fully integrates restart limiting (actor_config.rs:260-262).
  • The termination path (started.rs:504-610) only notifies: it sends ChildTerminated to the parent. There is no restart code path anywhere.

Options

  1. Integrate: implement the supervision loop — on ChildTerminated, call strategy.decide(), consult the restart limiter, and restart per the decision. (The decision helpers and limiter are already implemented and unit-tested; only the wiring is missing.)
  2. Or document-and-defer: mark both builder methods #[deprecated] or doc-comment them as inert until integration lands, so users aren't misled by the API surface.

Docs status

The docs site has been rewritten (supervision-basics, custom-supervision, migration-guide, error-handling pages) to present supervision as explicit primitives the parent applies in its own mutate_on::<ChildTerminated> handler, and to state plainly that these two builder methods currently record intent only. If option 1 lands, those pages should be updated again.

Found during a full docs-vs-source audit of v8.1.1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions