ci(root): expand the lockstep group over the packages a release resolves - #676
Conversation
The group was expanded against a listing of packages/, while Changesets expands it against every package it enumerates. A pattern reaching outside that directory therefore read as exact coverage here and widened the group at release time, where the highest version any member carries becomes the version of every member. Enumeration now goes through the library Changesets itself uses, so the two agree by construction rather than by agreement. It resolves the root manifest's workspaces field in preference to pnpm-workspace.yaml, which is the answer the release acts on and not the one the workspace file describes. Expansion and group membership are separate questions and no longer share a list: a package outside packages/ belongs to the workspace and not to the train. Naming one in the group is reported apart from naming a package nothing answers to, because the first succeeds at the wrong version and the second fails outright.
|
@codex please review this PR |
|
Warning Review limit reached
Next review available in: 39 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
@nextlyhq/adapter-drizzle
@nextlyhq/adapter-mysql
@nextlyhq/adapter-postgres
@nextlyhq/adapter-sqlite
@nextlyhq/admin
@nextlyhq/admin-css
@nextlyhq/blocks-engine
@nextlyhq/blocks-react
@nextlyhq/builder
create-nextly-app
nextly
@nextlyhq/plugin-form-builder
@nextlyhq/plugin-page-builder
@nextlyhq/plugin-sdk
@nextlyhq/plugin-seo
@nextlyhq/storage-s3
@nextlyhq/storage-uploadthing
@nextlyhq/storage-vercel-blob
@nextlyhq/ui
commit: |
Closes the P1 left open when #664 merged.
The gap
getWorkspacePackageNamesenumerated by listingpackages/. Changesets expandsa
fixedentry against every package it resolves. While the group spells outall 23 names those two agree, so this was latent rather than live — but a group
written with a pattern separates them:
A changeset naming the 23 then passes here while the release runs with a wider
group. That matters because a fixed group moves every member to the highest
version any member carries (
assemble-release-plan):packages/*sit at0.0.2-alpha.55andapps/playgroundat0.1.2-alpha.1, so the train wouldpublish as
0.1.2— silently, and not reversibly.The finding's suggested remedy would have introduced the mirror defect
The thread proposed reading
pnpm-workspace.yaml. That file is not what therelease acts on:
package.jsonworkspacesapps/*,packages/*pnpm-workspace.yamlapps/*,packages/*,e2e@manypkg/get-packagesprefers the manifest field over the workspace file — itreports
tool: yarnhere — and Changesets enumerates through that library. SoChangesets never sees
e2e. Expanding**against the YAML would have made thisguard demand
@nextlyhq/e2ein every changeset, for a package no releaseversions.
Enumeration now goes through that same library, so what expands here and what
expands at release time agree by construction rather than by my agreement.
Expansion and membership are separate questions
They were sharing one list, which is what made the bug possible.
getWorkspacePackagesreturns both from one walk:
all— every package Changesets resolves. What a pattern expands against.underPackagesDir— what the group is supposed to contain.apps/*is in theworkspace and deliberately off the train.
Deriving them from one walk rather than two enumerations keeps them from
disagreeing about which packages exist.
The "unknown name" report is also split, because the two causes have opposite
outcomes: a name nothing answers to fails the release, while a name resolving
to an app succeeds it at the wrong version. One sentence covering both told
the author the wrong thing about what would happen.
Verified both directions
exit=0,24 all / 23 under packages/, onlyplaygroundoutside — the guard stays quiet on a correct tree.other 82 passing.
**against a workspace that is onlypackages/still passes, so the new casecannot be satisfied by rejecting patterns on sight.
83 tests pass.
@manypkg/get-packageswas already in the store as a@changesets/clitransitive:resolved 2, reused 2, downloaded 0.Also corrected here
fixedGroupShape's comment justified checking the group shape locally by thecost of a dependency this PR now declares. Rewritten to the reason that survives:
Changesets accepts any number of disjoint groups, so "exactly one group" is this
repository's rule and delegating would drop it.
No changeset: CI-only.