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
Problem
Two divergences between the state-persistence base classes on the most operationally important path:
DurableStateActor'spersistcatch isif (err instanceof DurableStateConcurrencyError) throw err; throw err;— two branches doing the same thing; it exists only to look like handling.preStartawaitsstore.load(...)with no guard (src/persistence/DurableStateActor.ts:74-88), so a transient store failure at startup becomes a rawActorInitializationError— whereasPersistentActorhas a documentedonRecoveryFailurehook with a reasoned stop-instead-of-stash fallback (src/persistence/PersistentActor.ts:90-101, 165-195).Proposed behaviour
Delete the dead branch; give
DurableStateActorthe sameonRecoveryFailure(reason)contract and stop-on-failure behaviour asPersistentActor.Acceptance criteria
loadrejects: the hook fires and the actor stops rather than stashing forever.Related: #516 (closed), #534