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

fix: inferStatePrefix... should default to s1 as the first intermediate state. #199

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

alexkeizer
Copy link
Collaborator

Description:

We claim in the error that we fall back to s1 as the first intermediate state if we can't infer anything.
However, the implementation actually used s2.

This PR fixes that by setting currentStateNumber := 0 in the fallback case. The off-by-one behaviour is because this number is incremented before it's used to generate a new state.

Testing:

What tests have been run? Did make all succeed for your changes? Was
conformance testing successful on an Aarch64 machine? Yes

License:

By submitting this pull request, I confirm that my contribution is
made under the terms of the Apache 2.0 license.

…ediate state.

This means setting `currentStateNumber := 0`
@alexkeizer alexkeizer requested a review from shigoel as a code owner September 26, 2024 22:02
@bollu
Copy link
Collaborator

bollu commented Sep 27, 2024

LGTM, though maybe calling it currentStateNumber isn't the best, how about lastSeenStateNumber? You're the czar of this pat of the repo, so I leave it to you.

@shigoel shigoel merged commit 06bc3ec into main Sep 27, 2024
5 checks passed
@shigoel shigoel deleted the fix-inferstate branch September 27, 2024 16:57
@alexkeizer
Copy link
Collaborator Author

LGTM, though maybe calling it currentStateNumber isn't the best, how about lastSeenStateNumber? You're the czar of this pat of the repo, so I leave it to you.

Hmm, it matches the number of the currentState field of the AxEffects, so we'd have to change that one as well to be consistent, and I kind of like the currentState name

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.

3 participants