Repository navigation
[ci-coach] Parallelize repository workflow subtests in pkg/workflow/actions (fix test-unit timeout) - #78392
Conversation
…flow/actions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🧠 Matt Pocock Skills Reviewer was skipped during the skills-based review.
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: 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.
|
|
✅ PR Code Quality Reviewer completed the code quality review. PR Code Quality ReviewerOutcome: 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.
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: 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.
|
|
✅ PR Specification Reviewer completed successfully! PR Specification ReviewerOutcome: 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.
|
There was a problem hiding this comment.
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
Comment MemoryPeek at saved memory (spec-review-history)History |
There was a problem hiding this comment.
🟢 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)
Comment MemoryPeek at saved memory (review-history)History |
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
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"
}
|
|
🎉 This pull request is included in a new release. Release: |
CI Optimization Proposal
Summary
Pre-flight
test-unitfailed:pkg/workflow/actionshit the 3m test timeout (TestRepositoryWorkflowCommentEdits, 2m11s in). BothTestRepositoryWorkflowCommentEditsandTestRepositoryWorkflowGraphsiterate serially over all 413.github/workflows/*.ymlfiles (~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
pkg/workflow/actionspackage ~47s (down from >180s timeout); unblocksmake test-unitand shortens the critical path of any job running this package.atomic.Int64, and summary logs moved tot.Cleanupso they run after parallel subtests finish. Assertions are unchanged.t.Parallel()in per-file subtests inpkg/workflow/actions/source_test.goandrepository_workflows_test.go.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— okgo vet,gofmtcleanMetrics Baseline
TestRepositoryWorkflowCommentEdits~75s,TestRepositoryWorkflowGraphs~49s, package timed out at 180s in pre-flight.pkg/cliandpkg/workflowalso hit the 3m harness timeout in pre-flight; not addressed here.