8000 Tags · looplab/fsm · GitHub
[go: up one dir, main page]

Skip to content

Tags

Tags

v1.0.4

Toggle v1.0.4's commit message
fix: clear the transition when the context is canceled

transitionFunc returns early when ctx.Err() != nil, but does not clear
f.transition on the way out — only the completed path below it does. Since
f.transition was already published before the context was ever checked, the FSM is
left in transition permanently: every later Event returns InTransitionError, Can()
returns false, and Transition() cannot help either, because it re-runs this same
closure and takes this same early return. Only constructing a new FSM recovers.

A state whose leave callback cancels is spared, because leaveStateCallbacks
returning CanceledError clears the flag. A state with no callbacks at all is not —
so whether a canceled context bricks the FSM depends on whether the state you
happen to be leaving has a callback registered.

Clears it with the same lock the completed path takes, and leaves e.Err untouched,
so Event still returns the context error to the caller as before.

Fixes #115.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

v1.0.3

Toggle v1.0.3's commit message
feat(errors): implement error wrapping

v1.0.2

Toggle v1.0.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Deadlock calling Event in after-event callback when current state == …

…dst (#104)

* Deadlock in afterEventCallbacks in case when src == dst fixed

* Test added

---------

Co-authored-by: Igor Kuzmin <i.kuzmin@webinar.ru>

v1.0.1

Toggle v1.0.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
race fixes (#94)

* race fixes

* race flag

* ci race flag

* update transition within state mutex, this prevents races at Can calls

---------

Co-authored-by: Emin Tasgetiren <emin.tasgetiren@abex.capital>

v1.0.0

Toggle v1.0.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Add ability to delete from fsm metadata by key (#93)

v0.3.0

Toggle v0.3.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
ci: Use GitHub Actions (#66)

v0.2.0

Toggle v0.2.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
fix typo (#58)

closes: #53

v0.1.0

Toggle v0.1.0's commit message
Switch to TravisCI

0