Repository navigation
Optional JSON replay example for a synchronous draft actor #5824
Replies: 1 comment 1 reply
|
Thanks for sharing this. Keeping the adapter external and dependency-free is a sensible approach. I see value in small, shareable JSON traces that reproduce a specific sequence of events and verify the resulting snapshots, particularly for regression reports that are difficult to reproduce from prose alone. This complements rather than replaces XState’s existing [actor testing and model-based testing tools](https://stately.ai/docs/testing). The synchronous scope and explicit limitations are also good choices. One useful next step would be to document the trace format and expected state after each step, making examples easy to review and reuse in regression tests. If a recurring need emerges, that could help establish whether a shared trace format belongs in XState itself. |
Uh oh!
There was an error while loading. Please reload this page.
I built an external adapter and replay example for small, shareable regression traces. Three scenarios exercise a small synchronous edit/save/cancel machine on XState 5.33.3: cancellation, validation guards and persisted-snapshot restore. All 18 steps pass.
This shares fixed example traces; it does not replace model-based testing, graph traversal or v6 durable execution. Timers and async actors are outside its scope.
I maintain the experimental interaction-check runner. The example uses pinned stable packages, stays outside the project and adds no runtime dependency. Feedback on whether this helps share small reproducers is welcome.
All reactions