@@ -242,17 +242,17 @@ func buildLogsData(processedRuns []ProcessedRun, outputDir string, continuation
242242// Filters out single words, common words, and other garbage that shouldn't be tools
243243func isValidToolName (toolName string ) bool {
244244 name := strings .TrimSpace (toolName )
245-
245+
246246 // Filter out empty names
247247 if name == "" || name == "-" {
248248 return false
249249 }
250-
250+
251251 // Filter out single character names
252252 if len (name ) == 1 {
253253 return false
254254 }
255-
255+
256256 // Filter out common English words that are likely from error messages
257257 commonWords := map [string ]bool {
258258 "calls" : true , "to" : true , "for" : true , "the" : true , "a" : true , "an" : true ,
@@ -262,25 +262,25 @@ func isValidToolName(toolName string) bool {
262262 "Testing" : true , "multiple" : true , "launches" : true , "command" : true , "invocation" : true ,
263263 "with" : true , "from" : true , "by" : true , "at" : true , "in" : true , "on" : true ,
264264 }
265-
265+
266266 if commonWords [name ] {
267267 return false
268268 }
269-
269+
270270 // Tool names should typically contain underscores, hyphens, or be camelCase
271271 // or be all lowercase. Single words without these patterns are suspect.
272272 hasUnderscore := strings .Contains (name , "_" )
273273 hasHyphen := strings .Contains (name , "-" )
274274 hasCapital := strings .ToLower (name ) != name
275-
276- // If it's a single word with no underscores/hyphens and is lowercase and short,
275+
276+ // If it's a single word with no underscores/hyphens and is lowercase and short,
277277 // it's likely a fragment
278278 words := strings .Fields (name )
279279 if len (words ) == 1 && ! hasUnderscore && ! hasHyphen && len (name ) < 10 && ! hasCapital {
280280 // Could be a fragment - be conservative and reject if it's a common word
281281 return false
282282 }
283-
283+
284284 return true
285285}
286286
@@ -298,12 +298,12 @@ func buildToolUsageSummary(processedRuns []ProcessedRun) []ToolUsageSummary {
298298
299299 for _ , toolCall := range metrics .ToolCalls {
300300 displayKey := workflow .PrettifyToolName (toolCall .Name )
301-
301+
302302 // Filter out invalid tool names
303303 if ! isValidToolName (displayKey ) {
304304 continue
305305 }
306-
306+
307307 toolRunTracker [displayKey ] = true
308308
309309 if existing , exists := toolStats [displayKey ]; exists {
@@ -734,7 +734,7 @@ func aggregateLogErrors(processedRuns []ProcessedRun, agg logErrorAggregator) []
734734// Returns false for internal debug messages, validation logs, JSON fragments, etc.
735735func isActionableError (message string ) bool {
736736 msg := strings .ToLower (message )
737-
737+
738738 // Filter out internal validation/debug messages
739739 debugPatterns := []string {
740740 "validation completed" ,
@@ -750,13 +750,13 @@ func isActionableError(message string) bool {
750750 "perfect! the" ,
751751 "failed as expected" ,
752752 }
753-
753+
754754 for _ , pattern := range debugPatterns {
755755 if strings .Contains (msg , pattern ) {
756756 return false
757757 }
758758 }
759-
759+
760760 // Filter out JSON fragments and data structures
761761 jsonPatterns := []string {
762762 `"errorCodesToRetry"` ,
@@ -766,30 +766,30 @@ func isActionableError(message string) bool {
766766 `"onRequestError"` ,
767767 `[{` , `}]` , `"[` ,
768768 }
769-
769+
770770 for _ , pattern := range jsonPatterns {
771771 if strings .Contains (message , pattern ) {
772772 return false
773773 }
774774 }
775-
775+
776776 // Filter out MCP server logs (stderr output)
777- if strings .Contains (msg , "[mcp server" ) ||
778- strings .Contains (msg , "[safeoutputs]" ) ||
779- strings .Contains (msg , "send: {\" jsonrpc\" " ) {
777+ if strings .Contains (msg , "[mcp server" ) ||
778+ strings .Contains (msg , "[safeoutputs]" ) ||
779+ strings .Contains (msg , "send: {\" jsonrpc\" " ) {
780780 return false
781781 }
782-
782+
783783 // Filter out Squid proxy logs
784784 if strings .Contains (msg , "::1:" ) && strings .Contains (msg , "NONE_NONE:HIER_NONE" ) {
785785 return false
786786 }
787-
787+
788788 // Filter out tool invocation result logs (these are outputs, not errors)
789789 if strings .HasPrefix (msg , "tool invocation result:" ) {
790790 return false
791791 }
792-
792+
793793 return true
794794}
795795
@@ -815,21 +815,21 @@ func buildCombinedErrorsSummary(processedRuns []ProcessedRun) []ErrorSummary {
815815 }
816816
817817 allErrors := aggregateLogErrors (processedRuns , agg )
818-
818+
819819 // Filter out non-actionable errors
820820 var actionableErrors []ErrorSummary
821821 for _ , err := range allErrors {
822822 if isActionableError (err .Message ) {
823823 actionableErrors = append (actionableErrors , err )
824824 }
825825 }
826-
826+
827827 // Limit to top 20 most common errors to keep output concise
828828 maxErrors := 20
829829 if len (actionableErrors ) > maxErrors {
830830 actionableErrors = actionableErrors [:maxErrors ]
831831 }
832-
832+
833833 return actionableErrors
834834}
835835
@@ -922,18 +922,18 @@ func renderLogsConsole(data LogsData) {
922922 // Display concise summary at the end
923923 fmt .Fprintln (os .Stderr , "" ) // Blank line for spacing
924924 fmt .Fprintln (os .Stderr , console .FormatSuccessMessage (fmt .Sprintf ("✓ Downloaded %d workflow logs to %s" , data .Summary .TotalRuns , data .LogsLocation )))
925-
925+
926926 // Show key metrics in a concise format
927927 if data .Summary .TotalErrors > 0 || data .Summary .TotalWarnings > 0 {
928- fmt .Fprintf (os .Stderr , " %s %d errors, %d warnings across %d runs\n " ,
928+ fmt .Fprintf (os .Stderr , " %s %d errors, %d warnings across %d runs\n " ,
929929 console .FormatInfoMessage ("•" ),
930- data .Summary .TotalErrors ,
930+ data .Summary .TotalErrors ,
931931 data .Summary .TotalWarnings ,
932932 data .Summary .TotalRuns )
933933 }
934-
934+
935935 if len (data .ToolUsage ) > 0 {
936- fmt .Fprintf (os .Stderr , " %s %d unique tools used\n " ,
936+ fmt .Fprintf (os .Stderr , " %s %d unique tools used\n " ,
937937 console .FormatInfoMessage ("•" ),
938938 len (data .ToolUsage ))
939939 }
0 commit comments