Repository navigation
Conversation
Transition assertions ran on every node inside an action, including the intermediate fork a oneof makes in an atomic action, with before taken from the direct parent. That failed on fork states no action ends in, and gave the end states after a fork the fork state as before, so a change made before the fork was invisible to the assertion and a real violation could pass. Check them only where the step yields, as always assertions are, and take before from the nearest yield ancestor: the state the step started from. Refinement checks are unchanged. Fixes fizzbee-io#387.
Drop a regression spec the before-action-start spec already covers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
fixes #387.
transition assertions ran on every node inside an action, including the fork a
oneofmakes, withbefore= direct parent. that gave:oneofin an atomic action #387 repro).beforewas the fork, so a change made before it was invisible (tests/specs/transition-before-action-start).now they run only at yield points, like
alwaysassertions, andbeforeis the nearest yield ancestor, i.e. the step's start. refinement checks are unchanged.this changes which states transition assertions see. related to #441: a
oneofbranch that writes nothing after the fork was only transition-checked on main via the fork state. now it follows the same enabledness rule asalways(disabled unless it runs a statement, e.g.else: pass).testing
tests/specs/transition-oneof-fork: bug: transition assertion fails on an intermediate state created byoneofin an atomic action #387 repro. FAILED on main, PASSED here.tests/specs/transition-before-action-start{,-no-graph}: PASSED on main, FAILED here.test_references.pyincl. lovable: 175 passed, 0 failed, no baseline changed. ci unit targets pass.