Skip to content

refactor: centralize workflow input validation in invalidInput helper#41

Merged
Amertz08 merged 1 commit into
mainfrom
claude/workflow-validation-helper
May 14, 2026
Merged

refactor: centralize workflow input validation in invalidInput helper#41
Amertz08 merged 1 commit into
mainfrom
claude/workflow-validation-helper

Conversation

@Amertz08
Copy link
Copy Markdown
Owner

Summary

  • Add internal/workflows/validate.go with a validator interface and invalidInput() helper that wraps validation errors as NonRetryableApplicationError in one place
  • Replace six copies of identical boilerplate across infrastructure.go, eks.go, iam.go with a single invalidInput(input) call
  • Add missing validate() methods to SpinUpNetworkInput and SpinDownNetworkInput in vpc.go, and wire up invalidInput in both network workflows
  • Drop the now-unused temporal import from eks.go and iam.go

Test plan

  • go build ./... passes cleanly
  • Trigger any workflow with a missing required field — confirm it fails immediately as non-retryable
  • Trigger SpinUpNetworkWorkflow or SpinDownNetworkWorkflow with a missing Region — previously unchecked, now caught

🤖 Generated with Claude Code

Introduce a validator interface and invalidInput() helper in validate.go
that owns the NonRetryableApplicationError wrapping, eliminating six
copies of the same boilerplate and adding missing validation to the
network workflows.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Amertz08 Amertz08 merged commit 409b2cb into main May 14, 2026
1 check passed
@Amertz08 Amertz08 deleted the claude/workflow-validation-helper branch May 15, 2026 02:37
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