Add completion<T> post-event transition support#11
Merged
gabewillen merged 3 commits intomainfrom Feb 24, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds support for a new internal event type completion<T> that allows transitions to fire after a specific event type has been handled but before anonymous transitions. The completion events maintain the origin event type even when events are processed from queues or defer queues.
Changes:
- Added
completion<T>internal event type and public API alias - Refactored event processing to run completion events before anonymous transitions in a unified post-event loop
- Added comprehensive tests for completion event ordering and queue/defer origin tracking
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| include/boost/sml.hpp | Core implementation: added completion event type, event mapping helpers, and refactored process_event to use process_event_and_post_events with unified post-event processing loop |
| test/ft/transitions.cpp | Added test verifying completion events run before anonymous transitions |
| test/ft/actions_process_n_defer.cpp | Added tests for completion events with process queue and defer queue, verifying origin type is refreshed per popped event; also fixed missing trailing newline |
| test/ft/issue_171.cpp | Added regression test ensuring wildcard event handlers are not triggered by internal completion/anonymous events |
| test/ft/CMakeLists.txt | Registered new issue_171 test |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
completion<T>and a public aliassml::completion<T>completion<origin_event_type>after each handled event (before anonymous progression)Details
process_eventnow routes through a shared helper that does:completion<origin>first, then anonymous transitionsprocess_event_no_deferandprocess_event_no_queueuse the same helper so semantics are consistentTests
./scripts/quality_gates.shBench snapshots