Add error aggregation for validation using errors.Join#12661
Conversation
- Added ErrorCollector utility for collecting multiple validation errors - Added --fail-fast flag to compile command to control error aggregation - Updated validateNetworkAllowedDomains and validateSafeOutputsAllowedDomains to use error aggregation - Added failFast field to Compiler struct - All error aggregation tests passing Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Updated validateStrictMode to collect all validation errors before failing - Added FormatAggregatedError to display error count and grouped messages - All strict mode validation tests passing Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Changed assert.NoError to require.NoError for error assertions - Changed assert.Error to require.Error for error assertions - All linting checks now pass Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Fixed usage example to properly handle fail-fast mode return values - Added FormattedError() method to ErrorCollector for accurate error counting - Updated strict mode validation to use FormattedError() - Added comprehensive tests for FormattedError() - Fixed staticcheck lint issue (use fmt.Fprintf instead of WriteString+Sprintf) - All linting and tests pass Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰 |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
|
📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing... |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
Agent Container Tool Check
Result: 10/12 tools available Status:
|
|
💥 WHOOSH! 🦸 The Claude smoke test agent just blazed through here at lightspeed! ⚡ KAPOW! Validated all systems - GitHub API, Serena MCP, Playwright, Tavily, file ops - everything checks out! ZAP! Run ID: §21503889451 - All engines firing on all cylinders! 🚀 Up, up, and away! The agent is done here! 🦸♂️✨
|
Smoke Test: Claude - ✅ PASSLast 2 Merged PRs:
Test Results:
Overall Status: PASS
|
|
Fix Go formatting: remove trailing whitespace in frontmatter_hash_stability_test.go
|
|
🔍 Smoke Test Results - Copilot Engine ✅ GitHub MCP: Last 2 merged PRs reviewed Overall Status: ✅ PASS
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
Validation errors previously stopped at first failure, requiring multiple compile cycles to discover all issues. Now collects and reports all errors in a single pass.
Changes
Core Infrastructure
ErrorCollectorutility with fail-fast support viaerrors.Join--fail-fastCLI flag to restore legacy behavior (default: aggregate)FormattedError()method for accurate multi-error formattingUpdated Validations (8 functions)
validateNetworkAllowedDomains- domain pattern errorsvalidateSafeOutputsAllowedDomains- safe-outputs domain errorsvalidateStrictMode- aggregates 5 sub-validations (permissions, network, MCP, tools, deprecated fields)Example
Before:
After:
Backward Compatibility
Use
--fail-fastto stop at first error (legacy behavior).Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.
Changeset
--fail-fastfor legacy fail-fast behavior.