Repository navigation
Description
A hosted registry declared under an ecosystem group without an org: gets the synthetic org <ecosystem>~<name> (pnpr/crates/config/src/registry_graph.rs). So /npm/~acme/ and /cargo/~acme/ are stored as:
orgs/npm!7eacme/packages/…
orgs/cargo!7eacme/packages/…
After pnpm/pnpm#17353 this is the last escaped name in a common store path.
Proposal
Add an ecosystem directory to each org namespace and drop the synthetic org:
orgs/acme/npm/packages/@/left-pad/…
orgs/acme/cargo/packages/@/serde/…
default/npm/packages/…
- A group registry without
org:uses its own name as the org. - Two hosted registries may share an
org:when their ecosystems differ. The collision check inpnpr/crates/config/src/validation.rswould compare(org, ecosystem)instead oforg. Storage::for_hostedwould take the ecosystem, andlayout::namespace_segmentswould add it.
Notes
- No new capability: separate registries per ecosystem with the same name already work through the synthetic org. This changes the paths and lets several ecosystems share one explicit org.
- pnpr is still experimental, so the layout can change in place as feat(pnpr): store packages under readable scope and version paths pnpm#17353 did, with no version bump.
- Check the records that are keyed by org (staged publishes, pipeline runs, tombstones,
.tar-integrity) for anything that assumes one ecosystem per org.
Per-ecosystem name mapping
Once a namespace knows its ecosystem, layout::package_segments can map names per ecosystem. Today only npm's @scope/name gets a directory level, and every other / or : is escaped into one segment:
| ecosystem | name | today |
|---|---|---|
| Composer | vendor/pkg |
@/vendor!2fpkg |
| Go | github.com/a/b |
@/github.com!2fa!2fb |
| Maven | org.foo:bar |
@/org.foo!3abar |
| OCI | acme/app/tool |
@/acme!2fapp!2ftool |
Splitting such names into one directory per component makes them readable. It also fixes a limit the filesystem backend already has: MAX_OCI_NAME_LEN is 255 and every escaped / takes 3 bytes, so a long nested image name exceeds the 255-byte file name limit and fails with ENAMETOOLONG. Bucket keys allow 1024 bytes, so the S3 backend is unaffected.
Splitting must keep a name from sitting where another name's child or blobs/ does. For example, OCI acme/app and acme/app/tool would both be directories, and acme/blobs must not alias acme's blobs.
Do this before a new ecosystem lands, so its names are mapped by its own rules from the start. VERSIONED_EXTENSIONS in layout.rs states the rule for blob extensions a new ecosystem adds.
Written by an agent (Claude Code, claude-opus-5-5).
Activity
[-]pnpr: an ecosystem directory in each org namespace instead of the <ecosystem>~<name> org[/-][+]pnpr: per-ecosystem storage namespaces and name mapping[/+]zkochan commentedon Oct 25, 2026
Opened pnpm/pnpm#17355 covering the full issue:
default/<ecosystem>/andorgs/<org>/<ecosystem>/).<ecosystem>:group without an explicitorg:now default theirorgto their own registrynameinstead of<ecosystem>~<name>, andpnpr-configchecks(org, ecosystem)for collisions so registries of different ecosystems can share anorg.layout::package_segmentsandlayout::decode_package_segmentstake anEcosystem(Npm,Cargo,Pypi,Oci), mapping multi-component OCI repository namesc_1/.../c_kto["@<encode(c_1)>", ..., "@<encode(c_{k-1})>", "<encode(c_k)>"]and single-component names to["@", "<encode(name)>"].pnpr upgrade-storageand documentation (storage.md,configuration.md,ecosystems.md,cli.md) are updated accordingly.Generated by Antigravity (Claude Opus 4.7)
feat(pnpr): per-ecosystem storage namespaces and name mapping (pnpm#1…
feat(pnpr): canonicalize storage record keys and dot-directory names (#…