mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-29 06:50:43 +01:00
perf(ci): shard release-verify stragglers and move typecheck cache warmup (#23156)
## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work. > - Every merge to `master` runs `release-verify.yml` on the dedicated `paperclip-post-merge-x64` fleet to certify the exact commit before downstream releases consume it. > - Four lanes currently bottleneck `release-verify.yml` at ~6m–6m 30s (`server-integration`, `server (1/10)`, `Serialized tests (1/9)`, and `Build` with 75s of serial typecheck-cache warming), while every other lane finishes in 2m–3m 45s. > - Post-merge verification latency directly delays every release pipeline waiting on exact-source proof. > - This pull request shards those three test stragglers using existing deterministic shard flags and moves incremental typecheck cache warming into `typecheck` (skipping a redundant server pass when `pnpm -r typecheck` already populated the cache). > - The benefit is a balanced ~4m post-merge verification critical path with zero weakened or removed checks. ## Linked Issues or Issue Description **What happened?** Post-merge release verification (`release-verify.yml`) takes ~6m 30s on its slowest lanes (`server-integration` 6m 29s, `server (1/10)` 6m 23s, `Serialized tests (1/9)` 6m 00s, and `Build` 5m 45s including 75s of `Warm incremental typecheck cache`), while the rest of the workflow finishes in ~3m. **Expected behavior** All lanes in `release-verify.yml` should run with balanced parallelism on `paperclip-post-merge-x64` so post-merge verification finishes in ~4m while running every existing check. **Steps to reproduce** 1. Inspect a canonical `master` run of `cloud-readiness.yml` / `release-verify.yml` (such as run `46019173820`). 2. Compare the four straggler lanes (345s–389s) against `Typecheck` (162s) and all other verification lanes (58s–225s). ## What Changed - Expanded `general-server-without-chat-or-native-runner` in `.github/workflows/release-verify.yml` from 10 to 20 shards. - Expanded `serialized_tests` in `.github/workflows/release-verify.yml` from 9 to 16 shards. - Split `verify_paperclip_runner` `server-integration` into 3 sharded lanes (`server-integration (1/3)`, `(2/3)`, `(3/3)`) passing `--shard-index` and `--shard-count` to `pnpm test:run:general -- --group general-server-native-runner`. - Moved `Check/Warm/Save incremental typecheck cache` from `build` into `typecheck`, skipping the duplicate `server/scripts/typecheck-layers.mjs` pass when `pnpm -r typecheck` already populated `server/node_modules/.cache/paperclip-typecheck`. - Updated workflow guard tests in `.github/scripts/tests/release-runner-cache.test.mjs`, `scripts/__tests__/release-verify-workflow.test.mjs`, and `.github/scripts/tests/ci-plan.test.mjs`. ## Verification - Ran locally against the PR worktree: - `node --test .github/scripts/tests/release-runner-cache.test.mjs scripts/__tests__/release-verify-workflow.test.mjs .github/scripts/tests/ci-plan.test.mjs .github/scripts/tests/post-merge-runner-routing.test.mjs` — all passed. - Full PR CI runs on this PR. ## Risks - Low risk: all tests and verification gates remain required; only matrix shard counts and cache-warm job placement change. - Peak post-merge AWS fleet concurrency increases by 19 lanes on `paperclip-post-merge-x64` (isolated from PR CI); easily reverted by reverting this PR if fleet scaling shows unexpected queue wait. ## Model Used - Gemini (Antigravity) ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used (with version and capability details) - [x] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work - [x] I have searched GitHub for duplicate or related PRs and linked them above - [x] I have either (a) linked existing issues with `Fixes: #` / `Closes #` / `Refs #` OR (b) described the issue in-PR following the relevant issue template - [x] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip` URLs)
This commit is contained in:
1 parent
9c1fd24642
commit
7bd652e3ba
4 files changed
+173
-87
No files matched your search
@@ -550,7 +550,7 @@ test("release verify workflow covers the same split test surface as stable PR ve
|
||||
for (const group of ["general-server-without-chat-or-native-runner", "general-chat", "general-workspaces-a", "general-workspaces-b", "general-workspaces-c"]) {
|
||||
assert.match(verifyWorkflow, new RegExp(`group: ${group}`));
|
||||
}
|
||||
for (const [group, count] of [["general-server-without-chat-or-native-runner", 10], ["general-chat", 3]]) {
|
||||
for (const [group, count] of [["general-server-without-chat-or-native-runner", 20], ["general-chat", 3]]) {
|
||||
const rows = [...verifyWorkflow.matchAll(new RegExp(`group: ${group}\\n\\s+group_label: [^\\n]+\\n\\s+shard_index: (\\d+)\\n\\s+shard_count: (\\d+)`, "g"))];
|
||||
assert.deepEqual(rows.map((row) => [Number(row[1]), Number(row[2])]),
|
||||
Array.from({ length: count }, (_, index) => [index, count]));
|
||||
@@ -563,7 +563,7 @@ test("release verify workflow covers the same split test surface as stable PR ve
|
||||
];
|
||||
assert.deepEqual(
|
||||
serializedRows.map((row) => [Number(row[1]), Number(row[2]), row[3].trim()]),
|
||||
Array.from({ length: 9 }, (_, index) => [index, 9, `${index + 1}/9`]),
|
||||
Array.from({ length: 16 }, (_, index) => [index, 16, `${index + 1}/16`]),
|
||||
);
|
||||
|
||||
// workspaces-a splits with Vitest native --shard in pr.yml; release
|
||||
@@ -584,16 +584,24 @@ test("release verify workflow covers the same split test surface as stable PR ve
|
||||
test("release verification builds native test binaries in a required Rust-cached lane", () => {
|
||||
const workflow = readWorkflow("release-verify.yml");
|
||||
const runnerJob = workflow.match(/ verify_paperclip_runner:\n[\s\S]*?(?=\n [A-Za-z0-9_-]+:|$)/)?.[0] ?? "";
|
||||
assert.equal((runnerJob.match(/- lane: server-integration/g) ?? []).length, 1);
|
||||
const integrationRows = [
|
||||
...runnerJob.matchAll(
|
||||
/- lane: server-integration \((\d+)\/(\d+)\)\n\s+server_integration_shard_index: (\d+)\n\s+server_integration_shard_count: (\d+)/g,
|
||||
),
|
||||
];
|
||||
assert.deepEqual(
|
||||
integrationRows.map((row) => row.slice(1).map(Number)),
|
||||
Array.from({ length: 3 }, (_, index) => [index + 1, 3, index, 3]),
|
||||
);
|
||||
assert.doesNotMatch(runnerJob, /continue-on-error/);
|
||||
assert.match(runnerJob, /timeout-minutes: 20/);
|
||||
assert.match(runnerJob, /shared-key: release-runner-v2/);
|
||||
assert.match(runnerJob, /cache-workspace-crates: false/);
|
||||
assert.match(runnerJob, /cache-bin: false/);
|
||||
assert.match(runnerJob, /save-if: \$\{\{ matrix\.lane == 'rust'/);
|
||||
assert.match(runnerJob, /Build native server test binaries\n\s+if: \$\{\{ matrix\.lane == 'server-integration' \}\}\n\s+timeout-minutes: 10/);
|
||||
assert.match(runnerJob, /Build native server test binaries\n\s+if: \$\{\{ startsWith\(matrix\.lane, 'server-integration'\) \}\}\n\s+timeout-minutes: 10/);
|
||||
assert.match(runnerJob, /pnpm build:rust\n\s+cargo build --release --manifest-path runner\/Cargo\.toml --locked -p paperclip-runner-core --bin paperclip-runnerd --bin fake-codex-app-server/);
|
||||
assert.match(runnerJob, /Run native server integration suites\n\s+if: \$\{\{ matrix\.lane == 'server-integration' \}\}\n\s+run: pnpm test:run:general -- --group general-server-native-runner/);
|
||||
assert.match(runnerJob, /Run native server integration suites\n\s+if: \$\{\{ startsWith\(matrix\.lane, 'server-integration'\) \}\}\n\s+run: pnpm test:run:general -- --group general-server-native-runner --shard-index \$\{\{ matrix\.server_integration_shard_index \}\} --shard-count \$\{\{ matrix\.server_integration_shard_count \}\}/);
|
||||
assert.ok(runnerJob.indexOf("Cache Runner Rust dependencies") < runnerJob.indexOf("Build native server test binaries"));
|
||||
assert.ok(runnerJob.indexOf("Build native server test binaries") < runnerJob.indexOf("Run native server integration suites"));
|
||||
|
||||
|
||||
Reference in new issue
Block a user