Commit a52249d
refactor: decompose 387-line
* Initial plan
* refactor: decompose validateWorkflowData into 4 focused validators
- Create compiler_validators.go with validateExpressions,
validateFeatureConfig, validatePermissions, and
validateToolConfiguration (each ~100 lines, independently testable)
- Reduce validateWorkflowData from 387 lines to a 25-line orchestrator
- Add fmt.Errorf/isFormattedCompilerError defensive wrapping for the
bare return err calls at CompileWorkflowData lines 775 and 789
- Add compiler_validators_test.go with tests for each new validator
- Remove now-unused 'slices' import from compiler.go
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/7c5f96e4-396a-4b5a-b1df-52d8c72b86d7
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
* refactor: rename cachedPermissions to workflowPermissions for clarity
Address code review feedback: rename the parameter and local variable
from 'cachedPermissions' to 'workflowPermissions' in validateToolConfiguration,
validateWorkflowData, and the test file to better reflect it is a
freshly parsed permissions object rather than a performance cache.
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/7c5f96e4-396a-4b5a-b1df-52d8c72b86d7
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
* fix: address review feedback on compiler_validators and compiler error formatting
- Replace console.FormatWarningMessage("validateWorkflowData into 4 focused validators (#28145)1 parent f596323 commit a52249d
3 files changed
Lines changed: 717 additions & 384 deletions
0 commit comments