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

Wiping state does not appear to work #28

Closed
elijahbenizzy opened this issue Feb 19, 2024 · 1 comment
Closed

Wiping state does not appear to work #28

elijahbenizzy opened this issue Feb 19, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@elijahbenizzy
Copy link
Contributor

When calling:

state.wipe(keep=...)

as part of an action, it doesn't apply the difference. This is because we use a merge operation on a subset of the state, which is added back in. Thus if its missing it doesn't matter, it just takes the old value. Two options:

  1. (short-term) Check the missing keys and delete them from the final state (this is a bit of a hack but it should work). We have to do this by diffing the state before/after update and remembering the missing ones.
  2. (medium/long-term) Instead of diffing the state at each step, we should just apply deltas. Then we do a commit operation afterwards, which gather all of them. The fork/merge op will just gather the deltas, then we apply them to the final state in the order we got them in.

(1) will be good for v0

@elijahbenizzy elijahbenizzy added the bug Something isn't working label Feb 19, 2024
@elijahbenizzy elijahbenizzy self-assigned this Feb 19, 2024
@elijahbenizzy
Copy link
Contributor Author

This is fixed: #29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant