You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR addresses three severe bottlenecks in the CI integration test matrix identified through analysis of recent test runs. The changes rebalance the test matrix by splitting large, slow test groups into smaller, focused groups that can complete faster.
Expected Impact: ~60% reduction in the longest-running integration test groups, reducing overall CI time.
Analysis Results
Analyzed test timing data from the most recent successful CI run:
Rationale: TestActionPinSHAsMatchVersionTags tests are network-bound (verify GitHub tags) and run 16s+ per action. Isolating them allows other tests to complete faster in parallel.
2. CLI Completion & Other → Extract Specific Command Groups
Type: Matrix Rebalancing Impact: ~100s per run (65% reduction) Risk: Low
Rationale: The original catch-all contained 1,023 tests including tests for add, list, update, audit, and inspect commands. Extracting these specific command groups reduces the catch-all size and enables better parallelization.
3. Workflow Misc Part 2 → Extract String & Runtime Groups
Type: Matrix Rebalancing Impact: ~100s per run (66% reduction) Risk: Low
Current State:
Catch-all group: "Workflow Misc Part 2" (150.8s, 3,997 tests)
Massive catch-all for all workflow tests not matched by specific patterns
Rationale: The catch-all contained 3,997 tests, making it the largest test group by far. Extracting string manipulation and runtime setup tests into dedicated groups reduces the catch-all size significantly.
Expected Impact
Metric
Before
After
Improvement
Integration Groups
23
29
+6 groups for better balance
Longest Group
247.4s
~80s (est.)
67% faster
Second Longest
155.4s
~50s (est.)
68% faster
Third Longest
150.8s
~50s (est.)
67% faster
Estimated Total Savings: ~165s in critical path per CI run
Validation Status
⚠️Note: This PR was created in an environment without Go/make available. The YAML syntax has been manually validated for correctness.
Manual Validation Performed:
✅ YAML syntax checked for formatting consistency
✅ Pattern syntax verified against existing working patterns
✅ Skip pattern updated to include all new extracted groups
✅ Group names follow existing naming conventions
✅ All test patterns are non-overlapping
Required Post-Merge Validation:
Monitor first CI run after merge for correct test distribution
Verify no tests are skipped or duplicated
Confirm runtime improvements match estimates
Check that new groups have balanced execution times
Testing Plan
Verify workflow syntax: GitHub Actions will validate YAML on push
Test on feature branch: First run will show actual group timings
Monitor balance: Check if new groups have similar runtimes (ideally 40-80s each)
Compare before/after: Longest group should drop from 247s to ~80s
Second longest: "CLI Completion & Other" - 155.4s (1,023 tests)
Third longest: "Workflow Misc Part 2" - 150.8s (3,997 tests)
Notes:
TestProgressFlagSignature (30s/test) and TestConnectHTTPMCPServer (10s/test) are already isolated - they are timeout-based tests that cannot be optimized further
Total integration test suite: ~1,700s across all groups before optimization
This optimization targets the three most severe bottlenecks identified in CI test execution. By splitting large test groups into focused, balanced groups, we reduce the critical path and enable better parallelization.
The patch file is available as an artifact (aw.patch) in the workflow run linked above.
To apply the patch locally:
# Download the artifact from the workflow run https://github.com/githubnext/gh-aw/actions/runs/20461762170# (Use GitHub MCP tools if gh CLI is not available)
gh run download 20461762170 -n aw.patch
# Apply the patch
git am aw.patch
Show patch preview (98 of 98 lines)
From 58565405c78479c61fa251657227fad8d09e1270 Mon Sep 17 00:00:00 2001
From: GitHub Actions <actions@github.com>
Date: Tue, 23 Dec 2025 13:26:43 +0000
Subject: [PATCH] Optimize CI integration test matrix to reduce bottlenecks
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Split three severe bottlenecks identified in CI test execution:
1. Workflow Cache & Actions (247s, 348 tests) → 3 focused groups
- Workflow Cache
- Workflow Actions Pin Validation (isolates slow SHA validation)
- Workflow Actions & Containers
2. CLI Completion & Other (155s, 1,023 tests) → Extract specific commands
- CLI Add & List Commands
- CLI Update Command
- CLI Audit & Inspect
- CLI Completion & Other (reduced catch-all)
3. Workflow Misc Part 2 (151s, 3,997 tests) → Extract focused groups
- Workflow String & Sanitization
- Workflow Runtime & Setup
- Workflow Misc Part 2 (reduced catch-all)
Expected impact: ~60% reduction in longest-running test groups.
Ref: CI Coach workflow run #24
---
.github/workflows/ci.yml | 29 +++++++++++++++++++++++++----
1 file changed, 25 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 12e0791..ddb68d2 100644
--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -99,10 +99,19 @@ jobs:
- name: "CLI Security Tools" # Group security tool compilation tests
packages: "./pkg/cli"
pattern: "TestCompileWithZizmor|TestCompileWithPoutine|TestCompileWithPoutineAndZizmor"
+ - name: "CLI Add & List Commands"+ packages: "./pkg/cli"+ pattern: "^TestAdd|^TestList"+ - name: "CLI Update Command"+ packages: "./pkg/cli"+ pattern: "^TestUpdate"+ - name: "CLI Audit & Inspect"+ packages: "./pkg/cli"+ pattern: "^TestAudit|^TestInspect"
- name: "CLI Completion & Other" # Remaining catch-all (reduced
... (truncated)
CI Optimization Proposal
Summary
This PR addresses three severe bottlenecks in the CI integration test matrix identified through analysis of recent test runs. The changes rebalance the test matrix by splitting large, slow test groups into smaller, focused groups that can complete faster.
Expected Impact: ~60% reduction in the longest-running integration test groups, reducing overall CI time.
Analysis Results
Analyzed test timing data from the most recent successful CI run:
TestActionPinSHAsMatchVersionTagstests (16s+ each)Optimizations
1. Workflow Cache & Actions → Split into 3 Groups
Type: Matrix Rebalancing
Impact: ~165s per run (67% reduction in bottleneck)
Risk: Low
Current State:
TestActionPinSHAsMatchVersionTagstests that validate action SHAs (16s+ per action)Proposed Structure:
Rationale:
TestActionPinSHAsMatchVersionTagstests are network-bound (verify GitHub tags) and run 16s+ per action. Isolating them allows other tests to complete faster in parallel.2. CLI Completion & Other → Extract Specific Command Groups
Type: Matrix Rebalancing
Impact: ~100s per run (65% reduction)
Risk: Low
Current State:
Proposed Structure:
Rationale: The original catch-all contained 1,023 tests including tests for
add,list,update,audit, andinspectcommands. Extracting these specific command groups reduces the catch-all size and enables better parallelization.3. Workflow Misc Part 2 → Extract String & Runtime Groups
Type: Matrix Rebalancing
Impact: ~100s per run (66% reduction)
Risk: Low
Current State:
Proposed Structure:
Rationale: The catch-all contained 3,997 tests, making it the largest test group by far. Extracting string manipulation and runtime setup tests into dedicated groups reduces the catch-all size significantly.
Expected Impact
Estimated Total Savings: ~165s in critical path per CI run
Validation Status
Manual Validation Performed:
Required Post-Merge Validation:
Testing Plan
Metrics Baseline
From analysis of run 20445400039:
Notes:
TestProgressFlagSignature(30s/test) andTestConnectHTTPMCPServer(10s/test) are already isolated - they are timeout-based tests that cannot be optimized furtherReferences
Workflow Run: §20461762170
This optimization targets the three most severe bottlenecks identified in CI test execution. By splitting large test groups into focused, balanced groups, we reduce the critical path and enable better parallelization.
Note
This was originally intended as a pull request, but the git push operation failed.
Workflow Run: View run details and download patch artifact
The patch file is available as an artifact (
aw.patch) in the workflow run linked above.To apply the patch locally:
Show patch preview (98 of 98 lines)