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
Pre-flight validation passed (deps-dev, lint, lint-errors, npm-ci, build, recompile, test-unit all ok: true), so this run focused on optimization. Analysis of cgo.yml's unit-test matrix showed a significant shard imbalance that was flagged (but not previously merged) by a prior ci-coach run.
Top Optimization
Rebalance cgo.yml unit-test matrix shards
Type: Test suite restructuring / matrix strategy
Impact: Reduces the longest-running shard from ~105.8s to ~54.2s (~49% reduction), shortening the critical path of the 5-way test job in cgo.yml.
Risk: Low — pure shard-repartitioning of existing -run regex patterns; no tests added/removed/skipped. Full A–Z coverage verified with zero gaps or overlaps.
Changes: .github/workflows/cgo.yml matrix include list.
Rationale: The old A-C shard combined the two heaviest letters (A ~46.5s + C ~54.2s = ~105.8s) into one shard, over 2x the next-heaviest shard (D-G ~42.4s). This made it the bottleneck for the whole job. Using per-letter elapsed-time data from a real test-unit run (10,602 top-level tests, ~241s total), letters were repacked via greedy (LPT) bin-packing into 5 shards:
Simulated the new regex patterns against all 10,602 real top-level test names extracted from /tmp/gh-aw/agent/test-results.json:
A 46.45s 620 tests
C 54.15s 1247 tests
B-E-I-P-T-U-V 47.58s 3730 tests
D-H-J-M-N-Q-S-W-Y 46.29s 2262 tests
F-G-K-L-O-R-X-Z+other 46.30s 2743 tests
UNMATCHED 0.00s 0 tests
total tests matched: 10602 (matches full test count)
No unmatched/duplicated letters across A–Z.
Expected Impact
~49% reduction in max-shard duration for the cgo.yml unit-test job, shrinking overall wall-clock time for that job stage.
Validation Results
YAML parsed successfully (js-yaml), matrix structure inspected and confirmed.
Regex coverage simulated against real test-name data (10,602/10,602 tests matched, zero gaps/overlaps).
go build/go test are blocked in this sandbox by a proxy.golang.org 403 (network restriction unrelated to this YAML-only change) — pre-flight validation-status.json already confirmed lint/build/test-unit passed on the base commit before this run began.
No Go/CLI code touched; only the shard pattern/shard/name fields in cgo.yml's test job matrix were changed.
Metrics Baseline
Total unit test time across matrix: ~241s (unchanged — same tests, same total work)
Old max shard: ~105.8s (A-C)
New max shard: ~54.2s (C)
Warning
Protected Files — Push Permission Denied
This was originally intended as a pull request, but the change modifies protected files. A human must create the pull request manually.
The push was rejected because GitHub Actions does not have workflows permission to push these changes, and is never allowed to make such changes, or other authorization being used does not have this permission.
Create the pull request manually
# Download the artifact from the workflow run
gh run download '34603719476' -n agent -D '/tmp/agent-34603719476'# Resolve the bundle source ref, fetch it into a temporary ref, then create the local branch
bundle_path='/tmp/agent-34603719476/aw-ci-coach-rebalance-cgo-unit-shards-20260911.bundle'
temp_ref='refs/bundles/create-pr-ci-coach-rebalance-cgo-unit-shards-20260911-73bf9170ab771529-d5d6d1f0'
target_ref='refs/heads/ci-coach/rebalance-cgo-unit-shards-20260911-73bf9170ab771529'
bundle_source_ref=$(git bundle list-heads "$bundle_path"| awk '$2 ~ /^refs\/heads\// { print $2 }')if [ -z"$bundle_source_ref" ];then
bundle_source_ref=$(git bundle list-heads "$bundle_path"| awk '$2 == "HEAD" { print $2 }')fiif [ "$(printf '%s\n'"$bundle_source_ref"| sed '/^$/d'| wc -l | tr -d '')"!="1" ];thenecho"Expected exactly one bundle source ref, found: $bundle_source_ref">&2exit 1
fi
git fetch "$bundle_path""${bundle_source_ref}:${temp_ref}"
git update-ref "$target_ref""$temp_ref"
git checkout 'ci-coach/rebalance-cgo-unit-shards-20260911-73bf9170ab771529'# Ensure the working tree matches the updated branch
git reset --hard
# Remove the temporary bundle ref
git update-ref -d "$temp_ref"# Push the branch and create the pull request
git push origin ci-coach/rebalance-cgo-unit-shards-20260911-73bf9170ab771529
gh pr create --title '[ci-coach] Rebalance cgo.yml unit-test matrix shards for better parallelism' --base main --head ci-coach/rebalance-cgo-unit-shards-20260911-73bf9170ab771529 --repo github/gh-aw
Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
proxy.golang.org
To allow these domains, add them to the network.allowed list in your workflow frontmatter:
CI Optimization Proposal
Summary
Pre-flight validation passed (deps-dev, lint, lint-errors, npm-ci, build, recompile, test-unit all
ok: true), so this run focused on optimization. Analysis ofcgo.yml's unit-test matrix showed a significant shard imbalance that was flagged (but not previously merged) by a prior ci-coach run.Top Optimization
Rebalance
cgo.ymlunit-test matrix shardstestjob incgo.yml.-runregex patterns; no tests added/removed/skipped. Full A–Z coverage verified with zero gaps or overlaps..github/workflows/cgo.ymlmatrixincludelist.A-Cshard combined the two heaviest letters (A~46.5s +C~54.2s = ~105.8s) into one shard, over 2x the next-heaviest shard (D-G~42.4s). This made it the bottleneck for the whole job. Using per-letter elapsed-time data from a realtest-unitrun (10,602 top-level tests, ~241s total), letters were repacked via greedy (LPT) bin-packing into 5 shards:Aalone (~46.5s)Calone (~54.2s)B,E,I,P,T,U,V(~47.6s)D,H,J,M,N,Q,S,W,Y(~46.3s)F,G,K,L,O,R,X,Z+ non-letter-prefixed tests (~46.3s)Coverage verification
Simulated the new regex patterns against all 10,602 real top-level test names extracted from
/tmp/gh-aw/agent/test-results.json:No unmatched/duplicated letters across A–Z.
Expected Impact
~49% reduction in max-shard duration for the
cgo.ymlunit-test job, shrinking overall wall-clock time for that job stage.Validation Results
js-yaml), matrix structure inspected and confirmed.go build/go testare blocked in this sandbox by aproxy.golang.org403 (network restriction unrelated to this YAML-only change) — pre-flightvalidation-status.jsonalready confirmedlint/build/test-unitpassed on the base commit before this run began.pattern/shard/namefields incgo.yml'stestjob matrix were changed.Metrics Baseline
A-C)C)Warning
Protected Files — Push Permission Denied
This was originally intended as a pull request, but the change modifies protected files. A human must create the pull request manually.
Protected files
The push was rejected because GitHub Actions does not have
workflowspermission to push these changes, and is never allowed to make such changes, or other authorization being used does not have this permission.Create the pull request manually
Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
proxy.golang.orgTo allow these domains, add them to the
network.allowedlist in your workflow frontmatter:See Network Configuration for more information.