Skip to content

Propagate origin event through completion transitions#13

Merged
gabewillen merged 2 commits intomainfrom
codex/completion-origin-event
Feb 24, 2026
Merged

Propagate origin event through completion transitions#13
gabewillen merged 2 commits intomainfrom
codex/completion-origin-event

Conversation

@gabewillen
Copy link

Summary

  • propagate the originating event instance through completion<T> dispatch instead of synthesizing an empty completion event
  • allow completion transition guards/actions to request T/const T& as arguments (not DI deps)
  • keep sml::completion<T> DSL usage while making payload-aware completion transitions work for direct, queued, and deferred flows

Testing

  • ./scripts/quality_gates.sh

Copilot AI review requested due to automatic review settings February 24, 2026 22:21
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

@gabewillen
Copy link
Author

@codex

@gabewillen
Copy link
Author

@codex

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. 🚀

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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

@gabewillen gabewillen merged commit 02cbea0 into main Feb 24, 2026
10 checks passed
@gabewillen gabewillen deleted the codex/completion-origin-event branch February 24, 2026 22:59
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