@@ -651,111 +651,12 @@ func buildRedactedDomainsSummary(processedRuns []ProcessedRun) *RedactedDomainsL
651651
652652// logErrorAggregator and related functions have been removed since error patterns are no longer supported
653653
654- // aggregateLogErrors has been removed since error patterns are no longer supported
655- func aggregateLogErrors (processedRuns []ProcessedRun , agg interface {}) []ErrorSummary {
656- // Return empty slice since error patterns have been removed
657- return []ErrorSummary {}
658- }
659-
660- // isActionableError checks if an error message is actionable (user-relevant)
661- // Returns false for internal debug messages, validation logs, JSON fragments, etc.
662- func isActionableError (message string ) bool {
663- msg := strings .ToLower (message )
664-
665- // Filter out internal validation/debug messages
666- debugPatterns := []string {
667- "validation completed" ,
668- "executePromptDirectly" ,
669- "starting validate_errors" ,
670- "loaded" , "error patterns" ,
671- "pattern " , "/16:" , // Pattern testing logs
672- "validation completed in" ,
673- "starting error validation" ,
674- "error validation completed" ,
675- "const { main }" ,
676- "require(" ,
677- "perfect! the" ,
678- "failed as expected" ,
679- }
680-
681- for _ , pattern := range debugPatterns {
682- if strings .Contains (msg , pattern ) {
683- return false
684- }
685- }
686-
687- // Filter out JSON fragments and data structures
688- jsonPatterns := []string {
689- `"errorCodesToRetry"` ,
690- `"description":` ,
691- `"statement":` ,
692- `"content":` ,
693- `"onRequestError"` ,
694- `[{` , `}]` , `"[` ,
695- }
696-
697- for _ , pattern := range jsonPatterns {
698- if strings .Contains (message , pattern ) {
699- return false
700- }
701- }
702-
703- // Filter out MCP server logs (stderr output)
704- if strings .Contains (msg , "[mcp server" ) ||
705- strings .Contains (msg , "[safeoutputs]" ) ||
706- strings .Contains (msg , "send: {\" jsonrpc\" " ) {
707- return false
708- }
709-
710- // Filter out Squid proxy logs
711- if strings .Contains (msg , "::1:" ) && strings .Contains (msg , "NONE_NONE:HIER_NONE" ) {
712- return false
713- }
714-
715- // Filter out tool invocation result logs (these are outputs, not errors)
716- if strings .HasPrefix (msg , "tool invocation result:" ) {
717- return false
718- }
719-
720- return true
721- }
722-
723654// buildCombinedErrorsSummary has been removed since error patterns are no longer supported
724655func buildCombinedErrorsSummary (processedRuns []ProcessedRun ) []ErrorSummary {
725656 // Return empty slice since error patterns have been removed
726657 return []ErrorSummary {}
727658}
728659
729- // buildErrorsSummary aggregates errors and warnings across all runs
730- // Returns two slices: errorsSummary and warningsSummary
731- // DEPRECATED: Use buildCombinedErrorsSummary instead
732- func buildErrorsSummary (processedRuns []ProcessedRun ) ([]ErrorSummary , []ErrorSummary ) {
733- // Get combined summary
734- combined := buildCombinedErrorsSummary (processedRuns )
735-
736- // Separate into errors and warnings
737- var errorsSummary []ErrorSummary
738- var warningsSummary []ErrorSummary
739-
740- for _ , summary := range combined {
741- if summary .Type == "Error" {
742- errorsSummary = append (errorsSummary , summary )
743- } else {
744- warningsSummary = append (warningsSummary , summary )
745- }
746- }
747-
748- // Sort each by count (descending)
749- sort .Slice (errorsSummary , func (i , j int ) bool {
750- return errorsSummary [i ].Count > errorsSummary [j ].Count
751- })
752- sort .Slice (warningsSummary , func (i , j int ) bool {
753- return warningsSummary [i ].Count > warningsSummary [j ].Count
754- })
755-
756- return errorsSummary , warningsSummary
757- }
758-
759660// renderLogsJSON outputs the logs data as JSON
760661func renderLogsJSON (data LogsData ) error {
761662 reportLog .Printf ("Rendering logs data as JSON: %d runs" , data .Summary .TotalRuns )
0 commit comments