Skip to content

Let the release-readiness gate pass on the release commit - #93

Merged
NSchatz merged 1 commit into
mainfrom
release-gate-passes-on-the-release-commit
Sep 25, 2026
Merged

NSchatz merged 1 commit into
mainfrom
release-gate-passes-on-the-release-commit

Conversation

@NSchatz

@NSchatz NSchatz commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

The release pipeline runs pnpm test on Changesets' version commit before it publishes. That commit moves package.json to 0.1.0 and consumes every pending changeset, and test/scripts/release-readiness.test.ts asserted the pre-bump state only, so it would have stopped the 0.1.0 publish in the Verify step.

Repro (before this change)

On a copy of main at 8871a11:

pnpm install --frozen-lockfile
pnpm run version       # changeset version + sync-version: package.json -> 0.1.0, changesets consumed
# commit that result locally, as the Version Packages PR would
pnpm exec vitest run test/scripts/release-readiness.test.ts
# 6 failed | 27 passed: "is not empty", "is measured against the version this audit was
# taken on", "carries at least one minor and no major", "resolves the package to the
# prepared version", "classifies the LIVD catalog changeset as minor",
# "accounts for every pending changeset"

The change

The gate recognizes one state, the release commit: the manifest at the prepared version AND nothing pending (isReleaseCommit). Only there are the two describes that read the pending set skipped.

  • A premature bump (0.1.0 with the set still pending) and a set deleted without a bump both still fail; each is pinned by a synthetic case.
  • The surface and certification checks run in every state, so the release publishes exactly what the record certifies.
  • The first changeset written after the release still reds the gate, as its header always said.

Proof after the change

Same simulation on this branch: pnpm typecheck && pnpm lint && pnpm test && pnpm build && pnpm attw exits 0 on the simulated version commit (72 files, 1264 passed, 11 skipped). On the branch itself the gate file passes (34 tests).

No change under src/.

https://claude.ai/code/session_01U24bnHKNxQWMxmfN7ny7w9

The release pipeline runs pnpm test on Changesets' version commit before
it publishes, and that commit moves package.json to 0.1.0 and consumes
every pending changeset. The readiness gate asserted the pre-bump state
only, so six of its checks failed there and would have stopped the 0.1.0
publish in the Verify step (reproduced by running `pnpm run version` on a
copy of main and then the gate: 6 failed, 27 passed).

The gate now recognizes that one state: the manifest at the prepared
version AND nothing pending. Only there are the two describes that read
the pending set skipped. A premature bump (0.1.0 with the set pending)
and a set deleted without a bump both still fail, each pinned by a
synthetic case, and the surface and certification checks run in every
state, so the release still publishes exactly what the record certifies.
The first changeset after the release still reds the gate, as designed.

Claude-Session: https://claude.ai/code/session_01U24bnHKNxQWMxmfN7ny7w9
@NSchatz
NSchatz enabled auto-merge (squash) September 25, 2026 20:29
@NSchatz
NSchatz merged commit 878099b into main Sep 25, 2026
10 checks 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