FN-5796: make plugin same-state transitions idempotent
Prevent duplicate-state plugin updates from throwing invalid transition errors. - treat updatePluginState calls where next state equals current state as idempotent no-ops - allow same-state updates with an explicit error payload to persist error changes and emit plugin:updated - add regression tests for same-state no-op behavior, no extra stateChanged event emission, and error payload updates - add a patch changeset documenting the Dependency Graph plugin fix Files changed: .changeset/fn-5796-plugin-state-noop.md | 7 +++++ packages/core/src/__tests__/plugin-store.test.ts | 34 ++++++++++++++++++++++++ packages/core/src/plugin-store.ts | 15 +++++++++++ 3 files changed, 56 insertions(+) Fusion-Task-Id: FN-5796 Fusion-Task-Lineage: 0da1d035-383f-456c-a212-0903dc029874
This commit is contained in:
7
.changeset/fn-5796-plugin-state-noop.md
Normal file
7
.changeset/fn-5796-plugin-state-noop.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
"@runfusion/fusion": patch
|
||||
---
|
||||
|
||||
Fix a spurious Settings → Plugins error for the bundled Dependency Graph plugin where plugin startup could fail with `Invalid state transition from "started" to "started"`.
|
||||
|
||||
Plugin state transitions now treat same-state updates as idempotent no-ops, while still allowing same-state calls with an explicit error payload to update the persisted error field without emitting a state-changed transition.
|
||||
Reference in New Issue
Block a user