Skip to content

[test-parallel] test: add t.Parallel() to TestCompileWorkflowWithActionRef - #56962

Merged
pelikhan merged 1 commit into
mainfrom
go-test-parallelizer-1788036020-4547f464b665dd06
Aug 29, 2026
Merged

[test-parallel] test: add t.Parallel() to TestCompileWorkflowWithActionRef#56962
pelikhan merged 1 commit into
mainfrom
go-test-parallelizer-1788036020-4547f464b665dd06

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Summary

Daily Go test parallelizer run. Analyzed a batch of 25 *_test.go files (round-robin, starting after pkg/cli/gateway_logs_timeline_rpcentry_test.go) via the parallel-safety-batch-checker sub-agent for safe t.Parallel() additions.

Batch analyzed:

  • actions/setup/sh/validate_multi_secret_test.go
  • cmd/gh-aw-wasm/compile_recovery_test.go
  • cmd/gh-aw/argument_syntax_test.go
  • cmd/gh-aw/capitalization_test.go
  • cmd/gh-aw/command_groups_test.go
  • cmd/gh-aw/compile_flags_test.go
  • cmd/gh-aw/format_list_test.go
  • cmd/gh-aw/help_examples_test.go
  • cmd/gh-aw/help_flag_test.go
  • cmd/gh-aw/help_sections_order_test.go
  • cmd/gh-aw/main_entry_test.go
  • cmd/gh-aw/main_help_text_test.go
  • cmd/gh-aw/short_description_test.go
  • cmd/gh-aw/version_test.go
  • pkg/actionpins/actionpins_internal_test.go
  • pkg/actionpins/spec_test.go
  • pkg/agentdrain/anomaly_test.go
  • pkg/agentdrain/miner_test.go
  • pkg/agentdrain/spec_test.go
  • pkg/cli/access_log_test.go
  • pkg/cli/actionlint_test.go
  • pkg/cli/actions_build_command_test.go
  • pkg/cli/actions_test.go
  • pkg/cli/add_command_resources_test.go
  • pkg/cli/add_command_test.go

Most flagged-safe files already had t.Parallel() on all top-level tests and eligible subtests, so no change was needed there. One file had a top-level test still missing t.Parallel():

Change

pkg/cli/add_command_test.go: added t.Parallel() to TestCompileWorkflowWithActionRef.

Safety rationale:

  • Uses only t.TempDir()-scoped paths and a synthetic git repo (initTestGitRepo), no shared/fixed filesystem paths.
  • Does not use t.Setenv/os.Setenv, does not call os.Chdir, and does not touch package-level mutable globals.
  • No fixed ports, shared DB/services, or explicit cross-test synchronization.

Files flagged unsafe (and left unchanged) mostly rely on shared/global cobra command state (rootCmd traversal/mutation), os.Chdir, t.Setenv/os.Setenv, or package-level globals — these are correctly excluded per the parallelization safety rules.

Validation

  • go test -race ./pkg/cli/... -run TestCompileWorkflowWithActionRef -v → PASS
  • go test ./pkg/cli/... -run '<add_command related tests>' → PASS
  • Full go test ./pkg/cli/... run has one pre-existing, unrelated failure (TestInstallCopilotCLIScriptRootlessModeUsesRealScriptWithToolcacheAndNoSudo) caused by lack of outbound network access in this sandbox (curl 403 downloading release checksums), unrelated to this change.
  • Diff inspected: contains only the single t.Parallel() addition.

State persistence

state.json in cache-memory updated to {"last_file":"pkg/cli/add_command_test.go"} so the next daily run continues round-robin from this point.

Warning

Firewall blocked 3 domains

The following domains were blocked by the firewall during workflow execution:

  • api.github.com
  • github.com
  • raw.githubusercontent.com

[!TIP]
api.github.com is blocked because GitHub API access uses the built-in GitHub tools by default. Instead of adding api.github.com to network.allowed, use tools.github.mode: gh-proxy for direct pre-authenticated GitHub CLI access without requiring network access to api.github.com:

tools:
  github:
    mode: gh-proxy

See GitHub Tools for more information on gh-proxy mode.

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

network:
  allowed:
    - defaults
    - "api.github.com"
    - "github.com"
    - "raw.githubusercontent.com"

See Network Configuration for more information.

Generated by Daily Go Test Parallelizer · copilot · auto · 60.3 AIC · ⌖ 6.75 AIC · ⊞ 8.6K ·

  • expires on Sep 1, 2026, 12:43 PM UTC-08:00

Verified safe: uses only t.TempDir()-based paths and a fake git repo
via initTestGitRepo, no process-wide state (env vars, cwd changes, or
shared globals). Ran go test -race for the package and it passed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review August 29, 2026 20:53
Copilot AI balanced review requested due to automatic review settings August 29, 2026 20:53
@pelikhan
pelikhan merged commit df99915 into main Aug 29, 2026
@pelikhan
pelikhan deleted the go-test-parallelizer-1788036020-4547f464b665dd06 branch August 29, 2026 20:53
@github-actions

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor Author

Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel skipped because pre-fetch PR data was unavailable: unable to fetch test file diff

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor Author

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

@github-actions

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor Author

PR Code Quality Reviewer completed the code quality review.

Reviewed PR #56962 and found no actionable issues in the single added t.Parallel() change; no GitHub write beyond completion signaling needed.

🔎 Code quality review by PR Code Quality Reviewer

@github-actions

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor Author

Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft.

No ADR enforcement needed: PR does not have the 'implementation' label and has <=100 new lines of code in business logic directories.

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor Author

⚠️ Security scanning failed for Ponytail Reviewer. Review the logs for details.

Lean already. Ship.

Warning

Firewall blocked 4 domains

The following domains were blocked by the firewall during workflow execution:

  • ab.chatgpt.com
  • api.github.com
  • chatgpt.com
  • github.com

[!TIP]
api.github.com is blocked because GitHub API access uses the built-in GitHub tools by default. Instead of adding api.github.com to network.allowed, use tools.github.mode: gh-proxy for direct pre-authenticated GitHub CLI access without requiring network access to api.github.com:

tools:
  github:
    mode: gh-proxy

See GitHub Tools for more information on gh-proxy mode.

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

network:
  allowed:
    - defaults
    - "ab.chatgpt.com"
    - "api.github.com"
    - "chatgpt.com"
    - "github.com"

See Network Configuration for more information.

Generated by Ponytail Reviewer for #56962

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skills-Based Review 🧠

Applied /tdd — no issues found; approving.

The single-line addition of t.Parallel() is correct and safe:

  • t.TempDir() is used for all filesystem state, which is parallel-safe.
  • All variables are local to the test function.
  • No shared global state or sequential ordering constraints are visible.

✅ Clean, safe parallelisation.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet46 · 17.9 AIC · ⌖ 10.3 AIC · ⊞ 7.6K
Comment /matt to run again

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change correctly adds t.Parallel() to TestCompileWorkflowWithActionRef. The test uses t.TempDir() for isolation, making it safe for parallel execution. No issues found.

🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · copilot · sonnet46 · 13.4 AIC · ⌖ 10.5 AIC · ⊞ 6.2K

@github-actions github-actions Bot mentioned this pull request Aug 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The isolated test uses temporary paths and introduces no shared mutable state.

Pull request overview

Adds parallel execution to a safely isolated compiler test.

Changes:

  • Calls t.Parallel() in TestCompileWorkflowWithActionRef.
File summaries
File Description
pkg/cli/add_command_test.go Parallelizes the action-reference compilation test.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@github-actions

Copy link
Copy Markdown
Contributor Author

🎉 This pull request is included in a new release.

Release: v0.87.10

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.

2 participants