Skip to content

chore: probe the version-only path of pr.yml (do not merge) - #273

Closed
leemour wants to merge 1 commit into
mainfrom
ci/probe-version-only
Closed

leemour wants to merge 1 commit into
mainfrom
ci/probe-version-only

Conversation

@leemour

@leemour leemour commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

Probe for #272: changes only CHANGELOG.md and the version, against a main proven green by #272. Expect changelog-only to run and the validation / ci / … checks reported as passed without running. Closed unmerged after the run.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@leemour

leemour commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

Probe done: changelog-only ran (20 s), validation was skipped and its three checks were reported as passed; the PR showed CLEAN (mergeable). Wall 86 s, most of it waiting for runners (standards started at +61 s), against 146 s for version PR #243. Closed unmerged.

@leemour leemour closed this Oct 25, 2026
leemour added a commit to WireCatLabs/whatsapp-cli that referenced this pull request Oct 26, 2026
…angelog and the version (#262)

## 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. The skip path is proven on zoom-cli
(WireCatLabs/zoom-cli#273, a probe).

## Why

`bin/release`'s version pull requests change only `CHANGELOG.md`, the
version in `package.json` (with the six engine packages in
`optionalDependencies`) and `src/version.ts`, and ran the full
validation anyway. #259 took 210 s, 152 s of it in `validation / ci /
check`.

## 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 the version set to `0.0.0` in
`package.json`, in the engine packages that carry the same version, and
in `src/version.ts` (`scripts/ci-fingerprint.sh`);
- when they match, asks `scripts/release-reuse.sh` whether main's own
pull request passed every required check on the same tree.
- On "yes", `changelog-only` runs `pnpm version:check` and `pnpm
docs:check`, then reports the required `validation / …` checks as passed
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).
- The engine packages count as the version only when they equal it; an
engine at any other version changes the fingerprint. `version:check`
also proves all six agree.
- `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

- `scripts/ci-fingerprint.test.ts`: 7 cases, including `src/version.ts`
and an engine package at another version. Passing locally.
- On real history:
- Of the last 10 version pull requests, 8 would have skipped. #239 also
re-encoded the `description` line, a real change, so its fingerprint
differs. #199 followed #198, which merged behind main.
- Feature PR #258's squash commit and its parent have different
fingerprints.
- Before: version PR #259 210 s wall; feature PR #258 149 s.
- After: this PR takes the full path. Its run time is in a comment
below. The skip path is proven by WireCatLabs/zoom-cli#273.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@leemour
leemour deleted the ci/probe-version-only 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