From 730ef36202572a038118d57385938f4cb482d3f6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 20 Aug 2026 06:40:35 +0000 Subject: [PATCH 1/3] Initialize pull request for Daily Go Test Parallelizer From 78e9c44aa3ac4ba618c4f39338c44bfea1a1fbd3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 20 Aug 2026 06:59:38 +0000 Subject: [PATCH 2/3] Initialize pull request for Daily Go Test Parallelizer From 09ea3f1762366996d30dc2b79f0fce8875a6a5a3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 20 Aug 2026 06:59:39 +0000 Subject: [PATCH 3/3] test: add t.Parallel() to safe test cases in pkg/cli Analyzed 25 files (pkg/cli/logs_orchestrator_unit_test.go through pkg/cli/mcp_argument_validation_test.go) with per-file parallel-safety-checker sub-agents. Added t.Parallel() only to top-level tests and subtests confirmed safe: - logs_overview_test.go: 5 top-level tests, no shared state - logs_parsing_fallback_test.go: 3 top-level tests + 1 table-driven subtest set, uses t.TempDir() per test, no globals - logs_patch_test.go: 2 top-level tests, isolated temp dirs - logs_summary_file_test.go: 3 top-level tests, isolated temp dirs Files judged unsafe (env mutation, shared globals, os.Chdir, or unrebound loop-variable closures without go1.22 safety guarantees) were left unchanged: logs_orchestrator_unit_test.go, logs_output_hint_test.go, logs_parallel_test.go, logs_parse_test.go, logs_parsing_test.go, logs_rate_limit_test.go, logs_report_file_test.go, logs_report_test.go, logs_report_tools_isvalidtoolname_test.go, logs_run_processor_test.go, logs_safe_output_chains_test.go, logs_skill_activations_test.go, logs_summary_integration_test.go, logs_summary_test.go, logs_timeout_detection_test.go, logs_timeout_integration_test.go, logs_timeout_test.go, mcp_add_integration_test.go, mcp_add_test.go, mcp_argument_validation_test.go. logs_usage_activity_test.go already had t.Parallel() throughout. Validated with `go test -race ./pkg/cli/...` on the changed tests (all pass) and confirmed unrelated failures elsewhere in the suite (httptest port binding, TTY ANSI detection) are pre-existing sandbox limitations unrelated to this change. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- pkg/cli/logs_overview_test.go | 5 +++++ pkg/cli/logs_parsing_fallback_test.go | 4 ++++ pkg/cli/logs_patch_test.go | 2 ++ pkg/cli/logs_summary_file_test.go | 3 +++ 4 files changed, 14 insertions(+) diff --git a/pkg/cli/logs_overview_test.go b/pkg/cli/logs_overview_test.go index e78c4f19f7b..5691493a129 100644 --- a/pkg/cli/logs_overview_test.go +++ b/pkg/cli/logs_overview_test.go @@ -10,6 +10,7 @@ import ( // TestWorkflowRunStructHasMissingToolCount verifies that WorkflowRun has the MissingToolCount field func TestWorkflowRunStructHasMissingToolCount(t *testing.T) { + t.Parallel() run := WorkflowRun{ MissingToolCount: 5, } @@ -21,6 +22,7 @@ func TestWorkflowRunStructHasMissingToolCount(t *testing.T) { // TestProcessedRunPopulatesMissingToolCount verifies that missing tools are counted correctly func TestProcessedRunPopulatesMissingToolCount(t *testing.T) { + t.Parallel() processedRuns := []ProcessedRun{ { Run: WorkflowRun{ @@ -49,6 +51,7 @@ func TestProcessedRunPopulatesMissingToolCount(t *testing.T) { // TestLogsOverviewHeaderIncludesMissing verifies the header includes "Missing" func TestLogsOverviewHeaderIncludesMissing(t *testing.T) { + t.Parallel() // This test verifies the structure by checking that our expected headers are defined expectedHeaders := []string{"Run ID", "Workflow", "Status", "Duration", "Tokens", "Cost ($)", "Turns", "Errors", "Warnings", "Missing", "Created", "Logs Path"} @@ -67,6 +70,7 @@ func TestLogsOverviewHeaderIncludesMissing(t *testing.T) { // TestTotalMissingToolsCalculation verifies totals are calculated correctly func TestTotalMissingToolsCalculation(t *testing.T) { + t.Parallel() runs := []WorkflowRun{ {DatabaseID: 1, MissingToolCount: 2, LogsPath: "/tmp/gh-aw/run-1"}, {DatabaseID: 2, MissingToolCount: 0, LogsPath: "/tmp/gh-aw/run-2"}, @@ -93,6 +97,7 @@ func TestTotalMissingToolsCalculation(t *testing.T) { // TestMissingToolCountFieldAccessibility verifies field is accessible func TestMissingToolCountFieldAccessibility(t *testing.T) { + t.Parallel() var run WorkflowRun // Should be able to set and get the field diff --git a/pkg/cli/logs_parsing_fallback_test.go b/pkg/cli/logs_parsing_fallback_test.go index f5e89eea79e..84621d80ad9 100644 --- a/pkg/cli/logs_parsing_fallback_test.go +++ b/pkg/cli/logs_parsing_fallback_test.go @@ -11,6 +11,7 @@ import ( ) func TestParseLogFileWithEngine_FallbackParser(t *testing.T) { + t.Parallel() tests := []struct { name string logContent string @@ -66,6 +67,7 @@ INFO: Configuration loaded`, for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { + t.Parallel() // Create a temporary log file tempDir := t.TempDir() logFile := filepath.Join(tempDir, "test.log") @@ -82,6 +84,7 @@ INFO: Configuration loaded`, } func TestParseLogFileWithEngine_FallbackVsEngineSpecific(t *testing.T) { + t.Parallel() // Test that fallback parser works but engine-specific parser is still preferred logContent := `::error::GitHub Actions error ERROR: Generic error @@ -104,6 +107,7 @@ ERROR: Generic error } func TestParseLogFileWithEngine_NoAwInfoJson(t *testing.T) { + t.Parallel() // Simulate a scenario where aw_info.json is missing // This should trigger the fallback parser diff --git a/pkg/cli/logs_patch_test.go b/pkg/cli/logs_patch_test.go index c5a8443c845..70aaf2573c2 100644 --- a/pkg/cli/logs_patch_test.go +++ b/pkg/cli/logs_patch_test.go @@ -12,6 +12,7 @@ import ( ) func TestLogsPatchArtifactHandling(t *testing.T) { + t.Parallel() // Create a temporary directory for the test tmpDir := testutil.TempDir(t, "test-*") @@ -71,6 +72,7 @@ index 0000000..9daeafb } func TestLogsCommandHelp(t *testing.T) { + t.Parallel() // Test that the logs command help includes patch information cmd := NewLogsCommand() helpText := cmd.Long diff --git a/pkg/cli/logs_summary_file_test.go b/pkg/cli/logs_summary_file_test.go index fc46f3612b9..00e4dc4c594 100644 --- a/pkg/cli/logs_summary_file_test.go +++ b/pkg/cli/logs_summary_file_test.go @@ -12,6 +12,7 @@ import ( // TestWriteSummaryFile tests the writeSummaryFile function func TestWriteSummaryFile(t *testing.T) { + t.Parallel() // Create a temporary directory for testing tmpDir := t.TempDir() summaryPath := filepath.Join(tmpDir, "test-summary.json") @@ -87,6 +88,7 @@ func TestWriteSummaryFile(t *testing.T) { // TestWriteSummaryFileCreatesDirectory tests that parent directory is created func TestWriteSummaryFileCreatesDirectory(t *testing.T) { + t.Parallel() // Create a temporary directory for testing tmpDir := t.TempDir() summaryPath := filepath.Join(tmpDir, "subdir", "nested", "summary.json") @@ -120,6 +122,7 @@ func TestWriteSummaryFileCreatesDirectory(t *testing.T) { // TestWriteSummaryFileWithEmptyPath tests that empty path skips writing func TestSummaryFileDisabling(t *testing.T) { + t.Parallel() // This test verifies the behavior when summaryFile is empty string // The actual skip logic is in the orchestrator, but we document the behavior here