Skip to content

[ci-coach] Parallelize repository workflow subtests in pkg/workflow/actions (fix test-unit timeout) - #78392

Merged
pelikhan merged 1 commit into
mainfrom
ci-coach/parallelize-actions-repo-workflow-tests-eb33f48c00bbcc4e
Nov 16, 2026
Merged

pelikhan merged 1 commit into
mainfrom
ci-coach/parallelize-actions-repo-workflow-tests-eb33f48c00bbcc4e

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

CI Optimization Proposal

Summary

Pre-flight test-unit failed: pkg/workflow/actions hit the 3m test timeout (TestRepositoryWorkflowCommentEdits, 2m11s in). Both TestRepositoryWorkflowCommentEdits and TestRepositoryWorkflowGraphs iterate serially over all 413 .github/workflows/*.yml files (~75s and ~49s respectively), so the package exceeded the limit on a 4-core runner. All other pre-flight steps (lint, build, recompile, npm-ci) passed.

Top Optimizations

Parallelize per-file subtests

  • Type: Test parallelization / test-unit fix
  • Impact: pkg/workflow/actions package ~47s (down from >180s timeout); unblocks make test-unit and shortens the critical path of any job running this package.
  • Risk: Low. Subtests are independent (read-only file reads, pure parse/emit). Counters in the graphs test are now atomic.Int64, and summary logs moved to t.Cleanup so they run after parallel subtests finish. Assertions are unchanged.
  • Changes: t.Parallel() in per-file subtests in pkg/workflow/actions/source_test.go and repository_workflows_test.go.
  • Rationale: serial, CPU-bound work over hundreds of files was the dominant cost in the package.

Expected Impact

Removes a test-unit failure for everyone running the full unit suite; ~4x faster for the two tests on 4 cores.

Validation Results

  • go test ./pkg/workflow/actions -count=1 -timeout=3m — ok (46.8s)
  • go test -race -run TestRepositoryWorkflow ./pkg/workflow/actions — ok
  • go vet, gofmt clean
  • No test assertions were weakened.

Metrics Baseline

  • Before: TestRepositoryWorkflowCommentEdits ~75s, TestRepositoryWorkflowGraphs ~49s, package timed out at 180s in pre-flight.
  • After: package 46.8s total.
  • Note: pkg/cli and pkg/workflow also hit the 3m harness timeout in pre-flight; not addressed here.

Generated by CI Optimization Coach · copilot · routed: sonnet55 high · ~43 AIC · ⌖ ~2 AIC · ⊞ 10K · ◷

  • expires on Nov 18, 2026, 6:04 AM UTC-08:00

…flow/actions

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review November 16, 2026 15:22
Copilot AI adaptive review requested due to automatic review settings November 16, 2026 15:22
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

🧠 Matt Pocock Skills Reviewer was skipped during the skills-based review.

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

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

🧪 Test quality analysis by Test Quality Sentinel · copilot · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ⊞ 7.3K · ◷

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ PR Code Quality Reviewer completed the code quality review.

PR Code Quality Reviewer

Outcome: reported_action

The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt56 · ~2 AIC · ⌖ ~1 AIC · ⊞ 1.5K · ◷

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated by Ponytail Reviewer for #78392 · codex · routed: gpt61 medium · ~3 AIC · ⌖ ~1 AIC · ⊞ 185 · ◷

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ PR Specification Reviewer completed successfully!

PR Specification Reviewer

Outcome: reported_action

The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated by PR Specification Reviewer for #78392 · copilot · gpt56 · ~2 AIC · ⌖ ~1 AIC · ⊞ 1.6K · ◷

@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.

Reviewed the changed test parallelization. No actionable correctness, race, performance, or maintainability issues found in the changed lines. The atomic counters and parent cleanup logging correctly synchronize summary output, and the per-file subtests are independent. Specialist review also found no issues.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~2 AIC · ⌖ ~1 AIC · ⊞ 1.5K
Comment /review to run again

@github-actions

Copy link
Copy Markdown
Contributor Author

Comment Memory

Peek at saved memory (spec-review-history)
{"id":"ldg-64da5744-20c1-4f70-9624-de12a5d46136","parents":[],"payload":{"id":"ldg-b9c0a10e-a9e2-4091-80b2-89552830c5a9","operation":"append","value":{"finding_count":0,"head_sha":"535a88bdee921f31f04722f48441b1064e2f4748","outcome":"aligned"}},"sha":"sha256:fedc93a469e0791cdcbb194db3fff46bcc313c80dadc52979280eddf6ddf528f","timestamp":"2026-11-16T15:30:52.870Z","type":"ledger_append","version":1}
History

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

No active review issues are identified, and the changes preserve the existing assertions while making concurrent test metrics safe.

No open issues 🎉

What changed in this PR

This PR reduces pkg/workflow/actions test runtime by parallelizing independent repository-workflow subtests while preserving assertions and making aggregate metrics concurrency-safe.

Changes:

  • Parallelizes comment-preservation and graph-validation subtests.
  • Uses atomic counters for concurrent graph-test metrics.
  • Defers summary logging until parallel subtests complete.
File Description
pkg/​workflow/​actions/​source_test.go Parallelizes per-workflow comment-preservation checks and moves summary logging to cleanup.
pkg/​workflow/​actions/​repository_workflows_test.go Parallelizes graph validation and protects aggregate job and edge counters with atomic operations.

Review effort: Lite (dynamic)

@github-actions

Copy link
Copy Markdown
Contributor Author

Comment Memory

Peek at saved memory (review-history)
{"id":"ldg-68309bb3-2446-4dc2-9c76-344a7141fc8c","parents":[],"payload":{"id":"ldg-eebc71a0-088c-4047-b81d-58b2587fcd67","operation":"append","value":{"finding_count":0,"head_sha":"535a88bdee921f31f04722f48441b1064e2f4748","outcome":"no_findings"}},"sha":"sha256:8ecbd2535b1a6e8d4a09284ce67a3fdc9177cff2c02c4ea1c8bccf252132f62b","timestamp":"2026-11-16T15:31:36.772Z","type":"ledger_append","version":1}
History

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Fix failing check activation (FAILURE): Check run.

Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering.

Structured data
{
  "completed_task": 0,
  "head": "535a88bdee921f31f04722f48441b1064e2f4748",
  "kind": "requested",
  "schema_version": "1",
  "state": "9aa9ec82b16146f51612b74c3f709db8d37c5fd670b7467178c979b5feb2b3b5",
  "work": [
    "a0e3721d61627208515dab43433d4bfd19a9675eb2d47d1232914f6f7362193f"
  ],
  "workflow": "pr-sous-chef"
}

Generated by 👨🍳 PR Sous Chef · pi · routed: haiku55 xhigh · ~2 AIC · ⌖ ~2 AIC · ⊞ 7K · ◷
Comment /souschef to run again

@pelikhan
pelikhan merged commit 87394da into main Nov 16, 2026
143 of 158 checks passed
@pelikhan
pelikhan deleted the ci-coach/parallelize-actions-repo-workflow-tests-eb33f48c00bbcc4e branch November 16, 2026 16:13
Copilot AI requested a review from gh-aw-bot November 16, 2026 16:13
Copilot stopped work on behalf of gh-aw-bot due to an error November 16, 2026 16:13
@github-actions

Copy link
Copy Markdown
Contributor Author

🎉 This pull request is included in a new release.

Release: v1.3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants