Skip to content

fix(modelchecker): check transition assertions at yield points only - #474

Open
lczyk wants to merge 2 commits into
fizzbee-io:mainfrom
lczyk:fix/transition-at-yield
Open

lczyk wants to merge 2 commits into
fizzbee-io:mainfrom
lczyk:fix/transition-at-yield

Conversation

@lczyk

@lczyk lczyk commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

fixes #387.

transition assertions ran on every node inside an action, including the fork a oneof makes, with before = direct parent. that gave:

now they run only at yield points, like always assertions, and before is 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 oneof branch that writes nothing after the fork was only transition-checked on main via the fork state. now it follows the same enabledness rule as always (disabled unless it runs a statement, e.g. else: pass).

testing

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.
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.

bug: transition assertion fails on an intermediate state created by oneof in an atomic action

1 participant