Skip to content

[spec-kit] Add Parallel state support for StepFunctions TestState API#13769

Draft
tiurin wants to merge 11 commits intomainfrom
001-sfn-teststate-parallel
Draft

[spec-kit] Add Parallel state support for StepFunctions TestState API#13769
tiurin wants to merge 11 commits intomainfrom
001-sfn-teststate-parallel

Conversation

@tiurin
Copy link
Contributor

@tiurin tiurin commented Feb 13, 2026

Summary

This PR tests feature implementation with SpecKit, attempt 1. All of SpecKit constitution, feature spec, plan, tasks and implementation was generated with Claude Code. Constitution had to be iterated a couple of times to unblock the implementation.

To be compared with: 1) same feature, but implemented using openspec 2) second pass of SpecKit, paying more human attention to feature spec completeness and referencing docs and API specs more explicitly. 3) Using lighter model, e.g. sonnet.

Contributes to DRG-513.

Comparison basis: feature completeness, following test guidelines, token consumption, number of steps.

Note

The following is the PR description by Claude Code

  • Add Parallel as a supported state type for the TestState API, enabling mock-based testing of Parallel states
  • Validate that mock.result is a JSON array and its size matches the number of branches in the Parallel state definition, with error messages matching real AWS behavior
  • Create MockedStateParallel execution wrapper following the existing MockedStateMap pattern, with preprocessor integration for state decoration and branch recursion
  • Add snapshot-validated parity tests (recorded against real AWS) for validation errors and successful execution

Test plan

  • test_mock_result_is_not_array_on_parallel_state — non-array mock rejected with AWS-matching error
  • test_mock_result_array_size_mismatch_on_parallel_state — wrong-size array rejected with AWS-matching error
  • test_state_type_requires_mock[ParallelState] — Parallel without mock rejected
  • test_parallel_state_mock_execution — valid mock executes successfully with correct output
  • Full regression suite (15 tests) passes against LocalStack with no regressions to existing state types
  • All snapshots recorded against real AWS (AWS_PROFILE=ls-sandbox TEST_TARGET=AWS_CLOUD SNAPSHOT_UPDATE=1)

🤖 Generated with Claude Code

tiurin and others added 11 commits February 13, 2026 00:53
Generated without additional prompt
Enable Parallel states in TestState by adding mock result validation
(must be a JSON array matching branch count), MockedStateParallel
execution wrapper, and preprocessor integration for state decoration
and recursive state lookup across branches.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update spec and tasks to require running tests against real AWS with
AWS_PROFILE=ls-sandbox TEST_TARGET=AWS_CLOUD SNAPSHOT_UPDATE=1 before
marking snapshot-dependent tasks as complete. Add explicit snapshot
recording tasks (T015-T017) and test_parallel_state_mock_execution.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Record parity snapshots from real AWS for Parallel state TestState
tests. Fix the branch-count mismatch ValidationException message to
match AWS exactly: "Mocked result must contain the same number of
items as number of Parallel branches."

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…mmand)

Add instruction to use `python -m localstack.dev.run` from .venv for
local testing instead of `localstack start`. Also mark T013/T017 as
complete in tasks.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…cation

Mark spec as Complete, mark T013/T017 done after running tests against
LocalStack (started via python -m localstack.dev.run), and remove
stale parenthetical from T009 description.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@tiurin tiurin marked this pull request as draft February 13, 2026 17:41
@tiurin tiurin added aws:stepfunctions AWS Step Functions semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases docs: skip Pull request does not require documentation changes notes: needed Pull request should be mentioned in the release notes labels Feb 13, 2026
@tiurin tiurin changed the title Add Parallel state support for StepFunctions TestState API [spec-kit] Add Parallel state support for StepFunctions TestState API Feb 13, 2026
@github-actions
Copy link

Test Results - Preflight, Unit

23 111 tests  ±0   21 249 ✅ ±0   6m 39s ⏱️ +12s
     1 suites ±0    1 862 💤 ±0 
     1 files   ±0        0 ❌ ±0 

Results for commit 68eed53. ± Comparison against base commit 8554f9a.

@github-actions
Copy link

Test Results (amd64) - Acceptance

7 tests  ±0   5 ✅ ±0   2m 58s ⏱️ -2s
1 suites ±0   2 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit 68eed53. ± Comparison against base commit 8554f9a.

@github-actions
Copy link

Test Results (amd64) - Integration, Bootstrap

    5 files      5 suites   2h 37m 42s ⏱️
5 624 tests 5 115 ✅ 508 💤 1 ❌
5 630 runs  5 115 ✅ 514 💤 1 ❌

For more details on these failures, see this check.

Results for commit 68eed53.

@github-actions
Copy link

LocalStack Community integration with Pro

    2 files  ±0      2 suites  ±0   2h 3m 18s ⏱️ + 2m 40s
5 219 tests +4  4 867 ✅ +4  352 💤 ±0  0 ❌ ±0 
5 221 runs  +4  4 867 ✅ +4  354 💤 ±0  0 ❌ ±0 

Results for commit 68eed53. ± Comparison against base commit 8554f9a.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aws:stepfunctions AWS Step Functions docs: skip Pull request does not require documentation changes notes: needed Pull request should be mentioned in the release notes semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant