Skip to content

Comments

fix: make disconnected states validation hierarchy-aware#573

Merged
fgmacedo merged 1 commit intodevelopfrom
fix/validate-disconnected-states-hierarchy
Feb 19, 2026
Merged

fix: make disconnected states validation hierarchy-aware#573
fgmacedo merged 1 commit intodevelopfrom
fix/validate-disconnected-states-hierarchy

Conversation

@fgmacedo
Copy link
Owner

Summary

  • The visit_connected_states BFS now traverses the state hierarchy: entering a compound/parallel state implicitly visits its initial children, and visiting a child state visits all ancestor states. This mirrors SCXML hierarchical entry semantics.
  • Removes validate_disconnected_states = False from all parallel, compound, and history state examples across tests, docs, and README — the flag was only needed because the validator didn't understand the hierarchy.
  • Adds 4 dedicated tests for the validation behavior (flag bypass, parallel, compound, history reachability).

The `visit_connected_states` BFS now traverses the state hierarchy:
entering a compound/parallel state implicitly enters its initial
children, and being in a child implies being in all ancestor states.

This removes the need for `validate_disconnected_states = False` in
virtually all parallel, compound, and history state examples — the
flag was only needed because the validator didn't understand
hierarchical entry semantics.
@sonarqubecloud
Copy link

@codecov
Copy link

codecov bot commented Feb 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (dd6f3c9) to head (4ca8045).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@            Coverage Diff            @@
##           develop      #573   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           33        33           
  Lines         4044      4051    +7     
  Branches       635       639    +4     
=========================================
+ Hits          4044      4051    +7     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fgmacedo fgmacedo merged commit 4d49dab into develop Feb 19, 2026
19 of 20 checks passed
@fgmacedo fgmacedo deleted the fix/validate-disconnected-states-hierarchy branch February 19, 2026 13:53
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.

1 participant