Skip to content

fix(resolver): honor offline mode during lockfile verification - #13671

Merged
zkochan merged 2 commits into
pnpm:mainfrom
scarab-systems:scarab-systems/pnpm-11801-offline-verification-cache
Aug 7, 2026
Merged

zkochan merged 2 commits into
pnpm:mainfrom
scarab-systems:scarab-systems/pnpm-11801-offline-verification-cache

Conversation

@scarab-systems

@scarab-systems scarab-systems commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Thread offline into lockfile resolution verification in both the TypeScript and Rust resolver stacks.
  • Make verifier metadata fetches use the local metadata mirror in offline mode, returning ERR_PNPM_NO_OFFLINE_META when required metadata is not cached.
  • Skip the attestation fallback while offline so --offline does not reach the registry during verification.

Fixes #11801.

Validation

  • cargo test -p pacquet-resolving-npm-resolver --lib
  • cargo test -p pacquet-package-manager build_resolution_verifiers --lib
  • pn --filter @pnpm/resolving.npm-resolver run test
  • pn --filter @pnpm/resolving.default-resolver run test
  • pn run compile-only
  • pn run lint --quiet
  • bash pnpm/scripts/pre-push-rust.sh

Disclosure

This PR was prepared with AI assistance under human direction and review. Agent/model: OpenAI Codex (GPT-5).


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Summary by CodeRabbit

  • New Features
    • Lockfile and tarball verification now support offline mode using cached registry metadata.
    • Offline resolution uses local package metadata and skips registry and attestation requests.
    • Cached full and abbreviated metadata can be used without network access.
  • Bug Fixes
    • Added a clear ERR_PNPM_NO_OFFLINE_META error when required metadata is unavailable locally.
    • Improved cached metadata recovery, retries, and handling of incomplete cache data.

Thread offline into the npm resolution verifier in both the TypeScript and
Rust stacks so lockfile verification reads cached metadata instead of
reaching the registry.

Return ERR_PNPM_NO_OFFLINE_META when the metadata mirror is cold.

Refs: pnpm#11801
@coderabbitai

coderabbitai Bot commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 9b745599-f29c-43b3-896a-e15b55c67d08

📥 Commits

Reviewing files that changed from the base of the PR and between 135be97 and 9092ffe.

📒 Files selected for processing (4)
  • .changeset/offline-lockfile-verification-cache.md
  • pnpm/crates/package-manager/src/build_resolution_verifiers/tests.rs
  • pnpm/crates/resolving-npm-resolver/src/create_npm_resolution_verifier.rs
  • pnpm/crates/resolving-npm-resolver/src/errors.rs
🚧 Files skipped from review as they are similar to previous changes (3)
  • pnpm/crates/resolving-npm-resolver/src/errors.rs
  • pnpm/crates/resolving-npm-resolver/src/create_npm_resolution_verifier.rs
  • .changeset/offline-lockfile-verification-cache.md

📝 Walkthrough

Walkthrough

The PR propagates offline mode through lockfile resolution verification. Metadata fetchers use local mirrors only, skip registry and attestation requests, and report ERR_PNPM_NO_OFFLINE_META when required metadata is absent.

Changes

Offline verification wiring

Layer / File(s) Summary
Verifier configuration and lookup propagation
pnpm/crates/package-manager/src/build_resolution_verifiers.rs, pnpm/crates/resolving-npm-resolver/src/create_npm_resolution_verifier.rs, pnpm/crates/resolving-npm-resolver/src/pick_package.rs, pnpm11/resolving/default-resolver/src/index.ts, pnpm11/resolving/npm-resolver/src/createNpmResolutionVerifier.ts
Offline configuration reaches Rust and TypeScript resolution verifiers, metadata lookups, published-at checks, and attestation handling.
Offline metadata cache behavior
pnpm/crates/resolving-npm-resolver/src/errors.rs, pnpm/crates/resolving-npm-resolver/src/fetch_full_metadata_cached.rs, pnpm11/resolving/npm-resolver/src/fetchFullMetadataCached.ts
Offline fetches read from the package mirror only. Missing metadata returns ERR_PNPM_NO_OFFLINE_META instead of contacting the registry.
Offline verification tests and release metadata
pnpm/crates/package-manager/src/build_resolution_verifiers/tests.rs, pnpm/crates/resolving-npm-resolver/src/fetch_full_metadata_cached/tests.rs, pnpm/crates/resolving-npm-resolver/src/create_npm_resolution_verifier/tests.rs, pnpm11/resolving/npm-resolver/test/*, .changeset/offline-lockfile-verification-cache.md
Tests cover cache hits, cache misses, successful tarball verification, and blocked registry requests. The changeset declares resolver minor releases and pacquet and pnpm patch releases.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant PackageManager
  participant ResolutionVerifier
  participant MetadataMirror
  participant Registry
  PackageManager->>ResolutionVerifier: pass offline configuration
  ResolutionVerifier->>MetadataMirror: request cached metadata
  MetadataMirror-->>ResolutionVerifier: return metadata or cache miss
  ResolutionVerifier-->>PackageManager: verify resolution or report ERR_PNPM_NO_OFFLINE_META
  ResolutionVerifier--x Registry: skip metadata and attestation requests
Loading

Assessment against linked issues

Objective Addressed Explanation
Prevent remote registry access during offline lockfile verification [#11801] ✅
Use cached metadata when offline metadata is available [#11801] ✅

Possibly related PRs

  • pnpm/pnpm#13014: Modifies the same cached metadata flow for cache-loss recovery.
  • pnpm/pnpm#13130: Modifies related cache-race tests in the Rust metadata fetch flow.
  • pnpm/pnpm#13512: Modifies npm metadata mirror handling and NO_OFFLINE_META behavior.

Suggested labels: product: pacquet, product: pnpm@11

Suggested reviewers: zkochan

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@scarab-systems
scarab-systems marked this pull request as ready for review August 6, 2026 04:25
@scarab-systems
scarab-systems requested a review from zkochan as a code owner August 6, 2026 04:25
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@greptile-apps

greptile-apps Bot commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains in the eligible follow-up scope.

No blocking failure remains.

Reviews (2): Last reviewed commit: "fix(resolver): preserve offline verifier..." | Re-trigger Greptile

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.changeset/offline-lockfile-verification-cache.md:
- Around line 2-3: Update the changeset entries for
`@pnpm/resolving.default-resolver` and `@pnpm/resolving.npm-resolver` from patch to
minor to reflect the newly exported offline verifier option.

In `@pnpm/crates/package-manager/src/build_resolution_verifiers/tests.rs`:
- Around line 61-65: Update the assertion in the offline metadata failure test
to require message.contains("ERR_PNPM_NO_OFFLINE_META") without accepting the
generic "Failed to resolve" fallback. If the stricter assertion fails, trace the
conversion producing ResolutionVerification::FetchFailed and preserve the
required error code in its message.

In `@pnpm/crates/resolving-npm-resolver/src/errors.rs`:
- Around line 24-30: Update the NoOfflineMeta display attribute in the error
definition to format pkg_mirror with its user-facing Display representation
instead of debug formatting, while preserving the existing message structure and
pkg_name handling.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 34435c6f-38ba-4020-9166-3f7b1bf18e5e

📥 Commits

Reviewing files that changed from the base of the PR and between b0e8194 and 135be97.

📒 Files selected for processing (14)
  • .changeset/offline-lockfile-verification-cache.md
  • pnpm/crates/package-manager/src/build_resolution_verifiers.rs
  • pnpm/crates/package-manager/src/build_resolution_verifiers/tests.rs
  • pnpm/crates/resolving-npm-resolver/src/create_npm_resolution_verifier.rs
  • pnpm/crates/resolving-npm-resolver/src/create_npm_resolution_verifier/tests.rs
  • pnpm/crates/resolving-npm-resolver/src/errors.rs
  • pnpm/crates/resolving-npm-resolver/src/fetch_full_metadata_cached.rs
  • pnpm/crates/resolving-npm-resolver/src/fetch_full_metadata_cached/tests.rs
  • pnpm/crates/resolving-npm-resolver/src/pick_package.rs
  • pnpm11/resolving/default-resolver/src/index.ts
  • pnpm11/resolving/npm-resolver/src/createNpmResolutionVerifier.ts
  • pnpm11/resolving/npm-resolver/src/fetchFullMetadataCached.ts
  • pnpm11/resolving/npm-resolver/test/createNpmResolutionVerifier.test.ts
  • pnpm11/resolving/npm-resolver/test/ifModifiedSince.test.ts

@github-actions

github-actions Bot commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: 9092ffe20055

Regular scenarios report direct and pnpr installs. The peer-heavy resolver scenario compares current Rust, main Rust, and TypeScript pnpm. Bencher consumes pacquet@HEAD and pnpr@HEAD.

The tables below show mean ± σ; Bencher thresholds on the minimum latency, which is far less perturbed by shared-runner contention (noise only adds time).

Scenario: Isolated linker: fresh restore, cold cache + cold store

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.521 ± 0.151 2.348 2.731 1.66 ± 0.16
pacquet@main 2.533 ± 0.187 2.345 2.782 1.67 ± 0.18
pnpr@HEAD 1.519 ± 0.116 1.362 1.681 1.00
pnpr@main 1.528 ± 0.192 1.354 1.794 1.01 ± 0.15
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.52085067738,
      "stddev": 0.15131986940501826,
      "median": 2.4683413000799996,
      "user": 1.6937981999999998,
      "system": 1.3600530199999998,
      "min": 2.3478249070799997,
      "max": 2.73075381408,
      "times": [
        2.37357307508,
        2.67584944208,
        2.44064846108,
        2.6176789770799997,
        2.46314090508,
        2.36381880108,
        2.3478249070799997,
        2.72167669608,
        2.4735416950799998,
        2.73075381408
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.53298633998,
      "stddev": 0.18705474723755763,
      "median": 2.51494222208,
      "user": 1.6670734999999997,
      "system": 1.3313983200000001,
      "min": 2.34501506208,
      "max": 2.78170407508,
      "times": [
        2.34836303708,
        2.3550634970799997,
        2.68862908908,
        2.63144576008,
        2.34501506208,
        2.77680872408,
        2.78170407508,
        2.64112589208,
        2.36326957908,
        2.39843868408
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.51931043558,
      "stddev": 0.1157752764534655,
      "median": 1.53539592608,
      "user": 1.2351212,
      "system": 1.15820342,
      "min": 1.36234800608,
      "max": 1.6814869910799999,
      "times": [
        1.6814869910799999,
        1.67271607608,
        1.38700271708,
        1.48686123808,
        1.57007474108,
        1.56633625108,
        1.58002527608,
        1.36234800608,
        1.50445560108,
        1.3817974580799999
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.5275593244799999,
      "stddev": 0.1916623186204676,
      "median": 1.4193219210799999,
      "user": 1.2209073999999998,
      "system": 1.15233882,
      "min": 1.3544805820799999,
      "max": 1.79444371308,
      "times": [
        1.79444371308,
        1.3835182020799999,
        1.4234455020799999,
        1.78455023308,
        1.3634357450799999,
        1.41519834008,
        1.3544805820799999,
        1.38065802208,
        1.58991451608,
        1.78594838908
      ]
    }
  ]
}

Scenario: Isolated linker: fresh restore, hot cache + hot store

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 270.1 ± 19.6 250.2 312.0 1.04 ± 0.08
pacquet@main 258.9 ± 6.1 250.0 268.7 1.00
pnpr@HEAD 272.6 ± 7.4 263.1 286.6 1.05 ± 0.04
pnpr@main 273.8 ± 5.9 266.3 285.4 1.06 ± 0.03
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.2701402065199999,
      "stddev": 0.019632315207896676,
      "median": 0.26204871801999996,
      "user": 0.22365939999999998,
      "system": 0.52012146,
      "min": 0.25023699852,
      "max": 0.31196249552,
      "times": [
        0.25907503452,
        0.26009898052,
        0.26070839852,
        0.25592918652,
        0.27020560952,
        0.26338903752,
        0.25023699852,
        0.27208693152,
        0.29770939252,
        0.31196249552
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.25885751112,
      "stddev": 0.0060506809922742915,
      "median": 0.25835592602,
      "user": 0.1926011,
      "system": 0.5242822599999999,
      "min": 0.25003710352,
      "max": 0.26872675752,
      "times": [
        0.25681214352,
        0.25989970852,
        0.26189524652,
        0.26872675752,
        0.25003710352,
        0.26551912652,
        0.25257708652,
        0.25587525552,
        0.25377039052,
        0.26346229252000003
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.27256150492000003,
      "stddev": 0.007378082892579566,
      "median": 0.27274941302,
      "user": 0.2041622,
      "system": 0.52693196,
      "min": 0.26305823352,
      "max": 0.28661456152,
      "times": [
        0.27059513352000003,
        0.27031885552,
        0.27746142952,
        0.26498634752,
        0.26305823352,
        0.26429239852,
        0.27807906752,
        0.27490369252,
        0.27530532952000003,
        0.28661456152
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.27379528492,
      "stddev": 0.005895723876146019,
      "median": 0.27304448352,
      "user": 0.2049464,
      "system": 0.52055336,
      "min": 0.26631388452,
      "max": 0.28540293252,
      "times": [
        0.28540293252,
        0.27824545952,
        0.26631388452,
        0.26886957652,
        0.27210914552,
        0.26693469052,
        0.27765606352,
        0.27675521952,
        0.27168605552,
        0.27397982152
      ]
    }
  ]
}

Scenario: Isolated linker: fresh install, cold cache + cold store

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.590 ± 0.013 2.573 2.620 1.56 ± 0.14
pacquet@main 2.590 ± 0.022 2.560 2.642 1.56 ± 0.14
pnpr@HEAD 1.661 ± 0.149 1.444 1.845 1.00
pnpr@main 1.678 ± 0.140 1.445 1.818 1.01 ± 0.12
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.5899989716999996,
      "stddev": 0.012977760296426971,
      "median": 2.5909059868,
      "user": 1.6649088799999998,
      "system": 1.3564266000000003,
      "min": 2.5733402153,
      "max": 2.6203965033000003,
      "times": [
        2.5871317553,
        2.5777663693000004,
        2.5793082243,
        2.5924107343,
        2.5935550553,
        2.6203965033000003,
        2.5733402153,
        2.5926381413,
        2.5940414793,
        2.5894012393000003
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.5898017548000007,
      "stddev": 0.021905676231107132,
      "median": 2.5872808783,
      "user": 1.6619036800000004,
      "system": 1.3490946000000001,
      "min": 2.5601391683,
      "max": 2.6421214343000003,
      "times": [
        2.5888565283,
        2.6046179283,
        2.5873789173,
        2.5820071203,
        2.5871828393,
        2.5916170363,
        2.5601391683,
        2.5707627793000003,
        2.6421214343000003,
        2.5833337963000003
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.6607466959000003,
      "stddev": 0.1493605938975842,
      "median": 1.6274895858,
      "user": 1.22948208,
      "system": 1.1752807,
      "min": 1.4442237603,
      "max": 1.8451540753000002,
      "times": [
        1.8045933393000002,
        1.8312718323000001,
        1.5845032353000001,
        1.8451540753000002,
        1.5912290303,
        1.6637501413,
        1.4442237603,
        1.5480127003000002,
        1.4950548283000002,
        1.7996740163
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.6775478790999998,
      "stddev": 0.13975731409248285,
      "median": 1.7456126738000002,
      "user": 1.2298873799999996,
      "system": 1.153333,
      "min": 1.4451928073000002,
      "max": 1.8177829043,
      "times": [
        1.5993955823000001,
        1.7443962453000001,
        1.4451928073000002,
        1.7468291023,
        1.8017213983000002,
        1.6349868663000002,
        1.7727821543000002,
        1.8177829043,
        1.4476468873000001,
        1.7647448433000001
      ]
    }
  ]
}

Scenario: Isolated linker: fresh install, hot cache + hot store

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 392.5 ± 16.2 368.1 422.3 1.30 ± 0.06
pacquet@main 395.4 ± 23.5 367.1 432.6 1.31 ± 0.08
pnpr@HEAD 308.0 ± 9.2 295.5 322.4 1.02 ± 0.04
pnpr@main 302.6 ± 7.6 292.2 315.0 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.39246513102,
      "stddev": 0.016249026528731936,
      "median": 0.39131140622000005,
      "user": 0.49800787999999996,
      "system": 0.7124261799999999,
      "min": 0.36810769322000003,
      "max": 0.42227726822000006,
      "times": [
        0.38318103822000005,
        0.39352395922000005,
        0.36810769322000003,
        0.39329821922,
        0.42227726822000006,
        0.39020766422000003,
        0.41688238422000007,
        0.39241514822000007,
        0.38323267922000004,
        0.38152525622000005
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.3954461532200001,
      "stddev": 0.023485594862252854,
      "median": 0.38529369272,
      "user": 0.51725708,
      "system": 0.69385958,
      "min": 0.36709762622000003,
      "max": 0.43264110822000007,
      "times": [
        0.36709762622000003,
        0.40304170322000005,
        0.42793224722000006,
        0.43264110822000007,
        0.38218121622000006,
        0.38435599322,
        0.38623139222,
        0.41849824622000004,
        0.37388735422,
        0.37859464522
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.30796131872000004,
      "stddev": 0.00915238164268235,
      "median": 0.30522407922000006,
      "user": 0.21449948000000002,
      "system": 0.49262718000000005,
      "min": 0.29552103422000003,
      "max": 0.32241241922,
      "times": [
        0.30213777522,
        0.29987043022000004,
        0.30249449322000005,
        0.32241241922,
        0.32239974722000003,
        0.30473579922000005,
        0.29552103422000003,
        0.30571235922000006,
        0.31122303922000005,
        0.31310609022
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.30260212962,
      "stddev": 0.0075895398433046025,
      "median": 0.30298602922000006,
      "user": 0.19963328,
      "system": 0.50644598,
      "min": 0.29224964322,
      "max": 0.31501469722000003,
      "times": [
        0.29224964322,
        0.30953819322000004,
        0.29636615722000004,
        0.30220245522000005,
        0.29424339922000003,
        0.30996135022000004,
        0.29678695922000004,
        0.30588883822,
        0.31501469722000003,
        0.30376960322
      ]
    }
  ]
}

Scenario: Isolated linker: fresh install, cold cache + hot store

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.722 ± 0.009 1.704 1.732 5.72 ± 0.14
pacquet@main 1.716 ± 0.006 1.707 1.728 5.70 ± 0.14
pnpr@HEAD 0.311 ± 0.021 0.295 0.359 1.03 ± 0.07
pnpr@main 0.301 ± 0.007 0.292 0.311 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.7218473847200002,
      "stddev": 0.009194712474494994,
      "median": 1.7234967383200002,
      "user": 0.7133474,
      "system": 0.7683343200000001,
      "min": 1.70386603332,
      "max": 1.7324761843199998,
      "times": [
        1.73012184532,
        1.70386603332,
        1.7241196463200001,
        1.71612384732,
        1.72011045632,
        1.72839525632,
        1.7110890103199998,
        1.72929773732,
        1.72287383032,
        1.7324761843199998
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.71631604152,
      "stddev": 0.006437490165573231,
      "median": 1.71414777232,
      "user": 0.6886548,
      "system": 0.7803077199999999,
      "min": 1.70691093832,
      "max": 1.7279386483199999,
      "times": [
        1.71369773432,
        1.7120755563199999,
        1.7279386483199999,
        1.71831556332,
        1.72484689532,
        1.70691093832,
        1.71985282932,
        1.71420593932,
        1.7140896053199999,
        1.71122670532
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.3110851171200001,
      "stddev": 0.021233867424039564,
      "median": 0.30205191432,
      "user": 0.1949295,
      "system": 0.53108752,
      "min": 0.29466243232,
      "max": 0.35941766632,
      "times": [
        0.35941766632,
        0.33817474832,
        0.29840322832,
        0.31310679232,
        0.29972339832,
        0.29640952132000004,
        0.29868558132,
        0.30788737232,
        0.29466243232,
        0.30438043032
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.30112117142000006,
      "stddev": 0.007268115798578296,
      "median": 0.29845837532,
      "user": 0.1929711,
      "system": 0.5165625200000001,
      "min": 0.29207399732,
      "max": 0.31135179732,
      "times": [
        0.29999066532,
        0.30631558232,
        0.29635899832,
        0.31068989932,
        0.29692608532000003,
        0.31135179732,
        0.29472489932,
        0.30801402632,
        0.29476576332000004,
        0.29207399732
      ]
    }
  ]
}

Scenario: Isolated linker: fresh resolve, hot cache, offline

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 179.7 ± 4.7 172.6 188.3 1.99 ± 0.08
pacquet@main 182.0 ± 3.3 176.5 188.1 2.01 ± 0.07
pnpr@HEAD 90.4 ± 2.6 86.0 96.3 1.00
pnpr@main 90.7 ± 2.4 86.7 97.6 1.00 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.17973717912000003,
      "stddev": 0.004682588953297766,
      "median": 0.17877758612,
      "user": 0.1608448525,
      "system": 0.08671683499999999,
      "min": 0.17259524612000002,
      "max": 0.18825568812000001,
      "times": [
        0.17853246912,
        0.18040905112000002,
        0.17391302812,
        0.17259524612000002,
        0.17844555012000002,
        0.18626297312,
        0.17943862312000003,
        0.18416522912000002,
        0.18733882712000002,
        0.17697996312000003,
        0.17902270312000002,
        0.17563675212000002,
        0.18825568812000001,
        0.18156183612000001,
        0.17644607312000002,
        0.17679085312
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.18200056998666667,
      "stddev": 0.00328086825136988,
      "median": 0.18154499112000003,
      "user": 0.1611530066666667,
      "system": 0.08680956000000001,
      "min": 0.17647676112000002,
      "max": 0.18806110612000002,
      "times": [
        0.18451404212000003,
        0.18369596612000003,
        0.17940320812000002,
        0.18103215712,
        0.18129898712000003,
        0.18806110612000002,
        0.18575064112000003,
        0.17876682712000003,
        0.18268212912,
        0.18609652812000002,
        0.18319972612000002,
        0.18154499112000003,
        0.17647676112000002,
        0.17789051312,
        0.17959496612
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.0904192143135484,
      "stddev": 0.0026170551517019328,
      "median": 0.09045559112,
      "user": 0.020645539999999997,
      "system": 0.01211028387096774,
      "min": 0.08599065412,
      "max": 0.09630000112,
      "times": [
        0.09045559112,
        0.09122780211999999,
        0.09099833012,
        0.08799747312,
        0.09451006412,
        0.09562382112,
        0.08980801112,
        0.09102859112,
        0.09158139612,
        0.09173517912,
        0.09630000112,
        0.09250645212,
        0.08889296712,
        0.09231747012,
        0.08967713512,
        0.08788950712,
        0.09048661412,
        0.08923915012,
        0.08870735812,
        0.08850997412,
        0.08908821112,
        0.09011428812,
        0.09523711812,
        0.08815034112,
        0.08769066512,
        0.08656233112,
        0.09107308712,
        0.09052241312,
        0.08599065412,
        0.08662004712,
        0.09245359912
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.09074968279741935,
      "stddev": 0.0024269036971738744,
      "median": 0.09075390712,
      "user": 0.020017410967741938,
      "system": 0.012818734193548387,
      "min": 0.08669532612,
      "max": 0.09764649712,
      "times": [
        0.09020393712,
        0.09060367912,
        0.09030087012,
        0.09719411711999999,
        0.09216968412,
        0.09083311012,
        0.08850920512,
        0.08887758712,
        0.08749066211999999,
        0.09141435912,
        0.09309952212,
        0.09391723112,
        0.09010244012,
        0.08669532612,
        0.09181101812,
        0.09137889812,
        0.09149203512,
        0.08941936212,
        0.09111708312,
        0.09127636712,
        0.08817473312,
        0.08865850212,
        0.09141335212,
        0.08754876312,
        0.09067313212,
        0.09086272912,
        0.09139492412,
        0.09764649712,
        0.08831107712,
        0.08989605512,
        0.09075390712
      ]
    }
  ]
}

Scenario: Isolated linker: peer-heavy resolve, hot cache, offline

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 932.2 ± 331.7 491.5 1528.2 1.12 ± 0.47
pacquet@main 834.3 ± 191.0 524.6 1121.6 1.00
pnpm@HEAD 2965.4 ± 187.5 2826.0 3450.5 3.55 ± 0.84
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.93215185758,
      "stddev": 0.33167571698137266,
      "median": 0.8614193855800001,
      "user": 0.866554851111111,
      "system": 0.23949103111111109,
      "min": 0.49151029658000006,
      "max": 1.52820888958,
      "times": [
        1.23828975958,
        0.77492990758,
        1.10738174858,
        0.49151029658000006,
        1.0167891755799998,
        1.52820888958,
        0.8396193355800001,
        0.53121821958,
        0.8614193855800001
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.8342662760244445,
      "stddev": 0.19103319822152148,
      "median": 0.8208277555800001,
      "user": 0.7791048511111112,
      "system": 0.20109092000000003,
      "min": 0.5245821685800001,
      "max": 1.12158532958,
      "times": [
        1.0569478345799999,
        0.7211139695800001,
        1.12158532958,
        0.89985517558,
        0.7090323235800001,
        0.9513977885800001,
        0.8208277555800001,
        0.5245821685800001,
        0.7030541385800001
      ]
    },
    {
      "command": "pnpm@HEAD",
      "mean": 2.9654086395799997,
      "stddev": 0.18746528212070507,
      "median": 2.90153377458,
      "user": 4.187693851111111,
      "system": 0.33664991999999994,
      "min": 2.82603123558,
      "max": 3.45053857858,
      "times": [
        2.89167995758,
        3.45053857858,
        2.97063520258,
        2.97297580558,
        2.82603123558,
        2.8805648325799997,
        2.90153377458,
        2.90977517058,
        2.88494319858
      ]
    }
  ]
}

Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.549 ± 0.123 4.424 4.722 1.28 ± 0.05
pacquet@main 4.534 ± 0.146 4.430 4.843 1.28 ± 0.06
pnpr@HEAD 3.577 ± 0.139 3.449 3.855 1.01 ± 0.05
pnpr@main 3.552 ± 0.103 3.457 3.798 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.548601193279999,
      "stddev": 0.12322037500368095,
      "median": 4.5015754143799995,
      "user": 1.85099554,
      "system": 1.45033338,
      "min": 4.42398966538,
      "max": 4.72230185738,
      "times": [
        4.47530728138,
        4.450176475379999,
        4.445693416379999,
        4.42398966538,
        4.52784354738,
        4.70768757638,
        4.569668367379999,
        4.72230185738,
        4.44578692538,
        4.71755682038
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.53406622138,
      "stddev": 0.14599999996770027,
      "median": 4.456329392879999,
      "user": 1.8542944400000003,
      "system": 1.4209516799999997,
      "min": 4.4297102513799995,
      "max": 4.843230398379999,
      "times": [
        4.74042535438,
        4.843230398379999,
        4.43552670638,
        4.43878562638,
        4.5179615673799995,
        4.4561657513799995,
        4.43836011638,
        4.58400340738,
        4.456493034379999,
        4.4297102513799995
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.5769417588799994,
      "stddev": 0.13916333477893666,
      "median": 3.53021753088,
      "user": 1.35219014,
      "system": 1.23945538,
      "min": 3.4489078663800004,
      "max": 3.8549886163800005,
      "times": [
        3.47194598438,
        3.4581541323800002,
        3.8549886163800005,
        3.4693740123800003,
        3.6239551763800004,
        3.50184153638,
        3.62096258538,
        3.7606941533800002,
        3.4489078663800004,
        3.55859352538
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 3.5523070428800003,
      "stddev": 0.10300059862283417,
      "median": 3.5269517768800003,
      "user": 1.29561584,
      "system": 1.29047368,
      "min": 3.45667199838,
      "max": 3.79775193638,
      "times": [
        3.64818550438,
        3.45667199838,
        3.47986782738,
        3.46508352138,
        3.79775193638,
        3.50765418138,
        3.53847743238,
        3.5312613773800003,
        3.52264217638,
        3.5754744733800004
      ]
    }
  ]
}

@github-actions

github-actions Bot commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpnpm's project
Branchpr/13671
Testbedpacquet
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
milliseconds (ms)
(Result Δ%)
Upper Boundary
milliseconds (ms)
(Limit %)
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
🚷 view threshold
2,573.34 ms
(-5.08%)Baseline: 2,711.01 ms
3,253.22 ms
(79.10%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
1,703.87 ms
(-6.42%)Baseline: 1,820.78 ms
2,184.94 ms
(77.98%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
368.11 ms
(-20.42%)Baseline: 462.54 ms
555.05 ms
(66.32%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
172.60 ms
(-18.96%)Baseline: 212.99 ms
255.58 ms
(67.53%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,347.82 ms
(-4.14%)Baseline: 2,449.10 ms
2,938.92 ms
(79.89%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,423.99 ms
(-1.92%)Baseline: 4,510.63 ms
5,412.76 ms
(81.73%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
250.24 ms
(-15.33%)Baseline: 295.55 ms
354.66 ms
(70.56%)
isolated-linker.peer-heavy-resolve.hot-cache.offline📈 view plot
🚷 view threshold
491.51 ms
(-32.44%)Baseline: 727.48 ms
872.97 ms
(56.30%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

github-actions Bot commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpnpm's project
Branchpr/13671
Testbedpnpr

⚠️ WARNING: No Threshold found!

Without a Threshold, no Alerts will ever be generated.

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds flag.

Click to view all benchmark results
BenchmarkLatencymilliseconds (ms)
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,444.22 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
294.66 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
295.52 ms
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
⚠️ NO THRESHOLD
85.99 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,362.35 ms
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
⚠️ NO THRESHOLD
3,448.91 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
263.06 ms
🐰 View full continuous benchmarking report in Bencher

Keep ERR_PNPM_NO_OFFLINE_META visible after FetchFailed conversion.

Align Rust offline cache-miss path formatting with the TypeScript resolver.

Tighten the package-manager verifier test to require the diagnostic code.

Update resolver changesets to minor for the exported offline verifier option.

Validation:

- cargo test -p pacquet-resolving-npm-resolver --lib

- cargo test -p pacquet-package-manager build_resolution_verifiers --lib

- bash pnpm/scripts/pre-push-rust.sh

- pnpm run lint --quiet
@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Aug 6, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.88889% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.08%. Comparing base (34347bc) to head (9092ffe).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...npm-resolver/src/create_npm_resolution_verifier.rs 81.25% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #13671   +/-   ##
=======================================
  Coverage   88.08%   88.08%           
=======================================
  Files         608      608           
  Lines       99033    99058   +25     
=======================================
+ Hits        87231    87260   +29     
+ Misses      11802    11798    -4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@zkochan
zkochan merged commit 745924b into pnpm:main Aug 7, 2026
37 checks passed
@scarab-systems
scarab-systems deleted the scarab-systems/pnpm-11801-offline-verification-cache branch August 7, 2026 15:13
scarab-systems added a commit to scarab-systems/scarab-systems that referenced this pull request Aug 7, 2026
Reflect pnpm/pnpm#13671 in the visible Scarab Systems profile README and update merged contribution counts to 20.
scarab-systems added a commit to scarab-systems/scarab-field-lab that referenced this pull request Aug 7, 2026
Record pnpm/pnpm#13671 as the accepted repair for pnpm/pnpm#11801 and update Field Lab contribution counts to 20 merged public open-source contributions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--offline doesn't stop pnpm from verifying lockfile with remote registry

3 participants