Skip to content

fix(stepfunctions): idempotent StartExecution, history detail keys, Choice/Pass field handling#2037

Merged
vieiralucas merged 2 commits into
mainfrom
wt-bug-sfn
Jun 29, 2026
Merged

fix(stepfunctions): idempotent StartExecution, history detail keys, Choice/Pass field handling#2037
vieiralucas merged 2 commits into
mainfrom
wt-bug-sfn

Conversation

@vieiralucas

@vieiralucas vieiralucas commented Jun 28, 2026

Copy link
Copy Markdown
Member

Fixes a cluster of confirmed Step Functions correctness bugs surfaced by the 2026-06-28 bug hunt.

Bugs fixed

  1. StartExecution was never idempotent (HIGH). A name collision always returned 400 ExecutionAlreadyExists without comparing input. AWS (STANDARD) returns the existing executionArn with HTTP 200 when the name AND input match; only a different input returns 400. Now compares the stored input on collision and returns the existing execution when identical.

  2. GetExecutionHistory used the wrong details key for every State Entered/Exited event (HIGH). The key was derived by lowercasing the first char, yielding taskStateEnteredEventDetails / passStateExitedEventDetails etc. AWS collapses all *StateEntered types into stateEnteredEventDetails and all *StateExited into stateExitedEventDetails. SDK deserializers were returning null name/input/output across the whole history. Now mapped to the collapsed keys.

  3. Choice ignored OutputPath; Pass ignored Parameters (MEDIUM). A Choice state forwarded raw input instead of applying its OutputPath; a Pass state passed input through instead of evaluating its Parameters template. Both now apply the same OutputPath/Parameters evaluation the other states use.

Tests

E2E coverage in crates/fakecloud-e2e/tests/stepfunctions.rs for idempotent StartExecution (same-input 200 / different-input 400), collapsed history detail keys, and Choice OutputPath + Pass Parameters.

Local: build, fmt --check, clippy --all-targets -D warnings, 192 unit tests, e2e compile all green.


Summary by cubic

Fixes Step Functions idempotency, history event detail keys, and Choice/Pass field handling to match AWS behavior. Adds explicit E2E tests for idempotent StartExecution.

  • Bug Fixes
    • StartExecution idempotent for STANDARD: same name + input returns existing executionArn (200) via structural JSON compare; different input returns 400 ExecutionAlreadyExists. EXPRESS unchanged.
    • GetExecutionHistory uses collapsed detail keys: all *StateEntered -> stateEnteredEventDetails, all *StateExited -> stateExitedEventDetails, restoring SDK name/input/output.
    • State evaluation: Choice applies OutputPath; Pass evaluates Parameters to build the payload before Result/ResultPath and OutputPath.

Written for commit 3be0f4e. Summary will update on new commits.

Review in cubic

…d/exited history keys, Choice OutputPath + Pass Parameters
@vieiralucas vieiralucas merged commit a6749f0 into main Jun 29, 2026
104 checks passed
@vieiralucas vieiralucas deleted the wt-bug-sfn branch June 29, 2026 10:41
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