Skip to content

fix(changeset): reject type-none release-plan entries - #200

Draft
PaulNewling wants to merge 1 commit into
v4-betafrom
fix/changeset-gate-none-releases
Draft

fix(changeset): reject type-none release-plan entries#200
PaulNewling wants to merge 1 commit into
v4-betafrom
fix/changeset-gate-none-releases

Conversation

@PaulNewling

Copy link
Copy Markdown
Collaborator

Problem

The block-release gate passes when it should fail, so a PR can merge green and ship nothing.

changeset status puts 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 a none entry counted as a bump.

In a block repo the private model/ui/workflow siblings 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 at none:

@platforma-open/milaboratories.top-antibodies.ui      patch
@platforma-open/milaboratories.top-antibodies.model   patch
@platforma-open/milaboratories.top-antibodies         none   ← read as a bump

require-package-bump accepted that. platforma-open/antibody-tcr-lead-selection#181 merged with a green check for changesets and 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-coverage carried the identical defect: a none entry 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 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.

CI gap

Nothing ran the require-package-bump suite. 0-test-changeset-coverage.yaml was scoped to actions/changeset/check-coverage/**. It becomes 0-test-changeset-actions.yaml: a two-leg matrix over actions/changeset/**, covering both actions. Nothing referenced the old filename.

Verification

Both suites run locally, each proven red before the fix and green after:

Suite Result
require-package-bump 11/11
check-coverage 23/23

The none cascade 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

  • No file in this diff contains a milaboratory/github-ci self-ref, so the @v4 / @v4-beta flip does not apply to any of it.
  • v4-beta was 15 commits behind v4 and did not contain actions/changeset/require-package-bump/ at all — it reached v4 directly via MILAB-6648: require a changeset for every edited package, in one gate #198. fix-beta.sh was run to re-sync before this branch was cut.

`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/**`.
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