Repository navigation
Description
Umbrella for taking pnpr from 0.1.0-alpha.x to a 1.0.0 whose config, URLs, on-disk formats, and wire protocols we commit to keep. It records what a read-through of pnpr/ on 2026-10-14 (commit a03b6bc1bd) found, grouped by the question it answers. Items are verified by reading the code unless marked otherwise. Nothing here is implemented yet; each section is meant to spawn its own task once a decision is made.
Related tracking issues: #19 (verdaccio parity), #21 (stateless deployment), #23 (packument split), #24 (missing dist.integrity), #25 (resolver policy gaps and capability negotiation), #26 (resolver SSRF, now largely addressed by the fetch allowlist and DNS guard and worth re-checking and closing), #111 (runtime administration), #113 (web UI follow-ups).
Summary
- Breaking changes are needed before v1. The biggest are: the URL layout changes when a second ecosystem is configured, the config schema has mixed casing and two spellings for the same thing, the bundled default config is pnpm's test-registry config, and the hosted store layout lets registries collide. None of these can change compatibly after v1.
- Architecture needs settling, not rewriting. The routing model (declared provenance, no fall-through) is sound and should be frozen. What needs decisions: identity (a bare username is the whole identity), an owner model for packages, how the pnpr↔pnpm protocol is versioned, and where the publish journal lives on S3.
- Several production basics are missing: SIGTERM handling, metrics, trusted-proxy support, rate limiting, request timeouts, cache eviction,
npm audit,npm token create, provenance publishing, an admin audit log, and a format version plus migration path for every persisted format.
A. Breaking changes to make before v1
A1. Make the URL layout independent of how many ecosystems are configured
Today npm is served at / only when it is the only ecosystem. Adding a Cargo, PyPI, or OCI registry to an existing npm server moves every npm path under /npm/ (crates/pnpr/src/server/routing.rs, crates/registry/src/lib.rs base_path). That breaks .npmrc registry URLs, /~name/ URLs, pnpm publish --batch, the tarball URLs the resolver wrote into existing lockfiles (resolver/wire/tarball_router.rs only recognizes the current prefix), and OIDC workload publish paths. The same URL also changes meaning: /npm is the npm package npm on an npm-only server and the ecosystem prefix otherwise.
Decide one rule. Either npm stays at / forever with /npm/ as an alias (reserving the npm names npm, cargo, pypi, oci, v2 at the root), or every ecosystem is always prefixed. The resolver's tarball URLs and OIDC paths must follow the same rule.
A2. One config schema, consistently named
crates/config/src/config_file.rs and friends:
- Mixed casing:
auth.htpasswd.max_users,upstream.auth.token_env, and verdaccio'smaxagesit next tomaxFails,failTimeout,accessKeyId,teamsManagedBy. Error messages still sayfail_timeout. - Two spellings for the same thing: flat registries with
ecosystem:versus grouped<ecosystem>: { name: ... }entries, with different default storage namespaces (""versus<ecosystem>~<name>);defaultRegistryas a string or a map. The internal keyecosystem/nameleaks intoauth.oidc[].workloads[].registryandgroups.teams[].registry, and the admin rules API uses a third form,/{ecosystem}/{name}. Grouped npm registries cannot use OIDC workload publishing at all because the allowed path is built as/~npm/private/.... - Undocumented alias
backend.postgresql. - Units: intervals (
30s) for upstream and SQL timeouts, integer seconds forlibsql.syncIntervalSecsand the CLI flags--packument-ttl-secsand--min-age-secs, bytes foroci.maxBlobBytes, GiB forartifacts.quota.ownerGiB. - Overloaded names:
cacheis a path at the top level and a boolean on an upstream;orgon a hosted registry is a storage namespace whileartifacts.orgsis an access principal and/-/org/{scope}is an npm scope;routesconfigures the resolver's fetch allowlist and is easily confused with routers;backendonly backs auth but sits at the top level;artifacts.orgsalso gates compiler caches and pipeline runs and is read even withartifacts.enabled: false. - Unknown keys are silently ignored on the top level and on
auth,htpasswd,tokens,backend,s3,osv,log,routes, and upstreamauth. A typo likemaxUsers:does nothing. Turning on strict parsing after v1 would itself be a breaking change. - The
--packument-ttl-secshelp text says "the loaded config's value wins" but there is no config key for it. - The
ConfigandConfigFiledoc comments still claim verdaccioconfig.yamlcompatibility;packages:andgroups:are rejected anduplinksis unsupported.
A3. Replace the bundled default config
crates/config/config.yaml is compiled in as the default and used whenever no -c is given and no global config exists, which includes the Docker image's default command. It is pnpm's test-registry config: a public secret: pnpm-registry-mock-secret-key-32 (which also seeds the OCI token signing key and the private cache HMAC), about 60 fixture package names claimed by a hosted registry, unpublish: $authenticated on all of them, verdaccio leftovers (plugins, middlewares, web), and log.level: error while the code default is info. The TypeScript jest setup string-patches this file, and Config::proxy, Config::static_serve, REGISTRY_MOCK_LOCAL_PATTERNS, and registry_mock_rules are public API used only by tests. main.rs has special-case logic (relocate_bundled_auth_state) for it.
Ship a minimal production default (npmjs public upstream, one empty hosted registry, random secret, registration disabled) and move the test config and presets into the test harness (pnpm/tasks/registry-mock or pnpr-fixtures).
A4. Hosted store layout and format versions
crates/storage/:
- Org namespaces share the key space with the flat root. An org
acmecollides with an unscoped packageacme; a flat-root OCI repositorycrates/serdewrites to the path of crateserdein a Cargo registry withorg: crates;cargo~internalis a valid npm name and lands in a grouped Cargo registry's root.oci_maintenance.rsworks around this with an ad-hoc exclusion list. - Inside an OCI repository, blobs (
sha256-<hex>) and the document (package.json) share a directory with nested repository names, which are also valid name components. - Every ecosystem's document is called
package.jsonbut holds different types. No persisted format (packument,CrateDocument,ProjectDocument,ImageDocument, journal, revision index, staged records,.package-index) carries a format version, and there is no migration code. An older binary that rewrites a newer document drops fields it does not know, including the OCIgenerationanddeleting_blobdeletion fences. Unknown-field policy is inconsistent: most persisted structs drop unknowns, whileRuleChanges,PackageChanges, andPipelineRunreject them, so after a rolling upgrade an older replica reading a newer rules record denies everyone on that registry. - Team rosters and rule overrides are keyed by registry name (
.team-rosters/v0/<registry>.json), so moving a registry into an ecosystem group changes the key and the YAML seed silently replaces an admin's tightened rules. - On S3,
~in keys is percent-encoded byobject_store, butS3Store::list_package_namesandlist_blob_filescompare against the rawnpm~internal/prefix, so packages of grouped hosted registries are missing from search, the PyPI/simple/root, the OCI catalog, andoci-gc. Local and S3 layouts also differ for any name containing~ * [ ] ^ { } | # % < > ?, and there is no local-to-S3 migration tool. - The revision reference index stores JSON as an array of byte numbers; its doc comment describes sibling files that are never written.
Decide the layout once (reserved prefix for orgs, separate document and blob subkeys, one name encoding for both backends), add a layout marker and a formatVersion field with a "refuse to rewrite newer" rule, and add a migration or an explicit "wipe and rebuild" rule for each cache.
A5. Auth database schema and token record
crates/auth/: every backend uses CREATE TABLE IF NOT EXISTS with no schema version or migration table. TokenRecord has no expiry, name, scopes, or kind; readonly and cidr_whitelist exist but nothing can set them; last_used_at is written once and never updated. Tokens are bound to the username string, not a stable id. The public types Identity, TokenRecord, TokenBackend, and UserBackend are re-exported from the published pnpr crate and are not #[non_exhaustive], so adding any of these fields later breaks library users. MySQL's default collation makes usernames case-insensitive there but not on SQLite or Postgres.
Add a schema version table and migration runner, add the nullable columns now (expires_at, name, scopes, kind), mark the public types non-exhaustive or make fields private, and set an explicit collation on MySQL. A pnpr_ token prefix for secret scanning can come later compatibly.
A6. Protocol versioning for the pnpm client
crates/pnpr/src/server/pnpr_protocol.rs, resolver/protocol.rs, resolver/wire.rs, and pnpm/crates/pnpr-client:
- The handshake's
versionsfield means resolver versions;fixLockfileis a feature flag disguised as a version list; compiler cache,registries, admin, SCIM, sign-in, and/-/pnpm/v1/publishare not advertised; the Rust client gates both the resolver and artifacts on onePROTOCOL_VERSION = 0constant, so bumping one bumps both. - Neither client calls the handshake before an npm resolve or verify-lockfile. The TypeScript client never calls it before resolving at all.
- Both clients reject an unknown NDJSON frame type as a protocol error, so no new frame (a warning, or the "allowed picks" frame proposed in pnpr: policy gaps on the pnpr path (strict mode inert, loose-mode auto-collect, error codes, capability negotiation) #25) can be added without breaking every shipped pnpm. An ignore-unknown-frames rule must exist before v1.
- Capability detection is one ad-hoc check per field (transforms header,
patchedDependencies,publishDirectory,addMissingPeerTypes). Thedoneframe does not echo which policies the server applied, and errors carry no codes, soERR_PNPM_OUTDATED_LOCKFILEis lost through pnpr and the PyPI fallback matches on error text. - The lockfile on the wire is serde JSON of
pnpm_lockfile::Lockfile, always stamped9.0, with no negotiation of the format the client accepts. Format-12 registry-qualified keys can be produced for a pnpm v11 client that only reads 9.0.RegistryDeclaration,PackageExtension,Catalogs,TrustPolicy, andResolutionModeare pnpm-internal types on the wire, so a serde change inpnpm_configsilently changes pnpr's wire format. - Mixed versions in paths:
/-/pnpm/v1/publishbeside/-/pnpr/v0/publish(two batch publish endpoints, the second with no client yet), SCIM at/-/pnpr/v0/scim/v2, on-diskv0andv1directories side by side. - Every pnpm v11 ever shipped sends
nodeVersion/os/arch, expects exactly thepackage/done/error/violationsframes, buffers the response, and never uses verify-lockfile. pnpr v1.x has to keep serving that request shape as long as v11 is supported.
Decide: a client must handshake before resolve and verify; versions are a major number plus a feature list, named per protocol; the request carries the lockfile formats the client accepts and the server renders the highest; wire types move to a versioned schema crate; the done frame echoes the applied policies; errors carry codes. Freeze /-/pnpr/v1/resolve and verify-lockfile only. Keep artifacts, compiler cache, pipeline runs, and the cross-ecosystem publish on v0 outside the v1 commitment, as the docs already label them.
A7. CLI surface
crates/pnpr/src/main.rs: --osv turns a feature on while the other flags turn surfaces off, and PNPR_OSV=false cannot override osv.enabled: true; there is no --disable-pipeline; --packument-ttl-secs and --min-age-secs put the unit in the name; server flags apply to the oci-gc subcommand too; every error exits 1. Settle the flag grammar (pnpr serve with bare pnpr as alias, interval-valued flags, --<feature>[=bool]) before v1. Adding config check, user add, and token create subcommands is additive and can follow.
A8. Distribution
- Platform packages are named
@pnpm/pnpr.linux-x64while the pnpm CLI uses@pnpm/linux-x64. Pick one convention. - The
latestdist-tag of@pnpm/pnprand its platform packages points at0.0.0-26070301, a July 2026 pre-alpha snapshot, and@pnpm/pnpr-ui@latestis0.0.0-0.pnpm add -g @pnpm/pnprinstalls that snapshot. The release workflow correctly keeps prereleases onnext, but nothing ever movedlatest. Either movelatestto the current alpha or unpublish the snapshots; the docs now say@pnpm/pnpr@nextuntil then. - The Docker image runs the bundled test config bound to
0.0.0.0with no-cand has no init process, so SIGTERM is ignored (see C1). engines: node ">=18.*"is an odd range. The preinstall hard-link has no fallback when install scripts are blocked.@pnpm/pnpr-uiis found by a hard-coded sibling directory name and released in lockstep. Decide whether that stays a v1 rule.
B. Architecture to rethink
B1. Identity is a bare username
Identity is only a username (crates/policy/src/access.rs). Self-registration (PUT /-/user/org.couchdb.user:{name}) never checks OIDC bindings, workload bindings, or auth.admins, so while max_users allows registration anyone can register as release-ci or as an admin who has no password account yet and inherit that principal's rights. The docs even recommend letting the first admin self-register before locking registration. SCIM-provisioned names are not reserved either. Decide how identities are namespaced (at minimum, reserve bound and admin names), and whether tokens reference a user id. Changing this after v1 changes what every access list means.
B2. No owner or maintainer model
There is no npm owner, no first-publish claim, and no tombstone. With the default publish: $authenticated, any authenticated user can squat any name an open pattern covers and publish new versions of packages others created; after a full unpublish the name can be re-claimed and an unpublished version republished with different bytes. npm owner add also fails because its first request is a GET on the login path, which only accepts PUT. maintainers is stored but never used. Even an opt-in $owners access token with first-publisher-becomes-owner semantics changes what "publish" means, so the default matters and should be decided before v1. #19 lists this as open.
B3. Publish journal durability on S3
With the S3 backend the publish journal and staging area live under the local cache directory, which the docs call disposable. A replica that dies after sealing a transaction and before applying it loses that publish, and a cross-ecosystem batch can be left half-applied on shared storage. ManifestBlob.tmp_path is also stored as an absolute path, and a missing tmp file during replay is treated as "already promoted", so a moved or wiped cache leaves a packument advertising versions with no tarball. Decide where the journal lives (bucket-side, or a durable volume that is documented as such) and make replay verify the final blob exists.
B4. Per-ecosystem meaning of shared concepts
unpublish means npm unpublish, OCI delete, nothing for Cargo (yank uses publish), and nothing for PyPI. teamsManagedBy: api is accepted on Cargo, PyPI, and OCI registries but unreachable, because the team API resolves an npm scope. OIDC workloads, staged publishing, dist-tags, OSV, minimumReleaseAge, and trustPolicy are npm-only. The packages: pattern language has no prefix form for Cargo or PyPI, so on a router fronting crates.io or pypi.org every new private crate needs a config change the admin API cannot make, and adding a prefix glob later would break the "one key per specificity tier" rule. Either reject the meaningless combinations or add ecosystem-neutral equivalents, and decide the tie-break rule for prefix patterns before freezing.
B5. Shared secret
One secret: keys the private cache HMAC and derives the OCI token signing key. Rotating it invalidates caches; leaking it lets someone forge OCI tokens. An unresolved ${VAR} substitutes an empty string with only a warning, so an unset ${PNPR_SECRET} silently falls back to a random per-process secret and OCI tokens stop working across replicas. Split the keys (or derive per-purpose subkeys), document rotation, and make an unresolved variable in a secret-bearing field a hard error.
B6. Crate structure and the public Rust API
crates/pnpr is 49k lines (26k source, 23k tests); server/ is 17.5k, with npm (about 6k), OCI (3k), Cargo (0.7k), PyPI (0.6k), and auth/admin (3k). There is no surface-level trait; Cargo, PyPI, and OCI share HostedDocument, staging, and target resolution, while npm is the older separate path. Ecosystem knowledge is scattered: write classification sniffs paths in authentication.rs, upstream download hosts are hardcoded in ecosystem.rs, match ecosystem dispatch appears in several places. The resolver pulls in 19 pnpm-* crates that every registry-only build carries. The pnpr crate is publishable and re-exports a large config and registry API while still describing itself as an "npm registry server". The split (server core, per-ecosystem surfaces, resolver, binary) is internal and can wait; marking the library re-exports unstable or publish = false before v1 cannot.
B7. Extensibility decision (from #19)
UserBackend/TokenBackend are public traits; HostedBackend is crate-private; policy, upstreams, and ecosystems are compiled in; SQL backends are Cargo features. State explicitly that v1 has no plugin surface beyond embedding the library, or define and document the trait surface.
C. Features missing for production
In rough priority order. Those marked (parity) are already in #19.
- SIGTERM handling.
shutdown_signalonly awaitsctrl_c, and the image runs pnpr as PID 1, sodocker stopand Kubernetes shutdowns wait out the grace period and kill it. Also make/-/pingor a new readiness endpoint check storage, S3, and the auth database. - Trusted-proxy support. Client IP is always the socket peer; CIDR-restricted tokens, logs, and any future rate limiting see the proxy's address.
crates/config/src/ip_network.rsis used only for outbound policy. (parity) - Rate limiting, request timeouts, and concurrency limits. None exist. Login is protected only by bcrypt cost; anonymous
PUT /{name}buffers up to 100 MiB beforeauthorizeruns; concurrent upstream fetches of one package are not coalesced. - Metrics and request IDs. No Prometheus endpoint, no OpenTelemetry, and the access log has no request id, user, client IP, user agent, or byte count. (parity)
- Cache eviction. The upstream tarball and packument cache has no size cap, LRU, or TTL deletion;
oci-gcis the only reclamation tool. Orphaned private namespaces from per-process secrets are never cleaned. (parity) npm audit. No/-/npm/v1/security/audits,/quick, or/advisories/bulk; OSV is only used to hide versions.pnpm auditagainst pnpr fails. (parity)npm token createwith read-only, CIDR, expiry, and name, so least-privilege CI credentials exist outside OIDC workloads (which cover npm only). Also updatelast_used_at.npm publish --provenance. The.sigstoreattachment is rejected because attachment names must end in.tgz;/-/npm/v1/attestationsand/-/npm/v1/keysdo not exist.- Admin audit log. User, rule, team, SCIM, and unpublish handlers emit no log events.
- Packument caching headers. No ETag or 304 on packuments, no
Vary: Acceptalthough the body depends onAccept, and noCache-Controlon public packuments (pnpr: split the packument into a mutable version index and immutable per-version docs to speed up resolution #23 lists the cheap wins). - Login web flow (
/-/v1/login) so plainnpm logincan use SSO; today OIDC sign-in is a pnpr-specific URL. - Tooling:
config check,verify(every document against its blobs), export, backup guidance, local-to-S3 migration, verdaccio htpasswd import (bcrypt-only today, and one{SHA}line rejects the whole file). - Webhooks, hot reload, TLS: decide and document. The docs still mention a config reload that does not exist (fixed in the docs PR below);
rustlsis only used by the libsql client.
D. Bugs found during the audit
The pnpr audit bugs below were fixed in pnpm/pnpm#16927:
- Unpublishing a package named
pnpr-store,pnpr-cache,osv,shared-artifacts, orpnpr-hosted-stagingrunsremove_dir_allon pnpr's own cache subsystems, becauseStorage::remove_packageandremove_blobalso remove<cache>/<name>at the cache root (crates/storage/src/lib.rs). Nothing writes there any more. - The S3 listing prefix bug for
~in grouped-registry namespaces (A4). - Journal replay writes a document whose tarball may not exist (B3).
PUT /{pkg}/-rev/{rev}keeps the body verbatim; immutability covers onlydist.integrityanddist.tarball, so a caller with publish and unpublish rights can rewritedependencies,bin, orscriptsof a published version (package_mutation/immutability.rs).is_write_requestdenies listed methods instead of allowing listed reads:POST /-/stage/package/{name}andPOST /-/stage/{id}/approveare not classified as writes, and on a PyPI-only serverPOST /legacy/is not either. Harmless today only because nothing can mint a read-only token.- Rewriting htpasswd through
write_atomicresets its permissions, losing an operator'schmod 600;tokens.dbgets default permissions too. - Login reveals which usernames exist: unknown user with registration disabled gets an immediate 403
registration_disabled; known user with a wrong password gets a 401 after bcrypt. - Self-registration accepts an empty password; bcrypt input is silently truncated at 72 bytes (
hash_with_resultinstead of the non-truncating variant). - npm upstream proxy clients are explicitly excluded from the fetch guard and DNS guard that the resolver uses (
server/state.rs), so a redirecting upstream can make pnpr fetch internal addresses. ConfigderivesDebugincluding the cache secret, andLibsqlSettings.auth_tokenand SQL URLs with passwords use derivedDebug. Nothing logs them today.- The admin user deletion endpoint does not end OIDC browser sessions; only SCIM does. OIDC sessions are capped at 1,024 per process, so one user can lock everyone out of browser login for an hour.
PipelineRunis stored as the wire type withdeny_unknown_fields; after a rollback one newer record makeslistfail.entry_digestfor shared artifacts hashesserde_json::to_vec(subject), so any change to howArtifactSubjectserializes moves every entry.
Still open:
- The benchmark hooks
PACQUET_BENCHMARK_PNPR_SERVER_REGISTRYandPACQUET_BENCHMARK_PNPR_TARBALL_REWRITE_FROMship in the pnpm binary (pnpm/crates/cli/src/cli_args/install/pnpr_request.rs).
E. Sound and worth freezing as-is
- Declared provenance: routers pick the first claiming source, never fall through, are validated at load, with coverage computed per ecosystem.
ecosystemas a property of a concrete registry, routers filtering sources by it.- Canonical names per ecosystem at the request boundary,
packages:keys normalized the same way. - The access grammar (
$all,$authenticated,$anonymous,team:, username), which rejects unknown$andkind:forms at load so new kinds can be added later. - One token store with per-client header shapes; OCI scoped tokens derived from a parent token and re-checked per request.
- OCI
/v2/at the host root plus/oci/for path-capable clients. - S3 conditional writes for cross-replica publish safety.
- Upstream cache namespaces keyed by registry and credential; credentials attached only to same-origin HTTPS or loopback destinations.
- OIDC: exact-subject bindings, no account auto-creation, PKCE and nonce, public-IP-only discovery.
F. Documentation
Stale documentation found during the audit was fixed in pnpm/pnpm#16926: the duplicated crate README and OIDC.md, the @pnpm/pnpr.client README (old remoteSideEffectsCache spellings and a stale owner rule), the handshake description, the namedRegistries field name, the claim that pnpm handshakes before resolving, the nonexistent config reload, the packument TTL help text, the --config help text, and the install instructions (@next).
Still to write for v1: the reverse-proxy and TLS deployment guide, backup and restore, the S3 journal caveat, exit codes, and a settings reference entry for pnprServer on the pnpm side (it is documented only in pnpr's docs today).
Suggested order
- Decide A1 (URL layout), A2 (config shape), and A4 (store layout) together; they share the ecosystem and namespace questions.
- Replace the bundled default config (A3) and fix the Docker default command and SIGTERM (C1); these are small and unblock running the current alpha safely.
- Add format versions and the auth schema version (A4, A5) before any other persisted-format change.
- Settle identity and ownership (B1, B2).
- Version the pnpm protocol (A6) together with pnpr: policy gaps on the pnpr path (strict mode inert, loose-mode auto-collect, error codes, capability negotiation) #25.
- The remaining C items can land in any order and most are additive.
Written by an agent (Claude Code, claude-fable-5-1).
Activity
zkochan commentedon Oct 14, 2026
Opened draft PR pnpm/pnpm#16927 covering the Section D audit bugs:
Storage::remove_blobandremove_packageto the hosted backend so unpublishing packages namedpnpr-store,pnpr-cache, etc. does not delete internal cache subsystems.object_store::path::Path.open_hosted_blob()before marking blobs lost during crash recovery journal replay.dependencies,scripts,bin, etc.) of already published versions inPUT /{pkg}/-rev/{rev}and restores omitted metadata fields from the hosted manifest.is_write_requestto an explicit read-method and read-endpoint allowlist so sensitive endpoints (POST /-/stage/...,POST /legacy/) cannot be accessed with read-only tokens.htpasswdandtokens.dbto0600on Unix.verify_password/hash_password).with_fetch_guardto npm upstream proxy clients to prevent requests to loopback or private network addresses via redirects.DebugforConfig,LibsqlSettings, and database config redacting secrets and tokens.deny_unknown_fieldsfromPublishPipelineRundeserialization.entry_digest.Created by Antigravity (gemini-2.5-pro)
fix(pnpr): address review feedback on audit security, storage, and im…
fix(pnpr): reject packument rewrites missing an object-valued version…
fix(pnpr): address review feedback on debug redaction, tokens.db perm…
fix(pnpr): use shared redact_url_credentials for database settings Debug
fix(pnpr): parse connection URL directly during Debug redaction
fix(pnpr): address audit security, immutability, and storage bugs (#1…
zkochan commentedon Oct 14, 2026
PR pnpm/pnpm#16927 has merged to
main, resolving the Section D audit bugs forpnpr:Storage::remove_blobandremove_packageto the hosted backend so unpublishing packages namedpnpr-store,pnpr-cache, etc. does not delete internal cache subsystems.object_store::path::Path.open_hosted_blob()before marking blobs lost during crash recovery journal replay.dependencies,scripts,bin, etc.) of already published versions inPUT /{pkg}/-rev/{rev}and restores omitted metadata fields from the hosted manifest.is_write_requestto an explicit read-method and read-endpoint allowlist so sensitive endpoints (POST /-/stage/...,POST /legacy/) cannot be accessed with read-only tokens.htpasswdandtokens.dbto0600on Unix.verify_password/hash_password).with_fetch_guardto npm upstream proxy clients to prevent requests to loopback or private network addresses via redirects.DebugforConfig,LibsqlSettings, and database config redacting secrets, query params, and tokens.deny_unknown_fieldsfromPublishPipelineRundeserialization.entry_digest.Updated by Antigravity (gemini-2.5-pro)
zkochan commentedon Oct 14, 2026
Draft pull request opened at pnpm/pnpm#16934 implementing Section C1 (Container shutdown & readiness):
SIGTERMsignal listening inshutdown_signalalongsideSIGINT(Ctrl-C) to perform graceful container shutdowns and connection draining.check_readiness()across all storage (local filesystem, S3 bucket with 5s timeout) and auth backends (htpasswd, SQLite, Libsql, PostgreSQL, MySQL).GET /-/readyandGET /-/liveendpoints globally and under registry prefixes, and updatesGET /-/pingto return 503 when backend services are inaccessible.This addresses §C1 of this issue.
Created by Antigravity (gemini-2.5-pro)
feat(pnpr): support SIGTERM container shutdown and readiness probes (#…
zkochan commentedon Oct 14, 2026
Pull request pnpm/pnpm#16934 has merged, completing Section C1 (Container shutdown & readiness):
SIGTERMhandling for graceful container shutdown alongsideSIGINT.check_readiness())./-/readyand/-/livehealth endpoints, with/-/pingreturning503 Service Unavailableon backend outages.Created by Antigravity (gemini-2.5-pro)
zkochan commentedon Oct 14, 2026
Opened draft PR pnpm/pnpm#16939 covering Section C2 (Trusted-proxy support):
trusted_proxiesconfiguration topnpr-config(HttpConfig) with CIDR, IP, andloopbacksupport.Forwarded,X-Forwarded-For(right-to-left), andX-Real-IPwhen socket peer is trusted, skipping intermediate trusted proxies.ClientIpto request extensions and logs it topnpr::accesstrace span.pnpr_config::IpNetwork.Created by Antigravity (gemini-2.5-pro)
feat(pnpr): support trusted proxies for client IP resolution
60 remaining items
feat(pnpr)!: give the hosted store a layout with one place per thing
feat(pnpr)!: give the hosted store a layout with one place per thing (#…
zkochan commentedon Oct 18, 2026
Section A4, storage-layout half, is merged in pnpm/pnpm#17100.
layout.json,default/packages/<name>/{document.json,blobs/<file>}for registries without an org,orgs/<org>/packages/...for each org.[a-z0-9._-]as is, other bytes as!and two hex digits), so an org, a package, a blob and a nested image repository can no longer collide, names that differ only in case get separate directories, and S3 keys are the local paths. That also fixes the S3~listing/sweep bug and removes the.package-indexworkaround and the exclusion lists in OCI GC andverify.pnpr upgrade-storage [--dry-run]converts it on disk or in a bucket and can be resumed. The proxy cache is emptied once and refills.Still open in A4:
formatVersionfield in every persisted document (packument,CrateDocument,ProjectDocument,ImageDocument, journal, revision index, staged records), with a rule never to rewrite a newer documentRuleChanges,PackageChangesandPipelineRunreject unknown fields, the rest drop them)Written by an agent (Claude Code, claude-opus-5-5).
zkochan commentedon Oct 18, 2026
Draft PR pnpm/pnpm#17112 has been opened covering the deliverables for Section A (Production Readiness):
formatVersion) to packuments, OCI image documents, crate documents, and state journals, rejecting documents written by newer format versions withDocumentFormatTooNew.pnpr servesubcommand and addedparse_cli_intervalfor duration units (s/m/h/d) and bare seconds on interval flags (--packument-ttl,--min-age,--max-age)./-/pnprcapability handshake, versioned endpoints (/-/pnpr/v1/resolve, etc.), policy echo verification in terminal frames, and structured error reporting.tinito the Docker image.Note: This PR addresses Section A. The remaining sections (Section B onwards) will follow in separate milestones.
Generated by Antigravity (model: pro).
fix(benchmarks): remove obsolete mounts config in cold-pnpr benchmark
refactor(pnpr): target resolver protocol v0
perf(pnpr-client): avoid pre-flight handshake roundtrip on resolve ho…
fix(pnpr): address PR review findings across protocol, storage, and v…
fix(pnpr): validate OCI document format before collection and atomic …
feat(pnpr): settle Section A production readiness requirements (#17112)
zkochan commentedon Oct 19, 2026
Opened draft PR pnpm/pnpm#17126 covering Section B requirements (B4, B5, B6, B7):
${VAR}references instead of silently falling back to empty strings or random per-process keys. Added support for independentsecrets.cacheandsecrets.ociconfiguration for key rotation without cross-invalidation, and domain-separated HMAC-SHA256 subkeys derived fromsecret:.teamsManagedBy: apion non-npm registries and packageunpublishrules on Cargo and PyPI registries.publish = falseonpnpr/crates/pnpr/Cargo.tomlto prevent accidental crates.io publication.UserBackend,TokenBackend), no dynamic plugin runtime.feat(pnpr): harden secrets, derive subkeys, and validate ecosystems (#…
zkochan commentedon Oct 19, 2026
All requirements and audit findings for pnpr production readiness have now landed across the following pull requests:
Section A: Breaking Changes
/npm/,/cargo/,/pypi/,/v2///oci/) with root endpoints (/-/ping,/-/pnpr/,/-/whoami) (fix(resolving-npm-resolver): read the tarball name after the registry path pnpm#17086, feat(pnpr)!: serve every ecosystem under its own prefix pnpm#17087, fix(resolving-npm-resolver): decline a malformed escape in a tarball name pnpm#17089).layout.json,orgs/<org>/packages/<name>/) and persistedformatVersionacross all document types (packuments, crate documents, project documents, image documents, journals, revision indexes, staged records) rejecting newer formats (feat(pnpr)!: give the hosted store a layout with one place per thing pnpm#17100, feat(pnpr): settle Section A production readiness requirements pnpm#17112)./-/pnpr/v0/versioned endpoints, capability handshake, policy echo verification, and structured error reporting (feat(pnpr): settle Section A production readiness requirements pnpm#17112).pnpr servesubcommand andparse_cli_intervalfor duration flags (s/m/h/dand bare seconds) (feat(pnpr): settle Section A production readiness requirements pnpm#17112).tinias PID 1 in container images (feat(pnpr): settle Section A production readiness requirements pnpm#17112).Section B: Architecture
auth.admins, OIDC-bound accounts, workload identities, and SCIM-provisioned names (feat(pnpr): prevent self-registration of reserved usernames pnpm#17046, fix(pnpr): close gaps left in reserved-username registration pnpm#17073).$ownersaccess policy token, package/version tombstones under.tombstones/v0preventing squatting and version reuse (feat(pnpr): implement package ownership, maintainer model, and tombstones pnpm#17060).teamsManagedBy: apion non-npm registries and packageunpublishrules on Cargo/PyPI registries, with safe stored rule upgrades (feat(pnpr): harden secrets, derive subkeys, and validate ecosystems pnpm#17126).${VAR}in secret-bearing fields; independentsecrets.cacheandsecrets.ociconfigurations; domain-separated HMAC-SHA256 subkeys derived fromsecret:(feat(pnpr): harden secrets, derive subkeys, and validate ecosystems pnpm#17126).publish = falseonpnpr/crates/pnpr/Cargo.toml(feat(pnpr): harden secrets, derive subkeys, and validate ecosystems pnpm#17126).UserBackend,TokenBackend), no dynamic plugin runtime (feat(pnpr): harden secrets, derive subkeys, and validate ecosystems pnpm#17126).Section C: Production Features
/-/ready,/-/live, and/-/ping(feat(pnpr): support SIGTERM container shutdown and readiness probes pnpm#16934).Forwarded,X-Forwarded-For,X-Real-IP) bounded by CIDR-trusted proxies (feat(pnpr): support trusted proxies for client IP resolution pnpm#16939).Retry-After, pre-buffering authentication for publish requests, request timeouts, and publish/login semaphores (feat(pnpr): rate limits, request timeouts, and coalescing pnpm#16943)./metricsendpoint, request IDs, and structured access log (feat(pnpr): metrics, request IDs, and enriched access logging pnpm#16944)./-/npm/v1/security/auditsand/quick(feat(pnpr): support npm audit endpoints and osv bulk advisories pnpm#16950)./-/npm/v1/tokensendpoint supporting read-only, CIDR constraints, expiry, and name (feat(pnpr): support token creation, expiry, and read-only audit access pnpm#16954)./-/npm/v1/attestationsand/-/npm/v1/keyswith.sigstoreattachment support (feat(pnpr): support npm publish --provenance and attestation endpoints pnpm#16956).pnpr::auditlog events for user, team, rule, SCIM, and unpublish operations (feat(pnpr): admin audit log for user, rule, team, scim, and unpublish operations pnpm#16960).ETag,304 Not Modified,Vary: Accept, andCache-Controlon public packuments (feat(pnpr): add packument caching headers and conditional request support pnpm#16962)./-/v1/login,/start, and/pollCLI browser SSO flow (feat(pnpr): support login web flow for SSO pnpm#16969).pnpr config check,verify,export,migrate-storage(local-to-S3), and verdaccio htpasswd import (feat(pnpr): add maintenance tooling and verdaccio htpasswd support pnpm#17002).Section D: Audit Bugs
Section F: Documentation
pnprServersettings reference entries (docs(pnpr): document reverse-proxy and TLS setup, webhooks, lifecycle, and pnprServer pnpm#17013).