ci: shard ai and codemod tests#15404
Merged
Merged
Conversation
Split the two slowest package test tasks into dedicated shard matrices and exclude them from the regular Test matrix. Fixes #15403 Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
| test_ai_matrix: | ||
| name: 'Test AI' | ||
| runs-on: ubuntu-latest | ||
| strategy: |
Contributor
This was referenced May 19, 2026
gr2m
added a commit
that referenced
this pull request
May 19, 2026
Bundles the intent of these main-branch PRs into release-v6.0, adapted to v6's CI structure (keeps Node 20/22/24 matrix; uses tag-style action refs rather than SHA pins): - #15400 ci: reuse package builds in test jobs - #15407 test(ai): share Vitest config - #15404 ci: shard ai and codemod tests - #15411 ci: narrow PR test node matrix - #15409 ci: gate RSC Playwright tests - #15417 ci: delete obsolete discussion workflows - #15418 ci: notify about failures on main and release branches - #15419 ci: speed build build-examples job Not backported: #15390 (bump min node to 22), #15389 (deps), #15421 (agent UI generic).
gr2m
added a commit
that referenced
this pull request
May 19, 2026
Bundles the intent of these main-branch PRs into release-v5.0, adapted to v5's CI structure (keeps Node 20/22/24 matrix; uses tag-style action refs rather than SHA pins; load-time job stays in examples/ai-core): - #15400 ci: reuse package builds in test jobs - #15407 test(ai): share Vitest config - #15404 ci: shard ai and codemod tests - #15411 ci: narrow PR test node matrix - #15409 ci: gate RSC Playwright tests - #15417 ci: delete obsolete discussion workflows (already absent on v5) - #15418 ci: notify about failures on main and release branches - #15419 ci: speed build build-examples job Not backported: #15390 (bump min node to 22), #15389 (deps), #15421 (agent UI generic).
gr2m
added a commit
that referenced
this pull request
May 19, 2026
Bundles the intent of these main-branch PRs into release-v5.0, adapted to v5's CI structure (keeps Node 20/22/24 matrix; uses tag-style action refs rather than SHA pins; load-time job stays in examples/ai-core): - #15400 ci: reuse package builds in test jobs - #15407 test(ai): share Vitest config - #15404 ci: shard ai and codemod tests - #15411 ci: narrow PR test node matrix - #15409 ci: gate RSC Playwright tests - #15417 ci: delete obsolete discussion workflows (already absent on v5) - #15418 ci: notify about failures on main and release branches - #15419 ci: speed build build-examples job Not backported: #15390 (bump min node to 22), #15389 (deps), #15421 (agent UI generic).
gr2m
added a commit
that referenced
this pull request
May 19, 2026
Bundles the intent of these main-branch PRs into release-v6.0, adapted to v6's CI structure (keeps Node 20/22/24 matrix; uses tag-style action refs rather than SHA pins): - #15400 ci: reuse package builds in test jobs - #15407 test(ai): share Vitest config - #15404 ci: shard ai and codemod tests - #15411 ci: narrow PR test node matrix - #15409 ci: gate RSC Playwright tests - #15417 ci: delete obsolete discussion workflows - #15418 ci: notify about failures on main and release branches - #15419 ci: speed build build-examples job Not backported: #15390 (bump min node to 22), #15389 (deps), #15421 (agent UI generic).
gr2m
added a commit
that referenced
this pull request
May 19, 2026
Bundles the intent of these main-branch PRs into release-v5.0, adapted to v5's CI structure (keeps Node 20/22/24 matrix; uses tag-style action refs rather than SHA pins; load-time job stays in examples/ai-core): - #15400 ci: reuse package builds in test jobs - #15407 test(ai): share Vitest config - #15404 ci: shard ai and codemod tests - #15411 ci: narrow PR test node matrix - #15409 ci: gate RSC Playwright tests - #15417 ci: delete obsolete discussion workflows (already absent on v5) - #15418 ci: notify about failures on main and release branches - #15419 ci: speed build build-examples job Not backported: #15390 (bump min node to 22), #15389 (deps), #15421 (agent UI generic).
gr2m
added a commit
that referenced
this pull request
May 19, 2026
Bundles the intent of these main-branch PRs into release-v6.0, adapted to v6's CI structure (keeps Node 20/22/24 matrix; uses tag-style action refs rather than SHA pins): - #15400 ci: reuse package builds in test jobs - #15407 test(ai): share Vitest config - #15404 ci: shard ai and codemod tests - #15411 ci: narrow PR test node matrix - #15409 ci: gate RSC Playwright tests - #15417 ci: delete obsolete discussion workflows - #15418 ci: notify about failures on main and release branches - #15419 ci: speed build build-examples job Not backported: #15390 (bump min node to 22), #15389 (deps), #15421 (agent UI generic).
gr2m
added a commit
that referenced
this pull request
May 19, 2026
Bundles the intent of these main-branch PRs into release-v6.0, adapted to v6's CI structure (keeps Node 20/22/24 matrix; uses tag-style action refs rather than SHA pins): - #15400 ci: reuse package builds in test jobs - #15407 test(ai): share Vitest config - #15404 ci: shard ai and codemod tests - #15411 ci: narrow PR test node matrix - #15409 ci: gate RSC Playwright tests - #15417 ci: delete obsolete discussion workflows - #15418 ci: notify about failures on main and release branches - #15419 ci: speed build build-examples job Not backported: #15390 (bump min node to 22), #15389 (deps), #15421 (agent UI generic).
gr2m
added a commit
that referenced
this pull request
May 19, 2026
Bundles the intent of these main-branch PRs into release-v5.0, adapted to v5's CI structure (keeps Node 20/22/24 matrix; uses tag-style action refs rather than SHA pins; load-time job stays in examples/ai-core): - #15400 ci: reuse package builds in test jobs - #15407 test(ai): share Vitest config - #15404 ci: shard ai and codemod tests - #15411 ci: narrow PR test node matrix - #15409 ci: gate RSC Playwright tests - #15417 ci: delete obsolete discussion workflows (already absent on v5) - #15418 ci: notify about failures on main and release branches - #15419 ci: speed build build-examples job Not backported: #15390 (bump min node to 22), #15389 (deps), #15421 (agent UI generic).
gr2m
added a commit
that referenced
this pull request
May 19, 2026
Bundles the intent of these main-branch PRs into release-v6.0, adapted to v6's CI structure (keeps Node 20/22/24 matrix; uses tag-style action refs rather than SHA pins): - #15400 ci: reuse package builds in test jobs - #15407 test(ai): share Vitest config - #15404 ci: shard ai and codemod tests - #15411 ci: narrow PR test node matrix - #15409 ci: gate RSC Playwright tests - #15417 ci: delete obsolete discussion workflows - #15418 ci: notify about failures on main and release branches - #15419 ci: speed build build-examples job Not backported: #15390 (bump min node to 22), #15389 (deps), #15421 (agent UI generic).
gr2m
added a commit
that referenced
this pull request
May 20, 2026
## Summary Bundles the intent of eight main-branch CI PRs from May 18 into `release-v5.0`. Each PR was manually adapted to v5's CI structure rather than cherry-picked, because v5 still uses `@vN`-tag action refs (not SHA pins), keeps the Node 20/22/24 matrix, has a flatter \`ci.yml\` (no \`konsistent\` job), and runs the load-time benchmark from \`examples/ai-core\` (not \`ai-functions\`). ### Backported - #15400 \`ci: reuse package builds in test jobs\` — adds a \`build-packages\` job that uploads \`packages/*/dist\`; test/bundle-size/load-time jobs download instead of rebuilding. - #15407 \`test(ai): share Vitest config\` — extracts \`packages/ai/vitest.config.js\` factory. - #15404 \`ci: shard ai and codemod tests\` — adds \`test_ai_matrix\` + \`test_codemod_matrix\` (4 shards × Node 20/22/24); excludes ai + codemod from regular Test matrix via \`pnpm test:ci\`. - #15411 \`ci: narrow PR test node matrix\` — adds \`test_node_versions\` planner; PRs without package source/test changes use Node 22 only. - #15409 \`ci: gate RSC Playwright tests\` — detects RSC-relevant PR changes; skips Playwright install + sets \`SKIP_RSC_E2E=1\` when irrelevant. - #15417 \`ci: delete obsolete discussion workflows\` — no-op for workflow deletes (already absent on v5); adds \`SKIP_RSC_E2E\` env to relevant turbo tasks. - #15418 \`ci: notify about failures on main and release branches\` — adds CI to the Slack workflow_run watchlist with a branch filter; corrects a verify-changesets comment. - #15419 \`ci: speed build build-examples job\` — shards \`build-examples\` into 4 with build caching. ### Not backported (per request) - #15390 (bump min Node to 22 — breaking change) - #15389 (dependency updates) - #15421 (refactor: introduce agent UI message generic) ### Adaptations to v5 - Kept Node \`[20, 22, 24]\` everywhere (no jump to \`[22, 24, 26]\`). - Used tag-style action refs (\`actions/checkout@v6\` etc.) instead of main's pinned SHAs. - Skipped the \`konsistent\` job since v5's ci.yml never had it. - Load-time job runs from \`examples/ai-core\` with v5's existing thresholds (ai max 95ms). - Build-examples shard filters use v5's example names (e.g. includes \`@example/next-openai\` which exists on v5 but not on main; uses \`@example/next-openai-upstash-rate-limits\` to match v5's package name; omits \`@example/next-workflow\`). - Discussion workflows already absent on v5, so only the turbo.json portion of #15417 applies. ## Test plan - [ ] CI passes on this PR - [ ] \`Test\` jobs run \`pnpm test:ci\` (regular packages, excludes ai/codemod) - [ ] \`Test AI\` runs 4 shards × Node 20/22/24 - [ ] \`Test Codemod\` runs 4 shards × Node 20/22/24 - [ ] PRs without package source changes get Node 22-only Test matrix - [ ] Non-RSC changes skip Playwright install - [ ] Build-examples shards complete in parallel with cache restore
gr2m
added a commit
that referenced
this pull request
May 20, 2026
## Summary Bundles the intent of eight main-branch CI PRs from May 18 into `release-v6.0`. Each PR was manually adapted to v6's CI structure rather than cherry-picked, because v6 still uses `@vN`-tag action refs (not SHA pins), keeps the Node 20/22/24 matrix, and has a flatter `ci.yml` (no \`konsistent\` job). ### Backported - #15400 \`ci: reuse package builds in test jobs\` — adds a \`build-packages\` job that uploads \`packages/*/dist\`; test/bundle-size/load-time jobs download instead of rebuilding. - #15407 \`test(ai): share Vitest config\` — extracts \`packages/ai/vitest.config.js\` factory. - #15404 \`ci: shard ai and codemod tests\` — adds \`test_ai_matrix\` + \`test_codemod_matrix\` (4 shards × Node 20/22/24); excludes ai + codemod from regular Test matrix via \`pnpm test:ci\`. - #15411 \`ci: narrow PR test node matrix\` — adds \`test_node_versions\` planner; PRs without package source/test changes use Node 22 only. - #15409 \`ci: gate RSC Playwright tests\` — detects RSC-relevant PR changes; skips Playwright install + sets \`SKIP_RSC_E2E=1\` when irrelevant. - #15417 \`ci: delete obsolete discussion workflows\` — deletes \`discussions-auto-close-{new,stale}.yml\`; adds \`SKIP_RSC_E2E\` env to relevant turbo tasks. - #15418 \`ci: notify about failures on main and release branches\` — adds CI to the Slack workflow_run watchlist with a branch filter; corrects a verify-changesets comment. - #15419 \`ci: speed build build-examples job\` — shards \`build-examples\` into 4 with build caching. ### Not backported (per request) - #15390 (bump min Node to 22 — breaking change) - #15389 (dependency updates) - #15421 (refactor: introduce agent UI message generic) ### Adaptations to v6 - Kept Node \`[20, 22, 24]\` everywhere (no jump to \`[22, 24, 26]\`). - Used tag-style action refs (\`actions/checkout@v6\` etc.) instead of main's pinned SHAs. - Skipped the \`konsistent\` job since v6's ci.yml never had it. - Build-examples shard filters mirror main; missing examples on v6 (e.g. \`@example/next-workflow\`) become no-ops under turbo filters. - Load-time job continues to use \`examples/ai-functions\` with v6's existing thresholds (ai max 100ms). ## Test plan - [ ] CI passes on this PR - [ ] \`Test\` jobs run \`pnpm test:ci\` (regular packages, excludes ai/codemod) - [ ] \`Test AI\` runs 4 shards × Node 20/22/24 - [ ] \`Test Codemod\` runs 4 shards × Node 20/22/24 - [ ] PRs without package source changes get Node 22-only Test matrix - [ ] Non-RSC changes skip Playwright install - [ ] Build-examples shards complete in parallel with cache restore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
ai+codemodare slow tail tasks. Fixes #15403.Summary
ai+@ai-sdk/codemodfrom regular Test matrixManual Verification
pnpm run checkpnpm --dir packages/ai test:node --shard 1/4pnpm --dir packages/codemod exec vitest --config vitest.config.ts --run --shard 1/4ai#testand@ai-sdk/codemod#testImpact
CI run 26050427856 passed.
Regular Run tests step:
Shard jobs:
Net: regular Test jobs got faster, but CI fanout increased. Useful as isolation/sharding groundwork; wall-time win is mixed until combined with the other PRs.
Checklist
pnpm changesetin the project root)Related Issues
Fixes #15403