fix(stepfunctions): idempotent StartExecution, history detail keys, Choice/Pass field handling#2037
Merged
Conversation
…d/exited history keys, Choice OutputPath + Pass Parameters
… existing ARN, different input -> error)
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.
Fixes a cluster of confirmed Step Functions correctness bugs surfaced by the 2026-06-28 bug hunt.
Bugs fixed
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.
GetExecutionHistory used the wrong details key for every State Entered/Exited event (HIGH). The key was derived by lowercasing the first char, yielding
taskStateEnteredEventDetails/passStateExitedEventDetailsetc. AWS collapses all*StateEnteredtypes intostateEnteredEventDetailsand all*StateExitedintostateExitedEventDetails. SDK deserializers were returning null name/input/output across the whole history. Now mapped to the collapsed keys.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.StartExecutionidempotent forSTANDARD: same name + input returns existingexecutionArn(200) via structural JSON compare; different input returns 400ExecutionAlreadyExists.EXPRESSunchanged.GetExecutionHistoryuses collapsed detail keys: all*StateEntered->stateEnteredEventDetails, all*StateExited->stateExitedEventDetails, restoring SDKname/input/output.OutputPath; Pass evaluatesParametersto build the payload beforeResult/ResultPathandOutputPath.Written for commit 3be0f4e. Summary will update on new commits.