Skip to content

Fix issue_253: clear nested defer queue on sub-state-machine exit#8

Merged
gabewillen merged 2 commits into
mainfrom
fix/issue-253-nested-defer-on-exit
Feb 23, 2026
Merged

Fix issue_253: clear nested defer queue on sub-state-machine exit#8
gabewillen merged 2 commits into
mainfrom
fix/issue-253-nested-defer-on-exit

Conversation

@gabewillen

Copy link
Copy Markdown

Summary

  • clear deferred events owned by a nested sub-state-machine when transitioning out of that sub-state-machine
  • reset sub-state-machine defer processing state on exit
  • add a focused regression test (test_issue_253) reproducing and validating the original issue

Details

Validation

  • ran ./scripts/quality_gates.sh
  • all quality gates passed (format, clang-tidy, regression matrix, sanitizers, coverage, benchmark smoke)

Copilot AI review requested due to automatic review settings February 23, 2026 21:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes boost-ext#253 by ensuring deferred events belonging to a nested sub-state-machine don’t leak across sub-SM exit/re-entry, and adds a focused functional test to prevent regressions.

Changes:

  • Add a new FT regression test validating that nested sub-SM deferred events are cleared on exit/re-entry.
  • Update composite-state initialization to recurse into nested composite sub-state-machines.
  • Clear a sub-state-machine’s defer queue and reset its defer-processing state when transitioning out of that sub-state-machine.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
include/boost/sml.hpp Adds defer-queue clearing + defer-processing reset on sub-SM exit; recurses composite initialization.
test/ft/issue_253.cpp New regression test reproducing issue boost-ext#253 and validating fixed behavior.
test/ft/CMakeLists.txt Registers the new test_issue_253 executable/test with CTest.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread include/boost/sml.hpp Outdated
Comment thread include/boost/sml.hpp
Comment thread test/ft/issue_253.cpp
@gabewillen gabewillen merged commit 16069ad into main Feb 23, 2026
10 checks passed
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.

2 participants