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
@@ -241,8 +241,9 @@ test("PR workflow keeps Build fast and passes PR-mode context to typecheck and V
|
||||
assert.equal(prRunnerDistKey, releaseRunnerDistKey, "runner-dist-v1 reader and writer keys must match exactly");
|
||||
assert.doesNotMatch(typecheck.split("Restore prebuilt Runner dist")[1].split("Restore incremental typecheck")[0], /restore-keys:/);
|
||||
|
||||
const releaseTypecheck = releaseVerify.split("\n typecheck:\n")[1].split("\n general_tests:\n")[0];
|
||||
const prIncPrefix = typecheck.match(/key: (typecheck-incremental-v1-.+)-\$\{\{ github\.event\.pull_request\.base\.sha \}\}/)?.[1];
|
||||
const releaseIncPrefix = releaseBuild.match(/key: (typecheck-incremental-v1-.+)-\$\{\{ github\.sha \}\}/)?.[1];
|
||||
const releaseIncPrefix = releaseTypecheck.match(/key: (typecheck-incremental-v1-.+)-\$\{\{ github\.sha \}\}/)?.[1];
|
||||
assert.ok(prIncPrefix && releaseIncPrefix, "both pr-trusted.yml and release-verify.yml must define typecheck-incremental-v1 prefix");
|
||||
assert.equal(prIncPrefix, releaseIncPrefix, "typecheck-incremental-v1 reader and writer prefixes must match exactly");
|
||||
assert.doesNotMatch(workflow, /actions\/cache\/save@/, "pr-trusted.yml must never save caches");
|
||||
|
||||
@@ -38,9 +38,9 @@ test("parallel lanes cover check:all exactly once and never bypass verification"
|
||||
const scripts = JSON.parse(readFileSync(new URL("../../../packages/paperclip-runner/package.json", import.meta.url))).scripts;
|
||||
const matrixBlock = runner.split(" matrix:\n include:\n")[1].split("\n steps:")[0];
|
||||
const matrixEntries = matrixBlock.split(/^ - /m).slice(1).map((entry) => {
|
||||
const row = { lane: "", checks: "", vitest_lane: "" };
|
||||
const row = { lane: "", checks: "", vitest_lane: "", server_integration_shard_index: "", server_integration_shard_count: "" };
|
||||
for (const line of entry.trim().split("\n")) {
|
||||
const match = /^\s*(lane|checks|vitest_lane):\s*(.+?)\s*$/.exec(line);
|
||||
const match = /^\s*(lane|checks|vitest_lane|server_integration_shard_index|server_integration_shard_count):\s*(.+?)\s*$/.exec(line);
|
||||
assert.ok(match, `unexpected matrix field line: ${line}`);
|
||||
row[match[1]] = match[2];
|
||||
}
|
||||
@@ -48,8 +48,15 @@ test("parallel lanes cover check:all exactly once and never bypass verification"
|
||||
});
|
||||
const checks = matrixEntries.filter((row) => row.checks).flatMap((row) => row.checks.split(" "));
|
||||
assert.deepEqual(checks, scripts["check:all-without-vitest"].split(" && ").map((command) => command.replace(/^pnpm run /, "")));
|
||||
assert.deepEqual(matrixEntries.map((row) => row.lane), ["protocol-static", "protocol (1/4)", "protocol (2/4)", "protocol (3/4)", "protocol (4/4)", "rust", "api-authority", "server-integration"]);
|
||||
assert.deepEqual(matrixEntries.map((row) => row.lane), [
|
||||
"protocol-static", "protocol (1/4)", "protocol (2/4)", "protocol (3/4)", "protocol (4/4)",
|
||||
"rust", "api-authority", "server-integration (1/3)", "server-integration (2/3)", "server-integration (3/3)",
|
||||
]);
|
||||
assert.deepEqual(matrixEntries.filter((row) => row.vitest_lane).map((row) => row.vitest_lane), ["1/4", "2/4", "3/4", "4/4"]);
|
||||
assert.deepEqual(
|
||||
matrixEntries.filter((row) => row.lane.startsWith("server-integration")).map((row) => [row.server_integration_shard_index, row.server_integration_shard_count]),
|
||||
[["0", "3"], ["1", "3"], ["2", "3"]],
|
||||
);
|
||||
assert.match(runner, /fail-fast: false/);
|
||||
assert.doesNotMatch(runner, /max-parallel: 1|^ needs:|continue-on-error:/m);
|
||||
const verify = runner.split(" - name: Verify Paperclip Runner\n")[1].split(" - name:")[0];
|
||||
@@ -57,7 +64,7 @@ test("parallel lanes cover check:all exactly once and never bypass verification"
|
||||
assert.match(verify, /set -euo pipefail/);
|
||||
assert.match(verify, /for check in \$RUNNER_CHECKS; do\s+pnpm --filter @paperclipai\/paperclip-runner "\$check"\s+done/);
|
||||
const verifyIf = verify.match(/^\s*if: \$\{\{ (.+) \}\}$/m)?.[1];
|
||||
assert.equal(verifyIf, "matrix.lane != 'server-integration' && matrix.vitest_lane == ''");
|
||||
assert.equal(verifyIf, "!startsWith(matrix.lane, 'server-integration') && matrix.vitest_lane == ''");
|
||||
const vitestStep = runner.split(" - name: Run Paperclip Runner package Vitest lane\n")[1].split(" - name:")[0];
|
||||
assert.match(vitestStep, /RUNNER_VITEST_LANE: \$\{\{ matrix.vitest_lane \}\}/);
|
||||
assert.match(vitestStep, /pnpm --filter @paperclipai\/paperclip-runner test:typescript:vitest "--package-lane=\$RUNNER_VITEST_LANE"/);
|
||||
@@ -65,10 +72,11 @@ test("parallel lanes cover check:all exactly once and never bypass verification"
|
||||
assert.equal(vitestIf, "matrix.vitest_lane != ''");
|
||||
const serverStep = runner.split(" - name: Run native server integration suites\n")[1].split(" - name:")[0];
|
||||
const serverIf = serverStep.match(/^\s*if: \$\{\{ (.+) \}\}$/m)?.[1];
|
||||
const startsWith = (value, prefix) => String(value).startsWith(prefix);
|
||||
for (const matrix of matrixEntries) {
|
||||
const runsVerify = runInNewContext(verifyIf, { matrix });
|
||||
const runsVitest = runInNewContext(vitestIf, { matrix });
|
||||
const runsServer = runInNewContext(serverIf, { matrix });
|
||||
const runsVerify = runInNewContext(verifyIf, { matrix, startsWith });
|
||||
const runsVitest = runInNewContext(vitestIf, { matrix, startsWith });
|
||||
const runsServer = runInNewContext(serverIf, { matrix, startsWith });
|
||||
assert.equal([runsVerify, runsVitest, runsServer].filter(Boolean).length, 1, `lane ${matrix.lane} must match exactly one verification step`);
|
||||
assert.equal(Boolean(matrix.checks), runsVerify, `lane ${matrix.lane} checks field must match Verify Paperclip Runner condition`);
|
||||
assert.equal(Boolean(matrix.vitest_lane), runsVitest, `lane ${matrix.lane} vitest_lane field must match Vitest lane condition`);
|
||||
@@ -86,7 +94,7 @@ test("only the trusted Rust lane writes, and warms both build profiles before sa
|
||||
assert.match(warm, /run: pnpm --filter @paperclipai\/paperclip-runner build:rust/);
|
||||
const sha = "a".repeat(40);
|
||||
const base = { repository: "paperclipai/paperclip", event_name: "push", ref: "refs/heads/master", sha };
|
||||
for (const lane of ["protocol-static", "protocol (1/4)", "protocol (2/4)", "protocol (3/4)", "protocol (4/4)", "rust", "api-authority", "server-integration"]) {
|
||||
for (const lane of ["protocol-static", "protocol (1/4)", "protocol (2/4)", "protocol (3/4)", "protocol (4/4)", "rust", "api-authority", "server-integration (1/3)", "server-integration (2/3)", "server-integration (3/3)"]) {
|
||||
for (const [overrides, ref, trusted] of [
|
||||
[{}, sha, true],
|
||||
[{ event_name: "pull_request", ref: "refs/pull/1/merge" }, sha, false],
|
||||
|
||||
@@ -124,6 +124,35 @@ jobs:
|
||||
- name: Typecheck
|
||||
run: pnpm -r typecheck
|
||||
|
||||
- name: Check for incremental typecheck cache
|
||||
id: typecheck_incremental
|
||||
if: ${{ github.repository == 'paperclipai/paperclip' && github.event_name == 'push' && github.ref == 'refs/heads/master' && inputs.ref == github.sha }}
|
||||
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
lookup-only: true
|
||||
path: |
|
||||
server/node_modules/.cache/paperclip-typecheck
|
||||
ui/node_modules/.cache/paperclip-ui.tsbuildinfo
|
||||
key: typecheck-incremental-v1-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('pnpm-lock.yaml', 'tsconfig.base.json', 'server/tsconfig.json', 'server/src/__tests__/tsconfig.json', 'server/scripts/typecheck-layers.mjs', 'ui/tsconfig.json') }}-${{ github.sha }}
|
||||
|
||||
- name: Warm incremental typecheck cache
|
||||
if: ${{ github.repository == 'paperclipai/paperclip' && github.event_name == 'push' && github.ref == 'refs/heads/master' && inputs.ref == github.sha && steps.typecheck_incremental.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
if [ ! -d server/node_modules/.cache/paperclip-typecheck ]; then
|
||||
node server/scripts/typecheck-layers.mjs --checkers 4
|
||||
fi
|
||||
node scripts/storybook-catalog.mjs
|
||||
node scripts/run-tsc.mjs -p ui/tsconfig.json --incremental --tsBuildInfoFile ui/node_modules/.cache/paperclip-ui.tsbuildinfo
|
||||
|
||||
- name: Save incremental typecheck cache for PR typecheck
|
||||
if: ${{ github.repository == 'paperclipai/paperclip' && github.event_name == 'push' && github.ref == 'refs/heads/master' && inputs.ref == github.sha && steps.typecheck_incremental.outputs.cache-hit != 'true' }}
|
||||
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
path: |
|
||||
server/node_modules/.cache/paperclip-typecheck
|
||||
ui/node_modules/.cache/paperclip-ui.tsbuildinfo
|
||||
key: typecheck-incremental-v1-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('pnpm-lock.yaml', 'tsconfig.base.json', 'server/tsconfig.json', 'server/src/__tests__/tsconfig.json', 'server/scripts/typecheck-layers.mjs', 'ui/tsconfig.json') }}-${{ github.sha }}
|
||||
|
||||
general_tests:
|
||||
if: ${{ !inputs.runner_binaries_only }}
|
||||
name: General tests (${{ matrix.group_label }})
|
||||
@@ -136,49 +165,89 @@ jobs:
|
||||
matrix:
|
||||
include:
|
||||
# Split the long chat file by collected test locations, and balance
|
||||
# the remaining server files across ten runners. Rust-backed server
|
||||
# the remaining server files across twenty runners. Rust-backed server
|
||||
# suites run in the cached Runner lane below. Local invocations retain
|
||||
# their complete general-server group.
|
||||
- group: general-server-without-chat-or-native-runner
|
||||
group_label: server (1/10)
|
||||
group_label: server (1/20)
|
||||
shard_index: 0
|
||||
shard_count: 10
|
||||
shard_count: 20
|
||||
- group: general-server-without-chat-or-native-runner
|
||||
group_label: server (2/10)
|
||||
group_label: server (2/20)
|
||||
shard_index: 1
|
||||
shard_count: 10
|
||||
shard_count: 20
|
||||
- group: general-server-without-chat-or-native-runner
|
||||
group_label: server (3/10)
|
||||
group_label: server (3/20)
|
||||
shard_index: 2
|
||||
shard_count: 10
|
||||
shard_count: 20
|
||||
- group: general-server-without-chat-or-native-runner
|
||||
group_label: server (4/10)
|
||||
group_label: server (4/20)
|
||||
shard_index: 3
|
||||
shard_count: 10
|
||||
shard_count: 20
|
||||
- group: general-server-without-chat-or-native-runner
|
||||
group_label: server (5/10)
|
||||
group_label: server (5/20)
|
||||
shard_index: 4
|
||||
shard_count: 10
|
||||
shard_count: 20
|
||||
- group: general-server-without-chat-or-native-runner
|
||||
group_label: server (6/10)
|
||||
group_label: server (6/20)
|
||||
shard_index: 5
|
||||
shard_count: 10
|
||||
shard_count: 20
|
||||
- group: general-server-without-chat-or-native-runner
|
||||
group_label: server (7/10)
|
||||
group_label: server (7/20)
|
||||
shard_index: 6
|
||||
shard_count: 10
|
||||
shard_count: 20
|
||||
- group: general-server-without-chat-or-native-runner
|
||||
group_label: server (8/10)
|
||||
group_label: server (8/20)
|
||||
shard_index: 7
|
||||
shard_count: 10
|
||||
shard_count: 20
|
||||
- group: general-server-without-chat-or-native-runner
|
||||
group_label: server (9/10)
|
||||
group_label: server (9/20)
|
||||
shard_index: 8
|
||||
shard_count: 10
|
||||
shard_count: 20
|
||||
- group: general-server-without-chat-or-native-runner
|
||||
group_label: server (10/10)
|
||||
group_label: server (10/20)
|
||||
shard_index: 9
|
||||
shard_count: 10
|
||||
shard_count: 20
|
||||
- group: general-server-without-chat-or-native-runner
|
||||
group_label: server (11/20)
|
||||
shard_index: 10
|
||||
shard_count: 20
|
||||
- group: general-server-without-chat-or-native-runner
|
||||
group_label: server (12/20)
|
||||
shard_index: 11
|
||||
shard_count: 20
|
||||
- group: general-server-without-chat-or-native-runner
|
||||
group_label: server (13/20)
|
||||
shard_index: 12
|
||||
shard_count: 20
|
||||
- group: general-server-without-chat-or-native-runner
|
||||
group_label: server (14/20)
|
||||
shard_index: 13
|
||||
shard_count: 20
|
||||
- group: general-server-without-chat-or-native-runner
|
||||
group_label: server (15/20)
|
||||
shard_index: 14
|
||||
shard_count: 20
|
||||
- group: general-server-without-chat-or-native-runner
|
||||
group_label: server (16/20)
|
||||
shard_index: 15
|
||||
shard_count: 20
|
||||
- group: general-server-without-chat-or-native-runner
|
||||
group_label: server (17/20)
|
||||
shard_index: 16
|
||||
shard_count: 20
|
||||
- group: general-server-without-chat-or-native-runner
|
||||
group_label: server (18/20)
|
||||
shard_index: 17
|
||||
shard_count: 20
|
||||
- group: general-server-without-chat-or-native-runner
|
||||
group_label: server (19/20)
|
||||
shard_index: 18
|
||||
shard_count: 20
|
||||
- group: general-server-without-chat-or-native-runner
|
||||
group_label: server (20/20)
|
||||
shard_index: 19
|
||||
shard_count: 20
|
||||
- group: general-chat
|
||||
group_label: chat (1/3)
|
||||
shard_index: 0
|
||||
@@ -248,32 +317,53 @@ jobs:
|
||||
matrix:
|
||||
include:
|
||||
- shard_index: 0
|
||||
shard_count: 9
|
||||
shard_label: 1/9
|
||||
shard_count: 16
|
||||
shard_label: 1/16
|
||||
- shard_index: 1
|
||||
shard_count: 9
|
||||
shard_label: 2/9
|
||||
shard_count: 16
|
||||
shard_label: 2/16
|
||||
- shard_index: 2
|
||||
shard_count: 9
|
||||
shard_label: 3/9
|
||||
shard_count: 16
|
||||
shard_label: 3/16
|
||||
- shard_index: 3
|
||||
shard_count: 9
|
||||
shard_label: 4/9
|
||||
shard_count: 16
|
||||
shard_label: 4/16
|
||||
- shard_index: 4
|
||||
shard_count: 9
|
||||
shard_label: 5/9
|
||||
shard_count: 16
|
||||
shard_label: 5/16
|
||||
- shard_index: 5
|
||||
shard_count: 9
|
||||
shard_label: 6/9
|
||||
shard_count: 16
|
||||
shard_label: 6/16
|
||||
- shard_index: 6
|
||||
shard_count: 9
|
||||
shard_label: 7/9
|
||||
shard_count: 16
|
||||
shard_label: 7/16
|
||||
- shard_index: 7
|
||||
shard_count: 9
|
||||
shard_label: 8/9
|
||||
shard_count: 16
|
||||
shard_label: 8/16
|
||||
- shard_index: 8
|
||||
shard_count: 9
|
||||
shard_label: 9/9
|
||||
shard_count: 16
|
||||
shard_label: 9/16
|
||||
- shard_index: 9
|
||||
shard_count: 16
|
||||
shard_label: 10/16
|
||||
- shard_index: 10
|
||||
shard_count: 16
|
||||
shard_label: 11/16
|
||||
- shard_index: 11
|
||||
shard_count: 16
|
||||
shard_label: 12/16
|
||||
- shard_index: 12
|
||||
shard_count: 16
|
||||
shard_label: 13/16
|
||||
- shard_index: 13
|
||||
shard_count: 16
|
||||
shard_label: 14/16
|
||||
- shard_index: 14
|
||||
shard_count: 16
|
||||
shard_label: 15/16
|
||||
- shard_index: 15
|
||||
shard_count: 16
|
||||
shard_label: 16/16
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
@@ -355,7 +445,15 @@ jobs:
|
||||
checks: check:runner
|
||||
- lane: api-authority
|
||||
checks: check:api-authority
|
||||
- lane: server-integration
|
||||
- lane: server-integration (1/3)
|
||||
server_integration_shard_index: 0
|
||||
server_integration_shard_count: 3
|
||||
- lane: server-integration (2/3)
|
||||
server_integration_shard_index: 1
|
||||
server_integration_shard_count: 3
|
||||
- lane: server-integration (3/3)
|
||||
server_integration_shard_index: 2
|
||||
server_integration_shard_count: 3
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
@@ -440,7 +538,7 @@ jobs:
|
||||
run: pnpm install --no-frozen-lockfile
|
||||
|
||||
- name: Build native server test binaries
|
||||
if: ${{ matrix.lane == 'server-integration' }}
|
||||
if: ${{ startsWith(matrix.lane, 'server-integration') }}
|
||||
timeout-minutes: 10
|
||||
working-directory: packages/paperclip-runner
|
||||
run: |
|
||||
@@ -449,11 +547,11 @@ jobs:
|
||||
cargo build --release --manifest-path runner/Cargo.toml --locked -p paperclip-runner-core --bin paperclip-runnerd --bin fake-codex-app-server
|
||||
|
||||
- name: Run native server integration suites
|
||||
if: ${{ matrix.lane == 'server-integration' }}
|
||||
run: pnpm test:run:general -- --group general-server-native-runner
|
||||
if: ${{ startsWith(matrix.lane, 'server-integration') }}
|
||||
run: pnpm test:run:general -- --group general-server-native-runner --shard-index ${{ matrix.server_integration_shard_index }} --shard-count ${{ matrix.server_integration_shard_count }}
|
||||
|
||||
- name: Verify Paperclip Runner
|
||||
if: ${{ matrix.lane != 'server-integration' && matrix.vitest_lane == '' }}
|
||||
if: ${{ !startsWith(matrix.lane, 'server-integration') && matrix.vitest_lane == '' }}
|
||||
env:
|
||||
RUNNER_CHECKS: ${{ matrix.checks }}
|
||||
run: |
|
||||
@@ -639,35 +737,6 @@ jobs:
|
||||
packages/paperclip-eval-kernel/dist
|
||||
key: runner-dist-v1-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('package.json', 'pnpm-lock.yaml', 'pnpm-workspace.yaml', 'tsconfig.base.json', 'patches/**', 'packages/shared/src/**', 'packages/adapter-utils/src/**', 'packages/plugins/sdk/src/**', 'packages/paperclip-runner/package.json', 'packages/paperclip-runner/tsconfig*.json', 'packages/paperclip-runner/rust-toolchain.toml', 'packages/paperclip-runner/acpx-profiles.json', 'packages/paperclip-runner/antigravity-distributions.json', 'packages/paperclip-runner/cursor-*.json', 'packages/paperclip-runner/src/**', 'packages/paperclip-runner/scripts/**', 'packages/paperclip-runner/protocol/**', 'packages/paperclip-runner/spec/**', 'packages/paperclip-runner/runner/Cargo.toml', 'packages/paperclip-runner/runner/Cargo.lock', 'packages/paperclip-runner/runner/crates/**', 'packages/paperclip-runner/test-fixtures/**', 'packages/paperclip-runner/test/fixtures/**', 'packages/paperclip-eval-kernel/package.json', 'packages/paperclip-eval-kernel/tsconfig*.json', 'packages/paperclip-eval-kernel/src/**') }}
|
||||
|
||||
# Incremental TS 7 .tsbuildinfo + server dts cache for PR typecheck
|
||||
# (read-only prefix restore in pr-trusted.yml). Only canonical master pushes write.
|
||||
- name: Check for incremental typecheck cache
|
||||
id: typecheck_incremental
|
||||
if: ${{ github.repository == 'paperclipai/paperclip' && github.event_name == 'push' && github.ref == 'refs/heads/master' && inputs.ref == github.sha }}
|
||||
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
lookup-only: true
|
||||
path: |
|
||||
server/node_modules/.cache/paperclip-typecheck
|
||||
ui/node_modules/.cache/paperclip-ui.tsbuildinfo
|
||||
key: typecheck-incremental-v1-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('pnpm-lock.yaml', 'tsconfig.base.json', 'server/tsconfig.json', 'server/src/__tests__/tsconfig.json', 'server/scripts/typecheck-layers.mjs', 'ui/tsconfig.json') }}-${{ github.sha }}
|
||||
|
||||
- name: Warm incremental typecheck cache
|
||||
if: ${{ github.repository == 'paperclipai/paperclip' && github.event_name == 'push' && github.ref == 'refs/heads/master' && inputs.ref == github.sha && steps.typecheck_incremental.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
node server/scripts/typecheck-layers.mjs --checkers 4
|
||||
node scripts/storybook-catalog.mjs
|
||||
node scripts/run-tsc.mjs -p ui/tsconfig.json --incremental --tsBuildInfoFile ui/node_modules/.cache/paperclip-ui.tsbuildinfo
|
||||
|
||||
- name: Save incremental typecheck cache for PR typecheck
|
||||
if: ${{ github.repository == 'paperclipai/paperclip' && github.event_name == 'push' && github.ref == 'refs/heads/master' && inputs.ref == github.sha && steps.typecheck_incremental.outputs.cache-hit != 'true' }}
|
||||
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
path: |
|
||||
server/node_modules/.cache/paperclip-typecheck
|
||||
ui/node_modules/.cache/paperclip-ui.tsbuildinfo
|
||||
key: typecheck-incremental-v1-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('pnpm-lock.yaml', 'tsconfig.base.json', 'server/tsconfig.json', 'server/src/__tests__/tsconfig.json', 'server/scripts/typecheck-layers.mjs', 'ui/tsconfig.json') }}-${{ github.sha }}
|
||||
|
||||
runner_binary_targets:
|
||||
if: inputs.runner_binaries_only
|
||||
name: Read exact-source daemon targets
|
||||
|
||||
@@ -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