Skip to content

[test-parallel] test: add t.Parallel() to safe tests in pkg/cli (batch) - #56039

Merged
pelikhan merged 1 commit into
mainfrom
go-test-parallelizer/batch-1787748753-340ce626ef6388e3
Aug 26, 2026
Merged

pelikhan merged 1 commit into
mainfrom
go-test-parallelizer/batch-1787748753-340ce626ef6388e3

Conversation

@github-actions

@github-actions github-actions Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds t.Parallel() to test functions and their table-driven subtests across three files in pkg/cli that were identified as safe for parallel execution. This is part of a batch effort to speed up the test suite by enabling parallelism for tests without shared mutable state or ordering dependencies.

Change Classification

  • Type: test
  • Scope: pkg/cli
  • Breaking: No

Key Changes

File Change Impact
pkg/cli/compile_batch_operations_test.go Added t.Parallel() to three test functions low
pkg/cli/compile_config_test.go Added t.Parallel() to the main test function and its nested subtests low
pkg/cli/compile_dependabot_validation_test.go Added t.Parallel() to the main test function and its nested subtests low

Impact Assessment

No downstream impact identified. Changes are limited to test files and only add parallel execution markers; no test logic or assertions were modified.

Commits

0cf1da75f test: add t.Parallel() to safe test functions in pkg/cli

Generated by PR Description Updater for #56039 · copilot · auto · 32.4 AIC · ⌖ 7.39 AIC · ⊞ 7.7K · ◷

Add t.Parallel() to top-level tests and table-driven subtests in:
- compile_batch_operations_test.go (TestRunActionlintOnFiles_EmptyList,
  TestRunBatchDirectoryTool_NonStrictSwallowsErrors,
  TestRunBatchDirectoryTool_StrictWrapsErrors)
- compile_config_test.go (TestCompileConfig_ShellcheckEnabled and subtests)
- compile_dependabot_validation_test.go (TestCompileDependabotValidation
  and subtests)

These tests operate on pure in-memory logic with no os.Chdir, env
mutation, or shared global state, so they are safe to run in parallel.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review August 26, 2026 13:51
Copilot AI balanced review requested due to automatic review settings August 26, 2026 13:51
@pelikhan
pelikhan merged commit cb89679 into main Aug 26, 2026
9 checks passed
@pelikhan
pelikhan deleted the go-test-parallelizer/batch-1787748753-340ce626ef6388e3 branch August 26, 2026 13:51
@github-actions

github-actions Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ PR Code Quality Reviewer completed the code quality review.

Reviewed PR #56039 and found no actionable changed-line issues worth commenting on; no GitHub write beyond completion signaling was needed.

🔎 Code quality review by PR Code Quality Reviewer

@github-actions

github-actions Bot commented Aug 26, 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 26, 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 (7 additions detected across 3 files).

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Aug 26, 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 26, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Ponytail Reviewer completed successfully!

Lean already. Ship. No over-engineering findings in this test-parallelization diff.

Generated by Ponytail Reviewer for #56039

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.

Pull request overview

Adds safe test parallelization in pkg/cli to reduce test runtime.

Changes:

  • Parallelizes three batch-operation tests.
  • Parallelizes shellcheck configuration table tests.
  • Parallelizes Dependabot validation table tests.
Show a summary per file
File Description
pkg/cli/compile_batch_operations_test.go Runs independent batch-tool tests concurrently.
pkg/cli/compile_config_test.go Parallelizes pure configuration checks.
pkg/cli/compile_dependabot_validation_test.go Parallelizes validation cases.

Review details

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

  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Balanced

@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 — approving. The additions are correct, the PR description is thorough, and the author validated with -race before submitting.

📋 Summary

What was checked

  • All three changed files add t.Parallel() only to pure-logic tests with no shared mutable state, no os.Chdir, no t.Setenv, and no filesystem/git side effects — exactly the right candidates.
  • Table-driven subtests in compile_config_test.go and compile_dependabot_validation_test.go correctly add t.Parallel() to both the parent and subtest loops (the standard Go pattern).
  • The PR description clearly documents which files were skipped and why, demonstrating solid understanding of parallelism safety.

Positive Highlights

  • ✅ -race run confirmed clean before merge
  • ✅ Skipped files correctly identified (chdir, Setenv, external processes)
  • ✅ No production code touched — zero risk surface

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet46 · 20.4 AIC · ⌖ 9.84 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.

All added t.Parallel() calls are in pure unit tests with no shared mutable state, global variables, filesystem writes, or environment mutations. Safe to parallelize. LGTM.

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

@github-actions

Copy link
Copy Markdown
Contributor Author

Comment Memory

reviewed_at: 2026-08-26T00:00:00Z
review_event: COMMENT
top_themes: []
files_reviewed:
  - pkg/cli/compile_batch_operations_test.go
  - pkg/cli/compile_config_test.go
  - pkg/cli/compile_dependabot_validation_test.go
comment_count: 0

Note

This comment is managed by comment memory.

It stores persistent context for this thread in the code block at the top of this comment.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Learn more about comment memory

🔎 Code quality review by PR Code Quality Reviewer · pi · gpt54 · 4.45 AIC · ⌖ 6.83 AIC · ⊞ 7K · ◷
Comment /review to run again

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

Copy link
Copy Markdown
Contributor Author

🎉 This pull request is included in a new release.

Release: v0.87.8

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