[NEAT-734] 👮 Experiment idempotent #1034
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Basic idea for how to implement a lock down of the neat session such that the user cannot call the 'wrong' methods. Instead get an appropriate error message.
I think the way to do this is to change the
SessionState
into something like the following. In other words, control all changes to the state through a change method that validates that you can do the change. For example, you can only import a data model, if you do not already have a data model. Furthermore, all export/load/read is also exposed so we can use that, but we are not allowed to change the state through any other method than change.Bump
Changelog
Changed/Improved
NeatSession
are now strictly validated.