ci(changeset/check-coverage): drop catalog-bump requirement (overflagged vs pnpm changeset)#183
Merged
Merged
Conversation
…ged vs pnpm changeset) The check required a changeset for any package consuming a bumped catalog dependency via `dependencies`/`peerDependencies`. That over-reports relative to `pnpm changeset`: a catalog entry always pins an *external* package (workspace packages use `workspace:*`, never `catalog:`), and changeset never adds a package to its release plan because an external dependency's version changed — it propagates bumps through the internal dependency chain automatically at `changeset version` time. Regression: platforma-open/clonotype-space#95. A `@platforma-sdk/workflow-tengo` catalog bump (5.25.0 → 6.3.2) failed CI on the untouched `.workflow` package, even though the PR's changeset (model/ui/block) was complete per `pnpm changeset`. Remove section 2b (catalog-bump → require consumer) and its workspace-map / yq parsing; keep direct-edit detection. The action no longer needs `yq`. Tests: replace the catalog-bump cases (which asserted exit 1) with parity cases asserting exit 0, including a regression mirroring the clonotype-space shape (runtime `catalog:` dep bumps, consumer files untouched → passes). Drop the now-moot named-catalog "known limitation" skip.
Cut the duplicated dependency-bump rationale at the direct-edit loop, lead the header rule with a positive, and split the two-fact sentence for clarity. Comment-only; no behavior change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
check-coverageno longer requires a changeset for packages that merely consume a bumpedcatalog:dependency. That rule (section 2b) over-reported relative topnpm changesetand failed PRs that were actually complete.Why it was wrong
A
catalog:entry always pins an external package — workspace packages are referenced viaworkspace:*, nevercatalog:.pnpm changesetnever adds a package to its release plan because an external dependency's version changed, and it propagates bumps through the internal dependency chain automatically atchangeset versiontime. So flagging catalog consumers was strictly stricter than changeset in every case.Verified empirically (changesets 2.31.0): in the test fixture, a pure catalog bump makes
changeset versionreport "No unreleased changesets found, exiting" and bump nothing.Regression it fixes
platforma-open/clonotype-space#95: the
.workflowpackage listed@platforma-sdk/workflow-tengounderdependenciesascatalog:. The catalog bumped it5.25.0 → 6.3.2while the package's own files stayed untouched. The PR's changeset (model/ui/block) was complete perpnpm changeset, yet the check failed CI on.workflow.Changes
check-coverage.sh— remove section 2b (catalog parsing, workspace map,yq). Keep direct-edit detection. Rewrite the header rationale.action.yaml— rewrite the description; dropyqfrom runtime requirements (the script no longer uses it).test/coverage.bats— replace the catalog cases that asserted exit 1 with parity cases asserting exit 0, including a regression that mirrors the clonotype-space shape (runtimecatalog:dep bumps, consumer files untouched → passes). Drop the now-moot named-catalog skip.Net −117 lines.
Verification
Test-driven: baseline green (17/1 skip) → 4 new parity tests RED against the old script → all 15 GREEN after removing 2b.
bash -nclean. The0-test-changeset-coverage.yamlworkflow re-runs the suite on this PR.Behavior change for consumers
A PR that only bumps a catalog dependency (no package source edits) now passes. This matches
pnpm changeset. Direct edits to a package's own files still require a changeset, unchanged.Greptile Summary
This PR removes section 2b of
check-coverage.sh— the logic that flagged workspace packages as needing a changeset whenever acatalog:entry they consumed was bumped. The rationale is correct:catalog:always references external npm packages (workspace packages useworkspace:*), andpnpm changesetitself never requires a release for an external-dependency bump.check-coverage.sh: removes catalog parsing, workspace map building, and theyq-powered diff ofpnpm-workspace.yaml; only direct file edits now trigger a coverage requirement (−72 lines).action.yaml: description rewritten to document the intentional non-flagging of catalog bumps;yqdropped from stated runtime requirements.test/coverage.bats: former "exit 1" catalog assertions replaced with four new "exit 0" parity tests, including a regression for theclonotype-space#95shape.Confidence Score: 5/5
The change removes a well-scoped block of logic with no side-effects on the remaining direct-edit detection path; all tests pass and the CI workflow is unchanged.
The removed catalog-detection block was self-contained. The remaining script paths are unmodified and the test suite covers every branch: exit 0, exit 1, and exit 2. The yq tool is still present in CI via helpers.bash's bump_catalog helper, so the test workflow's 'which yq' check continues to pass. No data is lost or silently dropped — catalog bumps simply no longer generate requirements, matching pnpm changeset behaviour.
No files require special attention.
Important Files Changed
pnpm --filter '[<base>]' listnow drive the required-bump set. Logic is clean, tmp-file cleanup trap updated correctly.yqcorrectly dropped from stated runtime requirements since the production script no longer calls it.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A([check-coverage.sh starts]) --> B[Run: changeset status --output] B --> C{status.json non-empty?} C -- No + 'no changesets were found' --> D[Write empty releases JSON] C -- No + exit != 0 --> E([exit 2: tooling failure]) C -- Yes --> F[Build bumped_set from releases] D --> F F --> G["pnpm -r --filter '[origin/BASE_BRANCH]' list"] G --> H[jq: drop private packages] H --> I[Build required_set from direct edits only] I --> J{required_set ∩ ¬bumped_set = ∅?} J -- Yes --> K([exit 0: coverage complete]) J -- No --> L[Print missing packages] L --> M([exit 1: coverage gap])Reviews (1): Last reviewed commit: "ci(changeset/check-coverage): tighten co..." | Re-trigger Greptile