@@ -15,6 +15,7 @@ import (
1515)
1616
1717func TestExtractEngineConfig (t * testing.T ) {
18+ t .Parallel ()
1819 tests := []struct {
1920 name string
2021 awInfoContent string
@@ -54,6 +55,7 @@ func TestExtractEngineConfig(t *testing.T) {
5455
5556 for _ , tt := range tests {
5657 t .Run (tt .name , func (t * testing.T ) {
58+ t .Parallel ()
5759 if tt .expectNil && tt .awInfoContent == "" {
5860 result := extractEngineConfigWithInferredEngine ("" , "" )
5961 assert .Nil (t , result , "Should return nil for empty logs path" )
@@ -86,6 +88,7 @@ func TestExtractEngineConfig(t *testing.T) {
8688}
8789
8890func TestExtractEngineConfigWithDetails (t * testing.T ) {
91+ t .Parallel ()
8992 tmpDir := testutil .TempDir (t , "engine-config-details-*" )
9093 awInfoContent := `{
9194 "engine_id": "copilot",
@@ -113,6 +116,7 @@ func TestExtractEngineConfigWithDetails(t *testing.T) {
113116}
114117
115118func TestExtractEngineConfigInferredWithoutAwInfo (t * testing.T ) {
119+ t .Parallel ()
116120 tmpDir := testutil .TempDir (t , "engine-infer-*" )
117121 logContent := `{"type":"result","subtype":"success","num_turns":3,"usage":{"input_tokens":100,"output_tokens":200}}`
118122 require .NoError (t , os .WriteFile (filepath .Join (tmpDir , "agent-stdio.log" ), []byte (logContent ), 0o644 ))
@@ -124,6 +128,7 @@ func TestExtractEngineConfigInferredWithoutAwInfo(t *testing.T) {
124128}
125129
126130func TestInferFallbackLogMetricsFindsNestedAgentStdioLog (t * testing.T ) {
131+ t .Parallel ()
127132 tmpDir := testutil .TempDir (t , "engine-infer-nested-*" )
128133 nestedDir := filepath .Join (tmpDir , "agent" , "logs" )
129134 require .NoError (t , os .MkdirAll (nestedDir , 0o755 ))
@@ -136,6 +141,7 @@ func TestInferFallbackLogMetricsFindsNestedAgentStdioLog(t *testing.T) {
136141}
137142
138143func TestExtractPromptAnalysis (t * testing.T ) {
144+ t .Parallel ()
139145 tests := []struct {
140146 name string
141147 promptContent string
@@ -184,6 +190,7 @@ func TestExtractPromptAnalysis(t *testing.T) {
184190
185191 for _ , tt := range tests {
186192 t .Run (tt .name , func (t * testing.T ) {
193+ t .Parallel ()
187194 if tt .name == "empty logs path" {
188195 result := extractPromptAnalysis ("" )
189196 assert .Nil (t , result , "Should return nil for empty logs path" )
@@ -217,6 +224,7 @@ func TestExtractPromptAnalysis(t *testing.T) {
217224}
218225
219226func TestBuildSessionAnalysis (t * testing.T ) {
227+ t .Parallel ()
220228 tests := []struct {
221229 name string
222230 run WorkflowRun
@@ -287,6 +295,7 @@ func TestBuildSessionAnalysis(t *testing.T) {
287295
288296 for _ , tt := range tests {
289297 t .Run (tt .name , func (t * testing.T ) {
298+ t .Parallel ()
290299 processedRun := ProcessedRun {
291300 Run : tt .run ,
292301 JobDetails : tt .jobDetails ,
@@ -314,6 +323,7 @@ func TestBuildSessionAnalysis(t *testing.T) {
314323}
315324
316325func TestBuildSafeOutputSummary (t * testing.T ) {
326+ t .Parallel ()
317327 tests := []struct {
318328 name string
319329 items []CreatedItemReport
@@ -382,6 +392,7 @@ func TestBuildSafeOutputSummary(t *testing.T) {
382392
383393 for _ , tt := range tests {
384394 t .Run (tt .name , func (t * testing.T ) {
395+ t .Parallel ()
385396 result := buildSafeOutputSummary (tt .items , tt .chainMetrics )
386397 if tt .expectNil {
387398 assert .Nil (t , result , "Should return nil for empty items" )
@@ -405,6 +416,7 @@ func TestBuildSafeOutputSummary(t *testing.T) {
405416}
406417
407418func TestBuildSafeOutputSummaryString (t * testing.T ) {
419+ t .Parallel ()
408420 tests := []struct {
409421 name string
410422 details []SafeOutputTypeDetail
@@ -434,20 +446,23 @@ func TestBuildSafeOutputSummaryString(t *testing.T) {
434446
435447 for _ , tt := range tests {
436448 t .Run (tt .name , func (t * testing.T ) {
449+ t .Parallel ()
437450 result := buildSafeOutputSummaryString (tt .details )
438451 assert .Equal (t , tt .expected , result , "Summary string should match" )
439452 })
440453 }
441454}
442455
443456func TestPrettifySafeOutputType (t * testing.T ) {
457+ t .Parallel ()
444458 assert .Equal (t , "PR(s)" , prettifySafeOutputType ("create_pull_request" ), "Should prettify PR type" )
445459 assert .Equal (t , "issue(s)" , prettifySafeOutputType ("create_issue" ), "Should prettify issue type" )
446460 assert .Equal (t , "comment(s)" , prettifySafeOutputType ("add_comment" ), "Should prettify comment type" )
447461 assert .Equal (t , "custom_type" , prettifySafeOutputType ("custom_type" ), "Should return unknown types as-is" )
448462}
449463
450464func TestBuildMCPServerHealth (t * testing.T ) {
465+ t .Parallel ()
451466 tests := []struct {
452467 name string
453468 mcpUsage * MCPToolUsageData
@@ -488,6 +503,7 @@ func TestBuildMCPServerHealth(t *testing.T) {
488503
489504 for _ , tt := range tests {
490505 t .Run (tt .name , func (t * testing.T ) {
506+ t .Parallel ()
491507 result := buildMCPServerHealth (tt .mcpUsage , tt .mcpFailures )
492508 if tt .expectNil {
493509 assert .Nil (t , result , "Should return nil when both inputs are nil/empty" )
@@ -506,6 +522,7 @@ func TestBuildMCPServerHealth(t *testing.T) {
506522}
507523
508524func TestBuildMCPServerHealthErrorRate (t * testing.T ) {
525+ t .Parallel ()
509526 mcpUsage := & MCPToolUsageData {
510527 Servers : []MCPServerStats {
511528 {ServerName : "github" , RequestCount : 100 , ToolCallCount : 80 , ErrorCount : 15 , AvgDuration : "200ms" },
@@ -525,6 +542,7 @@ func TestBuildMCPServerHealthErrorRate(t *testing.T) {
525542}
526543
527544func TestBuildSlowestToolCalls (t * testing.T ) {
545+ t .Parallel ()
528546 calls := []MCPToolCall {
529547 {ServerName : "github" , ToolName : "search_code" , Duration : "100ms" },
530548 {ServerName : "github" , ToolName : "get_file" , Duration : "500ms" },
@@ -542,6 +560,7 @@ func TestBuildSlowestToolCalls(t *testing.T) {
542560}
543561
544562func TestBuildSlowestToolCallsEmpty (t * testing.T ) {
563+ t .Parallel ()
545564 result := buildSlowestToolCalls (nil , 5 )
546565 assert .Nil (t , result , "Should return nil for empty calls" )
547566
@@ -550,6 +569,7 @@ func TestBuildSlowestToolCallsEmpty(t *testing.T) {
550569}
551570
552571func TestBuildAuditDataWithExpandedSections (t * testing.T ) {
572+ t .Parallel ()
553573 tmpDir := testutil .TempDir (t , "audit-expanded-*" )
554574
555575 // Create test aw_info.json in activation/ subdir (unflattened artifact structure)
@@ -651,6 +671,7 @@ func TestBuildAuditDataWithExpandedSections(t *testing.T) {
651671}
652672
653673func TestBuildAuditDataExpandedWithNoData (t * testing.T ) {
674+ t .Parallel ()
654675 // Test that expanded sections are nil when no data is available
655676 processedRun := ProcessedRun {
656677 Run : WorkflowRun {
@@ -672,6 +693,7 @@ func TestBuildAuditDataExpandedWithNoData(t *testing.T) {
672693}
673694
674695func TestAwInfoHasMCPServers (t * testing.T ) {
696+ t .Parallel ()
675697 tests := []struct {
676698 name string
677699 awInfoContent string
@@ -706,6 +728,7 @@ func TestAwInfoHasMCPServers(t *testing.T) {
706728
707729 for _ , tt := range tests {
708730 t .Run (tt .name , func (t * testing.T ) {
731+ t .Parallel ()
709732 tmpDir := testutil .TempDir (t , "mcp-servers-*" )
710733 targetDir := tmpDir
711734 if tt .awInfoSubdir != "" {
0 commit comments