Skip to content

[test-parallel] test: parallelize safe Go test (daily batch) - #55047

Draft
github-actions[bot] wants to merge 4 commits into
mainfrom
gh-aw/pre-created/32628769903-1
Draft

[test-parallel] test: parallelize safe Go test (daily batch)#55047
github-actions[bot] wants to merge 4 commits into
mainfrom
gh-aw/pre-created/32628769903-1

Conversation

@github-actions

@github-actions github-actions Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Daily Go Test Parallelizer

Analyzed a batch of 25 pkg/cli/*_test.go files (round-robin resuming after compile_guard_policy_policy_report_test.go, ending at compile_watch_environment_test.go).

Result: 1 safe change

  • TestCompileUpdateDiscussionFieldEnforcement (pkg/cli/compile_update_discussion_test.go): added t.Parallel(). This test only uses t.TempDir() and local variables — no shared/global state, no os.Chdir, no os.Setenv, no shared mutable globals.

Why the other 24 files were left unchanged

  • Files whose tests call setupIntegrationTest (e.g. compile_permissions_integration_test.go, compile_pull_request_target_integration_test.go, compile_safe_update_integration_test.go, compile_service_ports_integration_test.go, compile_safe_outputs_needs_imports_integration_test.go, compile_max_turns_import_integration_test.go, compile_model_fallback_integration_test.go) rely on os.Chdir to a process-wide working directory — unsafe to parallelize.
  • Files that redirect global os.Stdout/os.Stderr for output capture (e.g. compile_json_output_test.go, compile_stats_test.go, compile_schedule_calendar_test.go, compile_update_check_test.go subset) — unsafe, since concurrent redirection races.
  • compile_orchestrator_container_pins_test.go mutates a shared package-level function variable (compileUpdateContainerPins); confirmed via go test -race that adding t.Parallel() there introduces a real data race, so it was reverted.
  • compile_orchestrator_host_test.go, compile_orchestrator_stability_test.go, compile_pipeline_yamllint_test.go, compile_repository_manifest_test.go, compile_update_check_test.go, compile_watch_environment_test.go use t.Setenv/os.Setenv/os.Chdir.
  • compile_pipeline_purge_test.go and most of compile_schedule_calendar_test.go/compile_stats_test.go already have t.Parallel() on all safe candidates.
  • compile_maintenance_test.go, compile_instructions_test.go, compile_integration_test.go use os.Chdir and/or shared filesystem state — unsafe.

Validation

  • go test -race -run TestCompileUpdateDiscussionFieldEnforcement ./pkg/cli/... — pass
  • go test -run TestCompileUpdateDiscussionFieldEnforcement -v ./pkg/cli/... — pass
  • Diff limited to the single t.Parallel() addition; no other file changes.

State cache updated to advance the round-robin cursor to pkg/cli/compile_watch_environment_test.go for the next daily run.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • registry.npmjs.org

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "registry.npmjs.org"

See Network Configuration for more information.

Generated by Daily Go Test Parallelizer · auto · 221.9 AIC · ⌖ 8.46 AIC · ⊞ 8.4K ·

  • expires on Aug 26, 2026, 1:05 AM UTC-08:00

@github-actions

Copy link
Copy Markdown
Contributor Author

👋 Thanks for opening this PR! However, this appears to be a work-in-progress pre-created by an automated GitHub Actions workflow for the Daily Go Test Parallelizer rather than a traditional external contribution.

Since this is an internal agentic workflow PR created by the core team automation, it falls outside the scope of the contributing guidelines for external contributors. The guidelines explicitly state:

🚫 Traditional Pull Requests Are Not Enabled for non-Core team members

If you are a core team member working on this internal workflow, please disregard this evaluation - the PR will be assessed once the agent completes its work and actual changes are present. If you are an external contributor, please create a detailed agentic plan in an issue instead of a direct PR.

Generated by ✅ Contribution Check · auto · 52.3 AIC · ⌖ 7.63 AIC · ⊞ 9.3K ·

github-actions Bot and others added 3 commits August 23, 2026 09:05
Analyzed 25 test files in pkg/cli/ (compile_guard_policy_test.go through
compile_watch_environment_test.go) for safe t.Parallel() additions. Only
one test was demonstrably safe to parallelize; the rest use process-global
state (os.Chdir via setupIntegrationTest, os.Stdout/os.Stderr redirection,
shared package-level vars) that would race under -race if parallelized.

TestCompileUpdateDiscussionFieldEnforcement uses only t.TempDir() and
local variables, with no shared/global state, making it safe.

Verified with 'go test -race' targeting the modified test.
…atch)

Analyzed 25 test files (compile_wif_anthropic_integration_test.go through
docker_build_integration_test.go) for safe t.Parallel() additions.

Safe additions made to:
- copilot_setup_runs_on_test.go: TestValidateCopilotSetupStepsRunsOn (pure function, no shared state)
- daily_regression_audit_workflow_contract_test.go: TestDailyRegressionAuditAllowsPythonJSONParsing (read-only file checks)
- deps_test.go: 8 top-level tests + table-driven subtests (pure helpers, isolated temp files)
- docker_args_validation_test.go: 6 top-level tests + table-driven subtests (pure validation functions, isolated temp dirs)
- docker_build_integration_test.go: TestIsTransientDockerBuildFailure, TestDockerfile_Exists, TestMakefile_DockerTargets (read-only file/pure checks; Docker build/run tests left unparallelized due to shared image tag and external Docker daemon dependency)

Skipped as unsafe: files using os.Chdir, t.Setenv, package-level global
reassignment, or unverified shared setup helpers (compile_wif_*_integration_test.go,
completions_integration_test.go, completions_test.go, context_cancellation_test.go,
copilot_agents_test.go, copilot_billing_check_test.go, copilot_setup_test.go,
dependency_graph_test.go, deploy_command_test.go, deploy_org_test.go,
devcontainer_test.go).

Verified with 'go test -race' targeting all modified tests plus a full
'go test ./pkg/cli/...' run (one pre-existing unrelated network-dependent
test failure confirmed present on the pre-change baseline too).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot changed the title [WIP] [test-parallel] Daily Go Test Parallelizer: work in progress [test-parallel] test: parallelize safe Go test (daily batch) Aug 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants