Skip to content

ci(changeset/check-coverage): require a changeset for runtime catalog bumps - #235

Merged
AStaroverov merged 1 commit into
v4-betafrom
fix/check-coverage-runtime-catalog-bumps
Nov 6, 2026
Merged

AStaroverov merged 1 commit into
v4-betafrom
fix/check-coverage-runtime-catalog-bumps

Conversation

@AStaroverov

Copy link
Copy Markdown
Contributor

What

check-coverage now decides which published packages a PR changes on its own, instead of asking pnpm --filter "[<since>]". A package counts as changed when:

  • direct edit — the PR changes a file inside the package directory. Changed files come from git diff against the merge base with the base branch; each file belongs to the deepest package directory containing it, and moving a file out of a package counts as an edit of it.
  • catalog bump — the PR changes a catalog entry in pnpm-workspace.yaml (default or named) that the package references via catalog: / catalog:<name> from dependencies or peerDependencies. The error names the reason: (catalog bump: <dep>).

Entries referenced only from devDependencies or optionalDependencies require nothing. Private packages, the empty-changeset opt-out and the skip-changelog label behave as before.

Why

Alternative to #234, which keeps the git-diff part but leaves all catalog bumps unflagged.

Behaviour changes to expect

  • Blocks whose published packages take dependencies from the catalog in dependencies (older layout, public model etc.) need a changeset for those packages on every SDK catalog bump — the clonotype-space#95 shape now fails by design.
  • In blocks with the current layout (model, ui, workflow, kind private) nothing new is flagged: the published block and software packages take catalog dependencies only as devDependencies.
  • The action now needs yq (mikefarah v4+). A missing yq, no merge base (shallow checkout) or an unreadable catalog exit 2 instead of passing silently.

Testing

  • bats test/coverage.bats: 26/26 pass. Catalog cases that asserted "never flagged" now assert the new rule; added cases for peerDependencies, a named catalog, an unused new entry, a non-catalog pnpm-workspace.yaml change, an edit that landed on the base after branching, and a file moved out of a package. Fixture gains pkg-peer and pkg-legacy.
  • samples-and-data#140 checked out and installed with pnpm 12.16.1: this script exits 0; the current v4 script exits 1 with the same parse-seurat / parse-h5ad gap as CI.

… bumps

A package now counts as changed when the branch edits a file inside it, or
when the branch changes a catalog entry that the package references via
`catalog:` / `catalog:<name>` from `dependencies` or `peerDependencies`.
Catalog entries referenced only from `devDependencies` or
`optionalDependencies` require nothing.

Changed files come from `git diff` against the merge base with the base
branch, not from `pnpm --filter "[<since>]"`. pnpm 11.28 / 12.7 made that
filter mark every catalog consumer as changed, devDependencies included,
which failed samples-and-data#140 on parse-h5ad and parse-seurat: both only
take block-tools from the catalog as a devDependency.

Restores the runtime catalog rule that de2b0ee dropped. Missing yq, a
missing merge base or an unreadable catalog now exit 2 instead of passing.
@greptile-apps

greptile-apps Bot commented Nov 6, 2026

Copy link
Copy Markdown

Automatic reviews are disabled for this repository. Configure in Code Review Settings.

@AStaroverov
AStaroverov merged commit da2cc00 into v4-beta Nov 6, 2026
1 check passed
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