Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional safeguards #94

Merged
merged 3 commits into from
Mar 22, 2024
Merged

Additional safeguards #94

merged 3 commits into from
Mar 22, 2024

Conversation

elijahbenizzy
Copy link
Contributor

@elijahbenizzy elijahbenizzy commented Mar 21, 2024

See #88 for context.

Changes:

  • Error out if state that is declared to be written is not, in fact, written to during an action
  • Error out if the result is not a dictionary

If your action declares a state write that it does not apply, it will
now error out. This is backwards compatible, as that was always
considered undefined behavior, and bad practice.

Note that this does not mess with deleting state in actions, as that is
not declared in the writes() field. We will want to handle it later.
This is a common mistake. We need them to be dictionaries as that's what
the framework expects, but it breaks in serialization (too late)
@elijahbenizzy elijahbenizzy merged commit 6dc7a8f into main Mar 22, 2024
6 checks passed
@elijahbenizzy elijahbenizzy deleted the safeguards branch March 22, 2024 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants