Skip to content

test: failures on many unrelated PRs - registry-mock regression from #12747 #12771

Description

@astegmaier

The TS test suite is broken on main — many (all?) open PRs are red

Since #12747 merged (72b1927856, 2026‑07‑02), the TS test suite fails for many (possibly all?) PRs rebased onto main, in a way that appears unrelated to what the PR changes. The failures are in the test registry-mock.

Examples (all unrelated PRs, all failing the same way):

What the failure looks like

Two distinct symptoms, both from the mock registry.

1. Publishing a dist-tag to a proxied package is rejected (test/update/interactive.ts):

Failed to set dist-tag "latest" on package: 400 Bad Request.
Bad request: cannot publish "is-negative" to the path-less base:
it routes to an upstream registry; name a hosted mount
  at setDistTag (../../registry-access/client/src/setDistTag.ts:46:9)
  at addDistTag (../../testing/registry-mock/src/index.ts:49:3)
  at Object.<anonymous> (test/update/interactive.ts:79:3)

2. A scoped name that isn't a seeded fixture now 404s (test/update/recursive.ts):

GET http://localhost:<port>/@zkochan%2Fasync-regex-replace: Not Found - 404
  at RetryOperation._fn (../../resolving/npm-resolver/src/fetch.ts:169:16)

Both reproduce locally after building the current pnpr/pnpr-prepare and running e.g. installing/commands' jest.

Blast radius: the ubuntu chunk only runs installing/commands (2 files). The Windows chunks run pnpm/test and surface ~25+ failing files — publish/*, unpublish, dist-tag, deprecate, dlx, store/*, search, patch*, lockfile, install/*, update/*, … i.e. everything that publishes to, or reads an unseeded name from, the mock.


Root cause (AI-generated)

#12747 switched pnpr to the single-origin mount model: one declared origin per package, no cross-origin fall-through, and writes only to hosted mounts. The test registry's config.yaml (pnpr/crates/pnpr/config.yaml) previously carried a ** package policy with proxy: npmjs and publish: $authenticated, which let the JS tests do two things that are no longer possible:

  • Overlay dist-tags/publishes onto upstream-proxied packages. addDistTag({ package: 'is-negative', ... }) targets the path-less base, which now routes to the npmjs upstream mount; resolve_publish_target (pnpr/crates/pnpr/src/server.rs:2269) rejects it. is-negative/is-positive/micromatch/foo/lodash/es5-ext/es6-iterator aren't seeded fixtures — only create-touch-file-one-bin and 8 @… scopes are in pnpr/.fixtures/packages.
  • Proxy reads for unseeded scoped names. The new main router sends whole scopes (@zkochan/*, @scoped/*, …) to the local hosted mount, but only some names in each are seeded. @zkochan/ seeds only test-pnpm-issue219, so @zkochan/async-regex-replace 404s with no fall-through to npmjs.

The #12747 commit message states "registry-mock keeps working with no task or seed changes" — that's the incorrect assumption.

Why CI didn't catch it (AI-generated)

  • The ts paths-filter in .github/workflows/ci.yml watches pnpm11/** and root tooling but not pnpr/**. feat(pnpr): registry mounts as the only routing model (RFC pnpm/rfcs#13) #12747 changed only pnpr/** (+ a pacquet benchmark), so ts=false and the whole TS test matrix was skipped — even though those JS tests build and run the pnpr binary against config.yaml at runtime.
  • The TS CI / Success gate treats skipped deps as a pass, so the required check went green with zero tests run. Post-merge push CI on main uses the same filter, so main stayed green too.

Suggested fixes (AI-generated)

  1. CI blind spot (small, do regardless): add pnpr/** to the ts paths-filter so pnpr-only PRs actually run the JS tests that exercise pnpr. This surfaces the regression; it doesn't fix it.
  2. Registry-mock behavior (the actual fix): either seed the real packages (is-negative, is-positive, micromatch, lodash, es5-ext, es6-iterator, foo, @zkochan/async-regex-replace, …) as local hosted fixtures with the version sets the tests expect and narrow the local routes to only-seeded names (unseeded scoped names then proxy npmjs) — or reintroduce a supported way to publish overlays on the default target. The former fits the RFC's hermetic intent; the latter is a design call.

Related: #12747, RFC pnpm/rfcs#13, #12767.

Written by an agent (GitHub Copilot CLI, claude-opus-4.8).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions