Skip to content

Add CI that runs an order through the durable workflow - #1

Merged
HarshCasper merged 2 commits into
mainfrom
ci/assert-order-workflow
Oct 13, 2026
Merged

HarshCasper merged 2 commits into
mainfrom
ci/assert-order-workflow

Conversation

@HarshCasper

@HarshCasper HarshCasper commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

The repo had no CI and no test.

  • New test.sh follows the README walkthrough with a fresh order ID:
    • the payment step fails twice and succeeds on attempt 3 (payment_attempts in DynamoDB)
    • the execution parks at the callback with status RUNNING and the order AWAITING_CONFIRMATION
    • with RESTART_CMD set, LocalStack restarts while the execution waits, and the execution is still RUNNING afterwards
    • after send-durable-execution-callback-success, the execution SUCCEEDED with the order FULFILLED, 3 payment attempts, the charge ID and the confirmation in the result
    • the history records each step's StepSucceeded exactly once, plus CallbackSucceeded
    • DynamoDB marks the order FULFILLED with its charge, and both EMAIL and SMS notifications reach the SQS sink
  • New workflow builds the package, starts LocalStack with --persist, deploys with lstk cdk, and runs the test with RESTART_CMD="lstk restart".
  • README:
    • new Test section
    • send-durable-execution-callback-success now passes --cli-binary-format raw-in-base64-out. AWS CLI v2 treats --result as a blob, so the documented command failed with Invalid base64.

Verified by CI.

https://claude.ai/code/session_01DZfDmzUBPqNAu3yFKyfCNM

test.sh starts an execution, checks the payment retries and the parked callback, restarts LocalStack while it waits, confirms the payment and checks the result, history, DynamoDB record and notifications.

Claude-Session: https://claude.ai/code/session_01DZfDmzUBPqNAu3yFKyfCNM
AWS CLI v2 treats --result as a blob and rejected the JSON with 'Invalid base64'. The README command had the same problem.

Claude-Session: https://claude.ai/code/session_01DZfDmzUBPqNAu3yFKyfCNM
@HarshCasper
HarshCasper merged commit e59a8a6 into main Oct 13, 2026
1 check passed
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