feat(stepfunctions): close conformance gap with 23 missing ops#703
Merged
vieiralucas merged 11 commits intomainfrom Apr 23, 2026
Merged
feat(stepfunctions): close conformance gap with 23 missing ops#703vieiralucas merged 11 commits intomainfrom
vieiralucas merged 11 commits intomainfrom
Conversation
Adds the remaining Step Functions operations across activities, versions, aliases, map runs, and execution lifecycle extras: - Activities: Create/Delete/Describe/List + GetActivityTask issuing a synthetic task token; SendTask Success/Failure/Heartbeat update the persisted token state. - State machine versions: Publish (auto-incrementing), List, Delete. - State machine aliases: Create/Delete/Describe/List/Update with weighted routing configuration persisted per alias. - Map runs: Describe/List/Update on a per-account map_runs map (404 on unknown ARNs). - Execution extras: RedriveExecution flips a stopped execution back to RUNNING; StartSyncExecution synthesizes a SUCCEEDED sync result for EXPRESS state machines; TestState echoes input as output; ValidateStateMachineDefinition runs the existing validator and returns OK/FAIL diagnostics. States conformance closes to 37/37 (100%); workspace baseline -69 (net new ops add 18 passing variants while two previously SKIPped ops in adjacent services drop out of audited tests).
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
4 issues found across 4 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:1037">
P2: `CreateStateMachineAlias` accepts invalid `routingConfiguration` values instead of validating required route count/weights.</violation>
<violation number="2" location="crates/fakecloud-stepfunctions/src/service.rs:1116">
P2: `ListStateMachineAliases` uses an over-broad prefix match and can return aliases for the wrong state machine.</violation>
<violation number="3" location="crates/fakecloud-stepfunctions/src/service.rs:1142">
P2: `UpdateStateMachineAlias` does not validate `routingConfiguration` and can store invalid routing weights.</violation>
<violation number="4" location="crates/fakecloud-stepfunctions/src/service.rs:1255">
P2: `StartSyncExecution` should validate `input` as JSON and return `InvalidExecutionInput` for malformed payloads.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
…pfunctions-23ops # Conflicts: # conformance-baseline.json
- ListStateMachineAliases: anchor prefix on ':' separator so state machine 'foo' doesn't match aliases for 'foobar' - CreateStateMachineAlias / UpdateStateMachineAlias: validate routingConfiguration via shared parser - 1-2 routes, weights 0-100 summing to exactly 100, stateMachineVersionArn required - StartSyncExecution: validate input as JSON and return InvalidExecutionInput for malformed payloads
There was a problem hiding this comment.
1 issue found across 1 file (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-stepfunctions/src/service.rs">
<violation number="1" location="crates/fakecloud-stepfunctions/src/service.rs:1469">
P2: `routingConfiguration` validation is incomplete: it accepts routes from different state machines. Reject mixed parent ARNs so alias routing stays valid and AWS-compatible.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| format!("routingConfiguration weights must sum to 100, got {total}."), | ||
| )); | ||
| } | ||
| Ok(parsed) |
There was a problem hiding this comment.
P2: routingConfiguration validation is incomplete: it accepts routes from different state machines. Reject mixed parent ARNs so alias routing stays valid and AWS-compatible.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At crates/fakecloud-stepfunctions/src/service.rs, line 1469:
<comment>`routingConfiguration` validation is incomplete: it accepts routes from different state machines. Reject mixed parent ARNs so alias routing stays valid and AWS-compatible.</comment>
<file context>
@@ -1425,6 +1414,61 @@ fn resource_not_found(arn: &str) -> AwsServiceError {
+ format!("routingConfiguration weights must sum to 100, got {total}."),
+ ));
+ }
+ Ok(parsed)
+}
+
</file context>
Suggested change
| Ok(parsed) | |
| let parent = parsed[0] | |
| .state_machine_version_arn | |
| .rsplit_once(':') | |
| .map(|(p, _)| p) | |
| .ok_or_else(|| { | |
| AwsServiceError::aws_error( | |
| StatusCode::BAD_REQUEST, | |
| "ValidationException", | |
| "stateMachineVersionArn must be a version ARN.", | |
| ) | |
| })?; | |
| if parsed.iter().any(|r| { | |
| r.state_machine_version_arn | |
| .rsplit_once(':') | |
| .map(|(p, _)| p) | |
| != Some(parent) | |
| }) { | |
| return Err(AwsServiceError::aws_error( | |
| StatusCode::BAD_REQUEST, | |
| "ValidationException", | |
| "All routingConfiguration stateMachineVersionArn values must belong to the same state machine.", | |
| )); | |
| } | |
| Ok(parsed) |
…orktree-stepfunctions-23ops # Conflicts: # conformance-baseline.json
…orktree-stepfunctions-23ops # Conflicts: # conformance-baseline.json
…orktree-stepfunctions-23ops # Conflicts: # conformance-baseline.json
…orktree-stepfunctions-23ops
…orktree-stepfunctions-23ops # Conflicts: # conformance-baseline.json
…orktree-stepfunctions-23ops
…orktree-stepfunctions-23ops # Conflicts: # conformance-baseline.json
…orktree-stepfunctions-23ops # Conflicts: # conformance-baseline.json
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.
Summary
Test plan
Summary by cubic
Implements 23 missing AWS Step Functions operations and closes the
statesemulator conformance gap. Conformance is now 37/37 (100%) with per-account state for activities, versions/aliases, map runs, and task tokens.New Features
Bug Fixes
Written for commit 3eb1e56. Summary will update on new commits.