Skip to content

ci: skip the full validation on pull requests that change only the changelog and the version - #272

Merged
leemour merged 1 commit into
mainfrom
ci/speedups
Oct 25, 2026
Merged

leemour merged 1 commit into
mainfrom
ci/speedups

Conversation

@leemour

@leemour leemour commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

Task

PERF-5 from the CI speed-up handoff: skip the heavy jobs on a pull request that changes only the version. The same change as WireCatLabs/tg-cli#733, ported from cli-core's WireCatLabs/cli-core#2022.

Why

bin/release's version pull requests change only CHANGELOG.md, the "version" in package.json and src/version.ts, and ran the full validation anyway. #243 took 146 s, 93 s of it in test:coverage; #240 took 439 s with the installed-platform matrix. zoom-cli has several of these a day.

What

  • pr.yml gets a version-only job first. It runs scripts/ci-unchanged.sh, which:
    • fingerprints the tree of this pull request and of main, with CHANGELOG.md left out and both versions set to 0.0.0 (scripts/ci-fingerprint.sh);
    • when they match, asks scripts/release-reuse.sh whether main's own pull request passed standards and the three validation / ci / … checks on the same tree. main's ruleset requires only standards, so the validation checks are passed as EXTRA_CONTEXTS.
  • On "yes", changelog-only runs pnpm version:check and pnpm docs:check, then reports the three validation / ci / … checks as passed (so the next version pull request finds them) with a summary of the evidence (scripts/ci-pass-checks.sh). On "no", or when the decision fails, the full validation runs as before. main.yml still runs the full validation after the merge.
  • Differences from cli-core:
    • src/version.ts is in the fingerprint (exactly one VERSION line, or the script fails and the full validation runs).
    • version:check runs on the skip path, because the fingerprint hides a mismatch between the two versions.
  • No ruleset change. release.yml has no tree reuse, so a release is unaffected.

Testing

🤖 Generated with Claude Code

…angelog and the version

bin/release's version pull requests change only CHANGELOG.md, package.json's "version" and
src/version.ts, and ran the full validation anyway: #243 took 146 s, of it 93 s in
test:coverage, and #240 439 s with the installed-platform matrix.

pr.yml now fingerprints the pull request's tree with the changelog left out and both versions
set to 0.0.0 (scripts/ci-fingerprint.sh). When that matches main, and main's own pull request
passed standards and the three validation checks on the same tree (scripts/release-reuse.sh
with EXTRA_CONTEXTS, because main's ruleset requires only standards), it runs version:check and
docs:check and reports the validation checks as passed, saying why (scripts/ci-pass-checks.sh).
Any doubt runs the full validation. main.yml still runs it after the merge.

The same change as tg-cli#733, ported from WireCatLabs/cli-core#2022.

Before: version PR #243 146 s wall (#240 439 s), feature PR #269 161 s.
Expected after: a version PR about 35 s (standards is the slowest check left); 9 of the last
10 version PRs would have skipped. Other pull requests wait about 10 s more for the decision
job.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@leemour
leemour merged commit 9e264fc into main Oct 25, 2026
9 checks passed
@leemour
leemour deleted the ci/speedups branch October 27, 2026 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant