Skip to content

[test-parallel] test: add t.Parallel() to safe cli tests (batch) - #55506

Merged
pelikhan merged 3 commits into
mainfrom
gh-aw/pre-created/32774983457-1
Aug 24, 2026
Merged

[test-parallel] test: add t.Parallel() to safe cli tests (batch)#55506
pelikhan merged 3 commits into
mainfrom
gh-aw/pre-created/32774983457-1

Conversation

@github-actions

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

Copy link
Copy Markdown
Contributor

Summary

Adds t.Parallel() calls to test functions across six test files in pkg/cli, enabling those tests to run concurrently. This is part of a batch effort to parallelize the safe CLI test suite for faster test execution. No production code or test logic was modified.

Change Classification

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

Key Changes

File Change Impact
pkg/cli/stdin_test.go Added t.Parallel() to test and subtest functions Low
pkg/cli/tool_graph_test.go Added t.Parallel() to three test functions Low
pkg/cli/trial_command_lipgloss_test.go Added t.Parallel() to five test functions Low
pkg/cli/trial_safe_output_errors_test.go Added t.Parallel() to six test functions Low
pkg/cli/update_actions_content_refs_test.go Added t.Parallel() to nine test functions Low
pkg/cli/update_actions_workflow_files_test.go Added t.Parallel() to two test functions Low

Impact Assessment

No downstream impact identified. Changes are limited to test files, adding t.Parallel() markers to allow concurrent test execution within the pkg/cli package. No test logic, assertions, or production code were altered.

Commits

4dc9f1182 test: add t.Parallel() to safe cli test cases (batch)
549879bbf Initialize pull request for Daily Go Test Parallelizer
03022bfd7 Initialize pull request for Daily Go Test Parallelizer

Generated by PR Description Updater for #55506 · copilot · auto · 28.8 AIC · ⌖ 4.65 AIC · ⊞ 7.7K ·

Analyzed 25 test files in pkg/cli round-robin batch (after
status_dependency_tree_test.go). Added t.Parallel() to top-level tests
and table-driven subtests confirmed safe: no os.Setenv/t.Setenv,
os.Chdir, shared globals, fixed ports/paths, or external services.

Files updated:
- stdin_test.go: TestReadRunIDsFromStdin (+ subtests)
- tool_graph_test.go: TestToolGraph, TestToolGraphMultipleSequences, TestToolGraphEmptySequences
- trial_command_lipgloss_test.go: TestTrialConfirmationLipglossRendering (+ subtests), TestTrialConfirmationStructure, TestLipglossImportPresent, TestSectionCompositionPattern
- trial_safe_output_errors_test.go: TestExtractSafeOutputErrors (+ subtests), TestWorkflowTrialResultSuccessField, TestAggregateTrialResults (+ subtests), TestSanitizeControlChars (+ subtests)
- update_actions_content_refs_test.go: all top-level tests (deps/resolver-based, no shared state)
- update_actions_workflow_files_test.go: both top-level tests (use t.TempDir, no cwd/env mutation)

Remaining 18 files in the batch were left unchanged (unsafe: os.Chdir,
t.Setenv, global state mutation, external tools/network, or TestMain).

Validated with 'go test -race' on the modified test names and
'go test ./pkg/cli/...' (one pre-existing unrelated network-dependent
failure in install_copilot_cli_test.go due to sandboxed environment
lacking internet access).
@github-actions github-actions Bot changed the title [WIP] [test-parallel] Daily Go Test Parallelizer: work in progress [test-parallel] test: add t.Parallel() to safe cli tests (batch) Aug 24, 2026
@pelikhan
pelikhan marked this pull request as ready for review August 24, 2026 20:58
Copilot AI balanced review requested due to automatic review settings August 24, 2026 20:58
@pelikhan
pelikhan merged commit b7a3a24 into main Aug 24, 2026
2 checks passed
@pelikhan
pelikhan deleted the gh-aw/pre-created/32774983457-1 branch August 24, 2026 20:58
Copilot stopped reviewing on behalf of pelikhan due to an error August 24, 2026 20:58

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

Note

Copilot could not run the full agentic suite for this review because it was automatically requested on a bot-authored pull request. Request a review from Copilot under Reviewers to retry with the full agentic suite. Improved support for bot-authored pull requests is coming soon.

This PR parallelizes several Go test suites by adding t.Parallel() to top-level tests and some table-driven subtests to reduce overall test runtime.

Changes:

  • Added t.Parallel() to multiple top-level tests across pkg/cli.
  • Added t.Parallel() inside several t.Run(...) subtests in table-driven tests.
Show a summary per file
File Description
pkg/cli/update_actions_workflow_files_test.go Marks workflow update tests as parallel.
pkg/cli/update_actions_content_refs_test.go Marks action/skill/plugin ref update tests as parallel.
pkg/cli/trial_safe_output_errors_test.go Marks trial-related tests and table-driven subtests as parallel.
pkg/cli/trial_command_lipgloss_test.go Marks lipgloss rendering tests and subtests as parallel.
pkg/cli/tool_graph_test.go Marks tool graph tests as parallel.
pkg/cli/stdin_test.go Marks stdin parsing tests and table-driven subtests as parallel.

Review details

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

  • Files reviewed: 6/6 changed files
  • Comments generated: 3
  • Review effort level: Lite

@@ -42,6 +43,7 @@ func TestExtractSafeOutputErrors(t *testing.T) {

for _, tt := range tests {
Comment thread pkg/cli/stdin_test.go
@@ -65,6 +66,7 @@ func TestReadRunIDsFromStdin(t *testing.T) {

for _, tt := range tests {
@@ -150,6 +151,7 @@ func TestTrialConfirmationLipglossRendering(t *testing.T) {

for _, tt := range tests {
@github-actions

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

Copy link
Copy Markdown
Contributor Author

Ponytail Reviewer completed successfully!

Lean already. Ship.

Generated by Ponytail Reviewer for #55506

@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

PR Code Quality Reviewer completed the code quality review.

🔎 Code quality review by PR Code Quality Reviewer

@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

Design Decision Gate 🏗️ completed the design decision gate check.

No ADR enforcement needed: PR #55506 does not have the 'implementation' label and has only 28 new lines of code in business logic directories (threshold: 100).

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Aug 24, 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

Copy link
Copy Markdown
Contributor Author

Comment Memory

reviewed_at: 2026-08-24T00:00:00Z
review_event: COMMENT
top_themes:
  - no actionable issues in changed lines
  - parallelization additions appear isolated and safe
files_reviewed:
  - pkg/cli/stdin_test.go
  - pkg/cli/tool_graph_test.go
  - pkg/cli/trial_command_lipgloss_test.go
  - pkg/cli/trial_safe_output_errors_test.go
  - pkg/cli/update_actions_content_refs_test.go
  - pkg/cli/update_actions_workflow_files_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.26 AIC · ⌖ 6.89 AIC · ⊞ 7K ·
Comment /review 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.

Verdict

Non-blocking review: this patch only adds t.Parallel() to tests that stay in-memory or use isolated temp directories, and I don't see a changed-line correctness or concurrency regression worth blocking.

Highlights
  • The table-driven subtests added to stdin_test.go, trial_command_lipgloss_test.go, and trial_safe_output_errors_test.go operate on per-subtest local data with no shared mutable state.
  • The update_actions_* tests construct fresh dependency stubs and caches inside each test, and the workflow-file tests use t.TempDir(), so the new parallelism does not introduce path collisions.
  • I discarded the requested sub-agent pass because grumpy-coder is not available in this sandbox.

🔎 Code quality review by PR Code Quality Reviewer · pi · gpt54 · 4.26 AIC · ⌖ 6.89 AIC · ⊞ 7K
Comment /review 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.

Skills-Based Review 🧠

Applied /tdd — approved. Changes are clean and well-reasoned.

📋 Review Summary

Positive Highlights

  • t.Parallel() is added only to demonstrably pure, in-memory tests — the safety rationale in the PR description is sound for each file.
  • ✅ Top-level and table-driven subtests are both parallelised consistently, matching Go best practice.
  • TestUpdateActionRefsInContent_CacheReusedAcrossLines — the callCount variable is local to the closure, so concurrent test execution poses no data-race risk.
  • ✅ The excluded files (using os.Chdir, t.Setenv, SetVersionInfo, network/subprocess I/O) are correctly omitted; parallelising them would be unsafe.
  • ✅ The diff is purely additive (28 insertions, 0 deletions) with no logic or assertion changes.

No actionable issues found.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet46 · 16.2 AIC · ⌖ 9.8 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 t.Parallel() additions are mechanically correct throughout: every table-driven test gets t.Parallel() at both the outer function and inside each t.Run subtest, and standalone tests each get a single top-level call. No shared mutable state is introduced. No issues found.

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

@github-actions

Copy link
Copy Markdown
Contributor Author

🎉 This pull request is included in a new release.

Release: v0.87.5

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