mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-26 01:39:51 +01:00
ci: shard Verify Paperclip Runner protocol tests in release-verify (#22941)
## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work > - Release and post-merge source verification runs `.github/workflows/release-verify.yml` on every admitted master commit > - `Verify Paperclip Runner (protocol)` currently runs `check:protocol` unsharded on a single runner, taking ~375s across 408 Vitest files (~8m 43s total job time) and making it the critical-path bottleneck for post-merge verification > - Pull-request CI in `pr-trusted.yml` already partitions those exact package Vitest files into duration-balanced lanes via `test:typescript:vitest --package-lane=K/N` and runs the non-Vitest protocol checks via `check:protocol-without-vitest` > - This pull request applies that same sharding pattern to `release-verify.yml` by splitting `protocol` into `protocol-static` plus four parallel `protocol (1/4)`–`protocol (4/4)` Vitest lanes > - The benefit is cutting `Verify Paperclip Runner (protocol)` wall-clock time from ~8m 43s to ~2.5–3m while keeping 100% of check coverage and cache trust boundaries unchanged ## Linked Issues or Issue Description **What existing behavior does this improve?** Post-merge and release verification in `.github/workflows/release-verify.yml` (`Verify Paperclip Runner (protocol)`). **Subsystem affected** Cross-cutting (multiple of the above) **Current behavior** `verify_paperclip_runner` runs `check:eval-kernel` and `check:protocol` in one `protocol` matrix lane. `check:protocol` executes all 408 `@paperclipai/paperclip-runner` Vitest files on a single runner (~375s of Vitest runtime, ~8m 43s total job duration). **Proposed behavior** `verify_paperclip_runner` runs `check:eval-kernel` and `check:protocol-without-vitest` in `protocol-static`, and runs the complete `@paperclipai/paperclip-runner` Vitest inventory across four parallel duration-balanced lanes (`protocol (1/4)` through `protocol (4/4)`) using `test:typescript:vitest --package-lane=K/4`. **Reason and benefit** `Verify Paperclip Runner (protocol)` is the slowest blocking job in post-merge source verification (`cloud-readiness.yml`). Partitioning the 408 Vitest files across four parallel lanes removes ~5–6 minutes from the verification critical path without dropping any checks or changing cache-writer boundaries. **Breaking changes** None. Every check in `check:all` still runs exactly once, and the `rust` lane remains the sole Rust cache writer. ## What Changed - Split the `protocol` lane in `.github/workflows/release-verify.yml` (`verify_paperclip_runner`) into `protocol-static` (`check:eval-kernel check:protocol-without-vitest`) and four parallel Vitest lanes `protocol (1/4)`–`protocol (4/4)` invoking `pnpm --filter @paperclipai/paperclip-runner test:typescript:vitest "--package-lane=$RUNNER_VITEST_LANE"`. - Guarded `Verify Paperclip Runner` with `matrix.lane != 'server-integration' && matrix.vitest_lane == ''` and the new `Run Paperclip Runner package Vitest lane` step with `matrix.vitest_lane != ''` so each matrix entry runs exactly one verification step. - Updated `.github/scripts/tests/release-runner-cache.test.mjs` to assert that the check lanes cover `check:all-without-vitest` exactly once, the four Vitest lanes form a complete `1/4`–`4/4` cover, every matrix lane matches exactly one execution step, and `rust` remains the sole cache writer. ## Verification - `node --test .github/scripts/tests/release-runner-cache.test.mjs .github/scripts/tests/cloud-readiness.test.mjs .github/scripts/tests/post-merge-runner-routing.test.mjs .github/scripts/tests/ci-plan.test.mjs` — 362/362 passed. ## Risks - Low risk: reuses the existing `packages/paperclip-runner/scripts/run-pr-vitest-lane.mjs` (`--package-lane=K/N`) and `check:protocol-without-vitest` scripts already exercised on every PR in `pr-trusted.yml`. All four lanes compute the identical deterministic partition from Vitest's live file list (`vitest list --filesOnly --json`), so no test file can be dropped. ## Model Used - Google Gemini (Antigravity agent, high reasoning, with tool use and code execution). ## 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) - [x] My branch name describes the change (e.g. `docs/...`, `fix/...`) and contains no internal Paperclip ticket id or instance-derived details - [x] I have run tests locally and they pass - [x] I have added or updated tests where applicable - [x] I have updated relevant documentation to reflect my changes - [x] I have considered and documented any risks above - [ ] All Paperclip CI gates are green - [x] Greptile is 5/5 with no open P2s, recommendations, or follow-ups - [x] I will address all Greptile and reviewer comments before requesting merge --------- Co-authored-by: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
c5107f12fe
commit
14f5907776
3 files changed
+54
-11
No files matched your search
@@ -329,8 +329,16 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- lane: protocol
|
||||
checks: check:eval-kernel check:protocol
|
||||
- lane: protocol-static
|
||||
checks: check:eval-kernel check:protocol-without-vitest
|
||||
- lane: protocol (1/4)
|
||||
vitest_lane: 1/4
|
||||
- lane: protocol (2/4)
|
||||
vitest_lane: 2/4
|
||||
- lane: protocol (3/4)
|
||||
vitest_lane: 3/4
|
||||
- lane: protocol (4/4)
|
||||
vitest_lane: 4/4
|
||||
- lane: rust
|
||||
checks: check:runner check:api-authority
|
||||
- lane: server-integration
|
||||
@@ -431,7 +439,7 @@ jobs:
|
||||
run: pnpm test:run:general -- --group general-server-native-runner
|
||||
|
||||
- name: Verify Paperclip Runner
|
||||
if: ${{ matrix.lane != 'server-integration' }}
|
||||
if: ${{ matrix.lane != 'server-integration' && matrix.vitest_lane == '' }}
|
||||
env:
|
||||
RUNNER_CHECKS: ${{ matrix.checks }}
|
||||
run: |
|
||||
@@ -440,6 +448,13 @@ jobs:
|
||||
pnpm --filter @paperclipai/paperclip-runner "$check"
|
||||
done
|
||||
|
||||
- name: Run Paperclip Runner package Vitest lane
|
||||
if: ${{ matrix.vitest_lane != '' }}
|
||||
env:
|
||||
RUNNER_VITEST_LANE: ${{ matrix.vitest_lane }}
|
||||
# Do not insert `--`: pnpm forwards it literally to run-pr-vitest-lane.mjs.
|
||||
run: pnpm --filter @paperclipai/paperclip-runner test:typescript:vitest "--package-lane=$RUNNER_VITEST_LANE"
|
||||
|
||||
- name: Compute the Runner debug crate cache key
|
||||
id: runner_debug_crate_key
|
||||
if: ${{ matrix.lane == 'rust' && github.repository == 'paperclipai/paperclip' && github.event_name == 'push' && github.ref == 'refs/heads/master' && inputs.ref == github.sha }}
|
||||
|
||||
Reference in new issue
Block a user