Propagate origin event through completion transitions#13
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates Boost.SML’s completion-event handling so completion transitions receive the originating event instance (including its payload) rather than a synthesized empty completion event, enabling payload-aware completion guards/actions across direct, queued, and deferred processing flows.
Changes:
- Pass the original event instance through completion dispatch (
completion<T>now carries the origin event). - Add origin-event unwrapping (
get_origin_event) so post-event completion uses the underlying event for wrapper/internal events. - Extend argument resolution / dependency filtering so completion guards/actions can request
T/const T&as event arguments (not DI deps), with FT tests updated accordingly.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
include/boost/sml.hpp |
Propagates origin event into completion processing; adds origin-event unwrapping and completion argument/dep-resolution support. |
test/ft/transitions.cpp |
Updates completion transition test to assert payload is propagated into completion actions. |
test/ft/actions_process_n_defer.cpp |
Updates queued/deferred flow tests to validate payload-aware completion guards for popped event types. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Codex Review: Didn't find any major issues. 🚀 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
completion<T>dispatch instead of synthesizing an empty completion eventT/const T&as arguments (not DI deps)sml::completion<T>DSL usage while making payload-aware completion transitions work for direct, queued, and deferred flowsTesting
./scripts/quality_gates.sh