Repository navigation
Description
.changeset/changelogs/ parked sections are never garbage-collected for packages whose in-repo name is not their published name, or that are never published. 36 sections have accumulated, the oldest going back to [email protected], and the consumed intents they were composed from linger with them.
Mechanism
In registry changelog storage a release's changelog section is parked at .changeset/changelogs/<package>@<version>.md and consumed at publish. Collection is gated on the registry confirming that the published tarball's changelog contains that section — confirmed_published_versions in pnpm/crates/cli/src/cli_args/changelog.rs:
let section = read_pending_changelog(workspace_dir, &name, &version).ok()??;
let changelog = fetch_changelog(config, &name, VersionPick::Exact(&version)).await?;
changelog.contains(section.trim()).then(|| format!("{name}@{version}"))fetch_changelog resolves name against the registry as-is:
let package = Package::fetch_from_registry(name, &client, ®istry, &config.auth_headers).await.ok()?;
let version = match pick {
VersionPick::Exact(version) => package.versions.contains_key(version).then(|| version.to_string())?,name is the in-repo package name. When that is not the published name, or the package is not published at all, this resolves to None and the release can never be confirmed.
Verified against the live registry
pacquet(11 sections, alpha.11 → alpha.21).pacquetpublishes aspnpm/@pnpm/exeundernext-12and isprivate: truein-repo. The namepacquetdoes resolve on npm — to an unrelated package with 54 versions, all0.x,latest0.11.12. Sofetch_from_registrysucceeds,versions.contains_key("12.0.0-alpha.17")isfalse, and the lookup returnsNone. The real artifact is[email protected], which exists (next-12is currently12.0.0-alpha.21).pd(4 sections,1100.0.19→1100.0.22). Same shape:pdon npm is an unrelated package, 28 versions,latest0.8.1.- Never-published packages (20 sections).
@pnpm/scripts,@pnpm-private/updater,@pnpm/get-release-text,@pnpm/jest-config,@pnpm/testing.registry-mock,@pnpm/testing.mock-agent,@pnpm/testing.command-defaults— all404on npm. They get parked sections that can never be confirmed.
Impact
-
The stated invariant does not hold. The doc comment on
confirmed_published_versionssays "Every parked file belongs to an as-yet-unpublished release, so the cost is bounded by the release backlog, not by history." It is currently bounded by history: every release of an affected package adds a file that is never removed, and each one costs a registry round-trip on everypnpm version -r. -
Consumed intents linger, which misleads readers about what has shipped. Parked sections are collected "together with the intents [they were] composed from, under the same registry-confirmed gate", so the intents are stranded too. Concretely:
.changeset/pacquet-edge-aware-engine-strict.mdis recorded in.changeset/ledger.yamlas consumed by[email protected], has been published for several alphas, and is still sitting in.changeset/. A file in.changeset/therefore stops being a signal that a change is unreleased, and editing one silently rewrites published release notes.
Notes toward a fix
Deliberately not prescribing one, but the cases look distinct:
- Renamed at publish (
pacquet,pd) needs the published name to probe with. Worth being careful here: because both names resolve to unrelated real packages, a wrong-name probe fails quietly rather than erroring, and could in principle produce a false confirmation if an unrelated package's changelog happened to contain the section text. - Never published (private packages) may not warrant a parked section at all — there is no tarball changelog to prepend to — so the fix might belong at parking time rather than collection time.
- It may also be worth distinguishing "this package/version is absent from the registry" from "it is published but the changelog lacks the section", since only the second is the not-yet-published state the gate is designed for.
The TypeScript side takes the gate as an injected predicate (verifyPublished?: (name, version, section) => Promise<boolean> in pnpm11/releasing/versioning/src/applyReleasePlan.ts), so it is name-based by contract too and whatever supplies it has the same trap.
Found while looking into whether an already-released parked section could be corrected in place (it cannot, and should not be edited — the collection gate matches it verbatim against the published changelog). Context in pnpm/pnpm#13286.
Written by an agent (Claude Code, claude-opus-5[1m]).
Activity
github-actions commentedon Jul 25, 2026
Oz triage is running now and will classify this issue and apply one pnpm
state:label.Follow along in Oz: https://app.warp.dev/run/019f9956-9d96-7171-bc4d-0987bd87ca61
github-actions commentedon Jul 25, 2026
Triage result
Ready to specstate: needs designpnpm/crates/cli/src/cli_args/changelog.rs) and pnpm11 (TypeScript,pnpm11/releasing/versioning/src/applyReleasePlan.ts+previousChangelog.ts) — both stacks need matching fixes.changeset/changelogs/in the current checkout, exactly matching the reported counts (11 forpacquet, 4 forpd, 20+ for never-published packages). The mechanism is fully understood:confirmed_published_versionsuses the in-repo package name for registry probes, which silently fails for packages renamed at publish (pacquet→pnpm) and can never succeed for packages that are never published. However, the fix is non-trivial: for renamed packages, naively usingpublishConfig.namerisks a false confirmation (an unrelated npm package with that name could satisfy the probe), and for never-published packages the right fix may belong at parking time rather than collection time. The issue author deliberately did not prescribe an approach, signalling that design work is needed before implementation. Multi-stack parity (Rust + TypeScript) amplifies the scope.pnpm version -rtime, and (3) whether to distinguish "absent from registry" from "published but changelog section missing". Once the approach is chosen, coordinate the implementation across both stacks.Written by an agent (Oz, auto).
zkochan commentedon Jul 25, 2026
Investigated properly on a fresh worktree. Two corrections to the report above, one of which makes this considerably more serious than a GC leak.
The Rust CLI has been publishing without a changelog
[email protected]and@pnpm/[email protected]contain noCHANGELOG.mdat all. For comparison,[email protected](TypeScript CLI) and@pnpm/[email protected]both do. So the parked sections forpacquetare not merely uncollected — the prose they hold has never reached users. Eleven alphas' worth of release notes are sitting in.changeset/changelogs/and have never been published anywhere.Mechanism:
pnpm/npm/pnpm/scripts/generate-packages.mjs:96rewrites the manifest name before publish —— and
compose_registry_changelogthen reads the name back off that rewritten manifest:So it looks for
.changeset/changelogs/[email protected]while the section was parked as[email protected], getsNone, and packs no changelog. The same name mismatch then makesconfirmed_published_versionsprobepacqueton npm, which is an unrelated 0.x package, so the section is never confirmed and never collected. One root cause, two symptoms."Private" is not the criterion
@pnpm/napiisprivate: truein-repo and publishes correctly, with a properly composed changelog:Its single parked section is legitimately pending the next
pnpm version -r, not leaked. The generator stripsprivatefor packages that ship, so the flag says nothing about whether a package reaches the registry.The two classes that actually break are:
pacquet(11 sections, alpha.11 → alpha.21) andpd(4 sections). Compose and confirm both look up a name the registry does not have under that identity.@pnpm/scripts,@pnpm-private/updater,@pnpm/get-release-text,@pnpm/jest-config,@pnpm/testing.registry-mock,@pnpm/testing.mock-agent,@pnpm/testing.command-defaults(20 sections, all404on npm). There is no destination for their prose, so the gate can never pass by construction.Class 2 is the awkward one to fix on its own, because the repo cannot currently tell "not published yet" from "never will be" —
private: truedoes not distinguish them, as@pnpm/napishows.Why this is not a one-line fix
The in-repo name is deliberately
pacquetso it cannot collide with the TypeScript CLI'spnpmpackage, and the versioning system keys intents, the ledger, and parked sections by that in-repo name. The published identity ispnpm. Nothing currently declares that mapping:publishConfigdoes not acceptname(it is absent fromPUBLISH_CONFIG_WHITELISTinpnpm11/releasing/exportable-manifest/src/overridePublishConfig.ts), so the rename only exists inside a CI shell step, where the versioning layer cannot see it.Any fix therefore has to give compose-time and confirm-time a shared, declared notion of the published identity — or decide that these packages should not park sections at all.
Written by an agent (Claude Code, claude-opus-5[1m]).
fix(releasing): address the registry by the published name everywhere
feat: support publishConfig.name to publish under a different name (#…
feat: support publishConfig.name to publish under a different name (p…
zkochan commentedon Sep 28, 2026
A related regression reached the 11.28.1 / pacquet 12.8.0 / pnpr 0.1.0-alpha.14 release PR (pnpm/pnpm#16312).
pnpm/pnpm#14934 (shipped in pnpm 12.7.0) routes every
private: trueproject torepositorychangelog storage (ReleaseStorage::ofinpnpm/crates/versioning/src/apply.rs).pacquet,@pnpm/napiand@pnpm/pnprare private in-repo but published through their generators. Since the repo now pins pnpm 12.7.0, the release bump wrote their sections to newly committedpnpm/npm/pnpm/CHANGELOG.md,pnpm/npm/napi/CHANGELOG.mdandpnpr/npm/pnpr/CHANGELOG.mdand parked nothing. That breaks both consumers of the parked section:release.ymlreads.changeset/changelogs/pacquet@<version>.mdand@pnpm!pnpr@<version>.mdfor the GitHub release body, and would draft both releases with empty descriptions.compose_registry_changeloginjects the npm tarball'sCHANGELOG.mdonly from a parked section, so[email protected]would have shipped without its composed changelog history.For this release, the three sections were moved back to parked files by hand on the release branch. The parked files will be confirmed and collected normally by the next bump. The next release PR will hit the same problem until the storage decision stops treating "private" as "never published". Given the earlier finding here that
privatedoes not identify unpublished packages, a declared marker (or excluding projects that setpublishConfig.name, or aversioningsetting listing the packages that keepregistrystorage) is probably needed. The TypeScript side mirrors this inprivateProjectDirs.Written by an agent (Claude Code, claude-opus-5-5).
docs(release): park Rust changelogs and curate release notes
chore(release): 11.28.1, pacquet 12.8.0, pnpr 0.1.0-alpha.14 (#16312)
fix(release): park the Rust products' changelogs after the bump (#16315)
zkochan commentedon Nov 8, 2026
Status check against main (2026-11-08).
Renamed packages are now probed under their published name (pnpm/pnpm#13353,
published_namesinchangelog.rs).Left: 11
[email protected].*and 4pdsections, and never-published sections (@pnpm/scripts,@pnpm-private/updater, …) remain in.changeset/changelogs/, andReleaseStorage::ofstill sends every private directory to repository storage.Written by an agent (Claude Code, claude-opus-5-5).