Skip to content

[Feature] DurableStateActor onRecoveryFailure hook — recovery-failure parity with PersistentActor #692

Description

@pathosDev

Problem

Two divergences between the state-persistence base classes on the most operationally important path:

  • DurableStateActor's persist catch is if (err instanceof DurableStateConcurrencyError) throw err; throw err; — two branches doing the same thing; it exists only to look like handling.
  • preStart awaits store.load(...) with no guard (src/persistence/DurableStateActor.ts:74-88), so a transient store failure at startup becomes a raw ActorInitializationError — whereas PersistentActor has a documented onRecoveryFailure hook with a reasoned stop-instead-of-stash fallback (src/persistence/PersistentActor.ts:90-101, 165-195).

Proposed behaviour

Delete the dead branch; give DurableStateActor the same onRecoveryFailure(reason) contract and stop-on-failure behaviour as PersistentActor.

Acceptance criteria

  • A store whose load rejects: the hook fires and the actor stops rather than stashing forever.

Related: #516 (closed), #534

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpriority: lowNice-to-have / niche / demand-driven

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions