Skip to content

feat(eventbridge): implement real EventBridge → Step Functions delivery#294

Merged
vieiralucas merged 3 commits intomainfrom
worktree-eb-stepfunctions-delivery
Apr 12, 2026
Merged

feat(eventbridge): implement real EventBridge → Step Functions delivery#294
vieiralucas merged 3 commits intomainfrom
worktree-eb-stepfunctions-delivery

Conversation

@vieiralucas
Copy link
Copy Markdown
Member

@vieiralucas vieiralucas commented Apr 12, 2026

Summary

  • EventBridge rules and Scheduler schedules targeting Step Functions now actually start executions
  • Added StepFunctionsDelivery trait to the core delivery bus
  • Wired up delivery in both EventBridge service and Scheduler code paths
  • State machine executions are started with the event payload as input, using the same ASL interpreter

Test plan

  • E2E test: EventBridge rule starts and completes Step Functions execution
  • Existing eb_put_events_stub_targets_no_error still passes
  • cargo clippy -D warnings clean
  • CI green

Summary by cubic

EventBridge rules and Scheduler schedules targeting Step Functions now start real executions with the event payload as input. This replaces stubs, runs via the ASL interpreter, and supports SNS, EventBridge, SQS, and Lambda tasks inside those executions.

  • New Features

    • New StepFunctionsDelivery in fakecloud-core and StepFunctionsDeliveryImpl in fakecloud-server.
    • EventBridge and Scheduler now call the delivery bus to start executions.
    • start_execution_from_delivery in fakecloud-stepfunctions, with a full interpreter delivery bus (SNS, EventBridge, SQS, Lambda) for EB/Scheduler-started runs.
    • E2E test covers EB rule starting and completing an execution; state recording remains for introspection.
  • Bug Fixes

    • Validate input JSON before starting cross-service executions; reject malformed payloads.
    • Include Lambda in the SNS fanout bus for SFN-triggered runs so SNS→Lambda subscriptions fire during EB-started executions.

Written for commit 88ea29f. Summary will update on new commits.

EventBridge rules and Scheduler schedules targeting Step Functions state
machines now actually start executions instead of just recording stubs.

- Add StepFunctionsDelivery trait to fakecloud-core delivery bus
- Add StepFunctionsDeliveryImpl in fakecloud-server
- Add start_execution_from_delivery() to fakecloud-stepfunctions for
  cross-service execution starts
- Wire up delivery in EventBridge service and Scheduler
- Keep stub recording in state for introspection compatibility
- Add E2E test verifying EB rule starts and completes SFN execution
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

2 issues found across 7 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="crates/fakecloud-stepfunctions/src/service.rs">

<violation number="1" location="crates/fakecloud-stepfunctions/src/service.rs:896">
P2: Validate cross-service execution input as JSON before starting execution. Without validation, malformed payloads are silently executed as `{}` via interpreter fallback.</violation>
</file>

<file name="crates/fakecloud-server/src/main.rs">

<violation number="1" location="crates/fakecloud-server/src/main.rs:229">
P1: EventBridge/Scheduler-started Step Functions executions are wired with a reduced delivery bus, so SNS/EventBridge Task integrations silently no-op instead of delivering.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread crates/fakecloud-server/src/main.rs Outdated
Comment thread crates/fakecloud-stepfunctions/src/service.rs
…lidate JSON input

- Wire SNS and EventBridge delivery into the SFN interpreter bus so task
  states (SNS Publish, EventBridge PutEvents) work in EB-started executions
- Validate input JSON before starting cross-service executions to reject
  malformed payloads early instead of silently falling back to {}
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 2 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="crates/fakecloud-server/src/main.rs">

<violation number="1" location="crates/fakecloud-server/src/main.rs:231">
P2: SFN-triggered SNS publishes are configured with an SQS-only bus, so SNS Lambda subscriptions are never invoked.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread crates/fakecloud-server/src/main.rs
SNS Lambda subscriptions now fire when a Step Functions task state
publishes to an SNS topic during an EventBridge-triggered execution.
@vieiralucas vieiralucas merged commit e657b45 into main Apr 12, 2026
22 checks passed
@vieiralucas vieiralucas deleted the worktree-eb-stepfunctions-delivery branch April 12, 2026 16:42
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