fix(changeset): reject type-none release-plan entries - #200
Draft
PaulNewling wants to merge 1 commit into
Draft
Conversation
`changeset status` lists every dependent of a bumped package in `.releases`, at `"type": "none"` when no version change is due. Both changeset actions read that array by name only, so a `none` entry counted as a bump. In a block repo the private `model`/`ui`/`workflow` siblings are versioned (no repo sets changesets' `privatePackages`), so a sibling-only changeset releases the siblings and lists the block as their dependent at `none`. `require-package-bump` accepted that and let the PR merge without releasing the block — platforma-open/antibody-tcr-lead-selection#181 merged green and shipped nothing, then needed #183 to force the release. 18 block repos opt into the gate today. `check-coverage` had the same defect: a `none` entry satisfied the coverage requirement for a package whose own files the PR edited. Both now filter `.type != "none"`. The existing "fails when only a sibling changeset is present" test passed because the fixture pinned `"privatePackages": false`, which drops private packages from the release plan and suppresses the cascade entirely. Removing it makes the fixture match a real block repo and turns that test red without the fix. `check-coverage`'s fixture gains a publishable `pkg-lib`/`pkg-app` pair on a `workspace:*` devDependency edge for the same reason. Each suite also asserts the `none` entry directly, so a future fixture edit that re-suppresses it fails loudly instead of silently disarming the gate. Nothing ran the `require-package-bump` suite in CI — `0-test-changeset-coverage.yaml` was scoped to `check-coverage/**`. It is now `0-test-changeset-actions.yaml`, a two-leg matrix over `actions/changeset/**`.
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.
Problem
The block-release gate passes when it should fail, so a PR can merge green and ship nothing.
changeset statusputs every dependent of a bumped package into.releases, at"type": "none"when no version change is due. Both changeset actions read that array by name only, so anoneentry counted as a bump.In a block repo the private
model/ui/workflowsiblings are versioned — no block repo sets changesets'privatePackages, and the default versions private packages. A sibling-only changeset therefore releases the siblings and lists the block as their dependent atnone:require-package-bumpaccepted that. platforma-open/antibody-tcr-lead-selection#181 merged with a greencheck for changesetsand released nothing; #183 then had to force the release with an empty changeset. 18 block repos opt into this gate today, so the same hole is live in all of them.check-coveragecarried the identical defect: anoneentry satisfied the coverage requirement for a package whose own files the PR edited.Fix
Both scripts now filter
.type != "none".Why the existing test didn't catch it
require-package-bump's suite already had "fails when only a sibling changeset is present", and it was green. The fixture pinned"privatePackages": false, which drops private packages from the release plan and suppresses the cascade entirely — so the test passed without ever producing the entry the gate has to reject.Removing that key makes the fixture match a real block repo, and turns the test red without the script fix.
check-coverage's fixture gains a publishablepkg-lib/pkg-apppair on aworkspace:*devDependency edge for the same reason.Each suite also asserts the
noneentry directly, so a future fixture edit that re-suppresses it fails loudly instead of silently disarming the gate.CI gap
Nothing ran the
require-package-bumpsuite.0-test-changeset-coverage.yamlwas scoped toactions/changeset/check-coverage/**. It becomes0-test-changeset-actions.yaml: a two-leg matrix overactions/changeset/**, covering both actions. Nothing referenced the old filename.Verification
Both suites run locally, each proven red before the fix and green after:
require-package-bumpcheck-coverageThe
nonecascade was first reproduced outside the suites, against antibody-tcr-lead-selection#181's exact tree, which is where the output above comes from.Notes for the reviewer
milaboratory/github-ciself-ref, so the@v4/@v4-betaflip does not apply to any of it.v4-betawas 15 commits behindv4and did not containactions/changeset/require-package-bump/at all — it reachedv4directly via MILAB-6648: require a changeset for every edited package, in one gate #198.fix-beta.shwas run to re-sync before this branch was cut.