You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pnpm run re-resolves the lockfile, poisoning the Docker test context #26
Any pnpm run <script> in this workspace rewrites pnpm-lock.yaml before the script body executes, adding ~1610 rotating ms-feed-N.pkgs.visualstudio.com tarball URLs to entries that were recorded host-free.
Main reproduces identically at 1602 entries (it has fewer packages). A pnpm install --frozen-lockfile immediately beforehand does not prevent it.
Why it now matters
Previously this was invisible local churn — you stripped before committing and moved on. With the mountless Docker harness (#25) it becomes a hard failure:
pnpm test is itself a pnpm run, so it poisons the lockfile;
docker build copies the working tree, carrying the poisoned lockfile into the context;
the in-image pnpm install --frozen-lockfile runs the supply-chain policy check and rejects it with ERR_PNPM_TARBALL_URL_MISMATCH, ~1198 entries.
The image build fails before any test runs. pnpm test — documented in docs/testing-in-docker.md as "the only supported way to run the monorepo test graph" — cannot succeed on a warm checkout.
Workaround
Bypassing pnpm's script runner keeps the context clean and the full graph passes 15/15:
Have docker-test.mjs build its context from git archive HEAD rather than the working tree — the committed lockfile is host-free by policy, and this also makes the harness independent of local dirt.
Or strip hosts into the build context as a wrapper step.
CI is green on main, so whatever triggers the re-resolution appears specific to a warm local store/metadata cache against the rotating 1ES shards. That difference is not currently understood.
Not investigated
which pnpm 11.17 mechanism re-resolves on pnpm run (no verifyDepsBeforeRun is configured);
why CI does not hit it, given the same pnpm version and registry.
No install was asked for and no manifest changed — pnpm exec re-resolved and wrote the rotating ms-feed-N hosts back, exactly as pnpm run does. git checkout -- pnpm-lock.yaml restores it.
Two consequences worth folding in:
The workaround "call the script directly with node" only covers pnpm run. Anything routed through pnpm that can touch the store appears to re-resolve, so pnpm exec turbo … needs the same treatment or the same guard.
It is easy to commit the damage without noticing, because the poisoned lockfile does not fail the run that caused it — it fails the next install, in whatever context that happens to be.
For what it is worth, pnpm install --frozen-lockfile did not poison the file in the same session, so --frozen-lockfile still looks like the safe path.
What I have been doing, which might be worth putting in the workaround section: capture grep -c 'tarball:' pnpm-lock.yaml before and after any pnpm invocation and git checkout -- pnpm-lock.yaml if it moved. That caught it here before it reached a commit.
Resolved by #73 and #77. pnpm-workspace.yaml now prevents pnpm run from performing an implicit install, and .pnpmfile.cjs strips rotating shard hosts whenever the lockfile is written. The full workspace check passes without changing pnpm-lock.yaml.
Activity
feat: add pluggable local inference backends (#25)
feat(release): build signed, notarized macOS DMGs from a tag (#30)
stuffbucket commentedon Sep 2, 2026
pnpm execdoes it too, so the stated workaround is narrower than the behaviourHit this while working on the release pipeline. The title and the workaround both say
pnpm run, but the trigger is not therunsubcommand.Reproduced on a clean tree at
9a952c9:No install was asked for and no manifest changed —
pnpm execre-resolved and wrote the rotatingms-feed-Nhosts back, exactly aspnpm rundoes.git checkout -- pnpm-lock.yamlrestores it.Two consequences worth folding in:
node" only coverspnpm run. Anything routed through pnpm that can touch the store appears to re-resolve, sopnpm exec turbo …needs the same treatment or the same guard.For what it is worth,
pnpm install --frozen-lockfiledid not poison the file in the same session, so--frozen-lockfilestill looks like the safe path.What I have been doing, which might be worth putting in the workaround section: capture
grep -c 'tarball:' pnpm-lock.yamlbefore and after any pnpm invocation andgit checkout -- pnpm-lock.yamlif it moved. That caught it here before it reached a commit.fix(electron): let verify:exports run outside CI (#46)
fix(pnpm): stop `pnpm run` from re-poisoning the lockfile
stuffbucket commentedon Sep 7, 2026
Resolved by #73 and #77.
pnpm-workspace.yamlnow preventspnpm runfrom performing an implicit install, and.pnpmfile.cjsstrips rotating shard hosts whenever the lockfile is written. The full workspace check passes without changingpnpm-lock.yaml.