You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
state: StartEffects leaves out a compound state's services and actors, so Start and Recover don't start them #249
Instance.StartEffects covers the active leaves only. A service or actor declared on a compound state starts when a Fire enters that state, since the kernel's entry path emits every entered state's invokes, but not when Start casts into it or Recover resumes in it. A durable instance that starts in, or recovers into, a compound state runs without that state's services and actors.
Why it isn't a one-line change
Widening StartEffects to every active state was tried in #234 and reverted, to keep state's v1 behavior unchanged there:
after a Restore, a compound state's service or actor may already have settled into one of its children, and the snapshot can't say, so starting it again runs it twice. durable would need to record which settled (it records ended actors and settled services now, but only for this version's journals);
a checkpoint an older version wrote records neither, so Recover from one would need to treat a compound state's invokes as settled;
ResumeEffects has to stay leaves-only for the same reason.
Tests:#234 adds skipped tests for this: TestRecover_SpawnsASuperstatesActor, TestRecover_DoesNotRearmASuperstatesSettledService, TestRecover_StartsAServiceAnActorsMessageReentered and TestRecover_ARetriedSpawnsMessageDoesNotRestartARunningActor.
Activity
revert: keep state's v1 behavior; track compound starts and undeclare…
fix(durable): don't journal a step whose context ended partway (#234)