Skip to content

fix(self-update): store the resolved pnpm pin as the packageManagerDependencies specifier - #12992

Merged
zkochan merged 3 commits into
mainfrom
fix-update-lockfile-job
Jul 14, 2026
Merged

zkochan merged 3 commits into
mainfrom
fix-update-lockfile-job

Conversation

@zkochan

@zkochan zkochan commented Jul 14, 2026 •

Copy link
Copy Markdown
Member

Summary

pnpm self-update <dist-tag> (e.g. next-12) resolved the tag to an exact version and wrote that exact version into devEngines.packageManager.version, but recorded the raw dist-tag as the packageManagerDependencies specifier in pnpm-lock.yaml. The lockfile specifier then no longer matched the manifest pin.

Because pacquet validates the packageManagerDependencies specifier under --frozen-lockfile (it derives the expected specifier from the manifest via package_manager_to_sync), the mismatch made a later frozen install fail with FrozenLockfileOutdated ("the lockfile is not up to date"). This is how the daily update-lockfile job produced an invalid lockfile in #12989, which had to be hot-fixed by hand in #12990.

The TypeScript CLI is unaffected — its self-update derives the specifier from the resolved version, so this is a pacquet-only correctness bug and a parity divergence.

Both self-update call sites now record the resolved pin instead of the CLI argument:

  • project-pin path stores the updated devEngines constraint (the value a later install reads back), via a new package_manager_pin_specifier helper — exact for exact/legacy pins, preserved range for range pins;
  • global-switch path stores the resolved version.

Related to #12989, #12990.

Squash Commit Body

`pnpm self-update <dist-tag>` resolved the tag to an exact version and wrote it
into devEngines.packageManager.version, but recorded the raw dist-tag as the
packageManagerDependencies specifier in pnpm-lock.yaml. pacquet validates that
specifier against the manifest under --frozen-lockfile, so the mismatch made a
later frozen install fail with FrozenLockfileOutdated (the cause of the invalid
lockfile in pnpm/pnpm#12989, hot-fixed in pnpm/pnpm#12990).

Both self-update call sites now record the resolved pin: the project-pin path
stores the updated devEngines constraint (the value a later install reads back)
via a new package_manager_pin_specifier helper, and the global-switch path
stores the resolved version. The TypeScript CLI already derived the specifier
from the resolved version and is unaffected.

Checklist

  • The change is implemented in both the TypeScript CLI and the Rust pnpm/ port, or the description notes what still needs porting.
  • Added a changeset (pnpm changeset) if this PR changes any published package. Keep it short and written for pnpm users — it becomes a release note.
  • Added or updated tests.
  • Updated the documentation if needed.

Written by an agent (Claude Code, claude-opus-4-8).

Summary by CodeRabbit

  • Bug Fixes
    • Fixed pnpm self-update <dist-tag> to record the correct resolved package manager version (or pin range style) into packageManagerDependencies, preventing pnpm-lock.yaml drift and avoiding --frozen-lockfile failures.
    • Improved consistency between the updated project pin and what future installs accept, including prerelease and legacy packageManager pin scenarios.
  • Tests
    • Added regression coverage for prerelease resolved versions, preserved range pins, legacy exact-version behavior, and behavior when no prior constraint exists.

…pendencies specifier

`pnpm self-update <dist-tag>` (e.g. `next-12`) resolved the tag to an exact
version and wrote that exact version into `devEngines.packageManager.version`,
but recorded the raw dist-tag as the `packageManagerDependencies` specifier in
`pnpm-lock.yaml`. The specifier then no longer matched the manifest pin.

Because pacquet validates the `packageManagerDependencies` specifier under
`--frozen-lockfile` (deriving the expected specifier from the manifest via
`package_manager_to_sync`), the mismatch made a later frozen install fail with
`FrozenLockfileOutdated`. This is how the update-lockfile job produced an
invalid lockfile in #12989, hot-fixed by hand in #12990. The
TypeScript CLI is unaffected: its self-update derives the specifier from the
resolved version.

Both self-update call sites now record the resolved pin instead of the CLI
argument: the project-pin path stores the updated `devEngines` constraint (the
value a later install reads back) via a new `package_manager_pin_specifier`
helper, and the global-switch path stores the resolved version.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings July 14, 2026 01:14

@greptile-apps greptile-apps 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.

zkochan has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

No new commits to review since the last review.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 87af3adb-283b-437c-be06-33cbb008dde8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

pnpm self-update now computes package-manager pin specifiers from the resolved version and existing pin style before synchronizing dependencies. Tests cover prerelease, range, legacy, and missing-constraint cases, with a changeset documenting the lockfile correction.

Changes

Self-update pin synchronization

Layer / File(s) Summary
Compute and persist package-manager pin specifiers
pnpm/crates/cli/src/cli_args/self_update.rs
The self-update flow removes the CLI dist-tag from project-pin updates, computes a resolved or constraint-based pin_specifier, and uses it when synchronizing package-manager dependencies.
Regression coverage and release metadata
pnpm/crates/cli/src/cli_args/self_update/tests.rs, .changeset/pacquet-self-update-pin-specifier.md
Tests cover prerelease, range, legacy, and missing-constraint pins; the changeset documents the lockfile correction.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant SelfUpdateHandler
  participant ProjectManifest
  participant LockfileDependencies
  SelfUpdateHandler->>ProjectManifest: resolve and write pin_specifier
  ProjectManifest->>LockfileDependencies: synchronize packageManagerDependencies
Loading

Possibly related PRs

  • pnpm/pnpm#12693: Related Rust self-update pin computation and dependency synchronization changes.

Suggested labels: product: pacquet

Suggested reviewers: copilot

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-update-lockfile-job

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.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Fix self-update lockfile specifier to use resolved pnpm pin

🐞 Bug fix 🧪 Tests 🕐 20-40 Minutes

Grey Divider

AI Description

• Align packageManagerDependencies specifier with the updated manifest pin during `pnpm
 self-update`.
• Prevent --frozen-lockfile failures caused by dist-tag vs resolved-version mismatches.
• Add regression coverage and ship a pacquet patch changeset.
Diagram

graph TD
  A["pacquet self-update"] --> B["resolve dist-tag to version"] --> C{"project pins pnpm?"}
  C -->|"Yes"| D["rewrite devEngines pin"] --> E["derive pin specifier"] --> F["sync packageManagerDependencies"] --> G[("pnpm-lock.yaml")]
  C -->|"No"| H["global switch"] --> F

  subgraph Legend
    direction LR
    _proc["Step"] ~~~ _dec{"Decision"} ~~~ _db[("Lockfile")]
  end
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Loosen frozen-lockfile validation for dist-tags
  • ➕ Could keep recording the raw CLI dist-tag as user intent
  • ➕ Avoids changing what gets written into pnpm-lock.yaml
  • ➖ Would require extra resolution logic (and potentially network access) in a path that expects determinism
  • ➖ Creates parity drift vs the TypeScript CLI, which already records resolved pins
  • ➖ Adds complexity to lockfile validation for a narrow edge case
2. Always record the resolved version (ignore manifest constraint style)
  • ➕ Simplest rule: lockfile specifier always equals concrete resolved version
  • ➕ Reduces branching/conditional logic
  • ➖ Breaks the invariant that the specifier matches what a later install reads from the manifest (ranges would desync)
  • ➖ Changes semantics for users intentionally using range pins in devEngines/packageManager

Recommendation: Keep the PR’s approach: record the specifier that matches the post-update manifest pin (exact for legacy pins, preserved range when applicable). This maintains the invariant pacquet enforces under --frozen-lockfile, matches the value installs derive via package_manager_to_sync, and brings pacquet back in line with the TypeScript CLI behavior (resolved-version-based specifier), without adding special-case validation complexity.

Files changed (3) +64 / -19

Bug fix (1) +35 / -18
self_update.rsDerive lockfile specifier from resolved/updated manifest pin in self-update +35/-18

Derive lockfile specifier from resolved/updated manifest pin in self-update

• Updates both self-update paths to sync 'packageManagerDependencies' using the resolved version or updated devEngines constraint rather than the raw CLI argument/dist-tag. Adds 'package_manager_pin_specifier' to centralize the rule (legacy pins exact; non-legacy preserves satisfying ranges) and uses it to keep 'pnpm-lock.yaml' consistent with the manifest under '--frozen-lockfile'.

pnpm/crates/cli/src/cli_args/self_update.rs

Tests (1) +24 / -1
tests.rsAdd regression test for pin-specifier derivation +24/-1

Add regression test for pin-specifier derivation

• Adds a focused unit test covering the regression where a dist-tag (e.g. 'next-12') must not be written as the lockfile specifier. Validates behavior across exact pins, range pins, legacy pins, and missing prior constraints.

pnpm/crates/cli/src/cli_args/self_update/tests.rs

Documentation (1) +5 / -0
pacquet-self-update-pin-specifier.mdAdd pacquet patch changeset for self-update lockfile specifier fix +5/-0

Add pacquet patch changeset for self-update lockfile specifier fix

• Introduces a patch changeset explaining the self-update dist-tag vs resolved-pin mismatch and the resulting frozen-lockfile failure. Documents the new behavior: record the resolved manifest pin as the lockfile specifier.

.changeset/pacquet-self-update-pin-specifier.md

@qodo-code-review

qodo-code-review Bot commented Jul 14, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (2) 📜 Skill insights (0)

Context used
✅ Compliance rules (platform): 18 rules

Grey Divider


Remediation recommended

1. Historical regression comment in test 📘 Rule violation ⚙ Maintainability ⭐ New
Description
The new test comment documents a past regression scenario (self-update next-12) rather than
describing the current expected behavior/contract. Per the checklist, historical implementation
notes should be moved to commit/PR context and the inline comment should be rewritten to describe
the present guarantee being tested.
Code

pnpm/crates/cli/src/cli_args/self_update/tests.rs[R43-45]

+    // Guards the `self-update next-12` regression: recording the dist-tag
+    // instead of the resolved pin desyncs the lockfile from the manifest and
+    // breaks the next `--frozen-lockfile` install.
Evidence
The comment explicitly frames the test as guarding a prior regression and explains the old incorrect
behavior, which is exactly the kind of historical note the rule prohibits in source comments.

Rule 772199: Comments must describe current behavior, not historical implementations
pnpm/crates/cli/src/cli_args/self_update/tests.rs[43-45]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A new inline test comment describes historical behavior/regression context rather than the current behavior contract.

## Issue Context
Rule requires comments to describe current behavior, not historical implementations. The test can still explain *why* it exists, but it should be phrased as a current invariant/guarantee (what must hold), not a narration of the old failure mode.

## Fix Focus Areas
- pnpm/crates/cli/src/cli_args/self_update/tests.rs[43-45]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Changeset missing pnpm entry 📘 Rule violation § Compliance
Description
The newly added changeset only declares a bump for pacquet and omits pnpm, which violates the
checklist requirement to explicitly include pnpm with a valid bump type. This can cause release
tooling to miss or misclassify the intended bump for pnpm.
Code

.changeset/pacquet-self-update-pin-specifier.md[R1-3]

+---
+"pacquet": patch
+---
Evidence
PR Compliance ID 713436 requires changesets to include a pnpm entry with a valid bump type. The
added changeset front-matter includes only pacquet: patch and does not declare pnpm.

Rule 713436: Explicitly declare pnpm package and correct bump type in changesets
.changeset/pacquet-self-update-pin-specifier.md[1-3]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The changeset front-matter omits the required `pnpm` entry.

## Issue Context
Compliance requires that each added/modified changeset explicitly declares the `pnpm` package with a valid bump type (`patch`/`minor`/`major`).

## Fix Focus Areas
- .changeset/pacquet-self-update-pin-specifier.md[1-3]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Previous review results

Review updated until commit 216c73a

Results up to commit 1c1e239


🐞 Bugs (0) 📘 Rule violations (1) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)


Remediation recommended
1. Changeset missing pnpm entry 📘 Rule violation § Compliance
Description
The newly added changeset only declares a bump for pacquet and omits pnpm, which violates the
checklist requirement to explicitly include pnpm with a valid bump type. This can cause release
tooling to miss or misclassify the intended bump for pnpm.
Code

.changeset/pacquet-self-update-pin-specifier.md[R1-3]

+---
+"pacquet": patch
+---
Evidence
PR Compliance ID 713436 requires changesets to include a pnpm entry with a valid bump type. The
added changeset front-matter includes only pacquet: patch and does not declare pnpm.

Rule 713436: Explicitly declare pnpm package and correct bump type in changesets
.changeset/pacquet-self-update-pin-specifier.md[1-3]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The changeset front-matter omits the required `pnpm` entry.

## Issue Context
Compliance requires that each added/modified changeset explicitly declares the `pnpm` package with a valid bump type (`patch`/`minor`/`major`).

## Fix Focus Areas
- .changeset/pacquet-self-update-pin-specifier.md[1-3]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Qodo Logo

@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: 1

🧹 Nitpick comments (1)
pnpm/crates/cli/src/cli_args/self_update.rs (1)

299-302: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Avoid unnecessary string allocation.

Thanks to Rust's Non-Lexical Lifetimes (NLL), the temporary immutable borrow of entry (held by current) ends immediately after its last use on the left side of the && condition. Because current is no longer used when the right side (entry.as_object_mut()) executes, you don't need to allocate a String to decouple the lifetimes.

You can safely remove .map(ToString::to_string) and .as_deref() to keep current as an Option<&str>.

♻️ Proposed refactor
-            let current = entry.get("version").and_then(Value::as_str).map(ToString::to_string);
+            let current = entry.get("version").and_then(Value::as_str);
             let updated =
-                package_manager_pin_specifier(legacy_pins_pnpm, current.as_deref(), target_version);
-            if current.as_deref() != Some(updated.as_str())
+                package_manager_pin_specifier(legacy_pins_pnpm, current, target_version);
+            if current != Some(updated.as_str())
                 && let Some(object) = entry.as_object_mut()
🤖 Prompt for 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.

In `@pnpm/crates/cli/src/cli_args/self_update.rs` around lines 299 - 302, Update
the current extraction in the self-update version comparison to retain an
Option<&str> by removing the ToString allocation, then pass current directly to
package_manager_pin_specifier and compare it directly with the updated string
without as_deref(). Preserve the existing NLL-dependent mutable entry update
flow.
🤖 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/pacquet-self-update-pin-specifier.md:
- Around line 1-5: Update the changeset frontmatter to include "pnpm": patch,
and remove the implementation rationale from the body. Keep only a concise
user-facing summary of the self-update lockfile behavior change.

---

Nitpick comments:
In `@pnpm/crates/cli/src/cli_args/self_update.rs`:
- Around line 299-302: Update the current extraction in the self-update version
comparison to retain an Option<&str> by removing the ToString allocation, then
pass current directly to package_manager_pin_specifier and compare it directly
with the updated string without as_deref(). Preserve the existing NLL-dependent
mutable entry update flow.
🪄 Autofix (Beta)

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: 2d6e8bb9-c15b-4896-ba63-0b668b5a2d29

📥 Commits

Reviewing files that changed from the base of the PR and between 6e65538 and 1c1e239.

📒 Files selected for processing (3)
  • .changeset/pacquet-self-update-pin-specifier.md
  • pnpm/crates/cli/src/cli_args/self_update.rs
  • pnpm/crates/cli/src/cli_args/self_update/tests.rs

@github-actions

github-actions Bot commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Micro-Benchmark Results

Linux

group                          main                                   pr
-----                          ----                                   --
lockfile/parse_pnpm_lock       1.02     23.0±2.22ms    16.3 MB/sec    1.00     22.5±0.67ms    16.6 MB/sec
packument/parse                1.00     79.2±1.07µs   837.8 MB/sec    1.01     79.7±0.59µs   832.5 MB/sec
tarball/download_dependency    1.01      6.5±0.15ms   665.5 KB/sec    1.00      6.5±0.18ms   671.0 KB/sec

@codecov-commenter

codecov-commenter commented Jul 14, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 47.36842% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.52%. Comparing base (6dcfadd) to head (216c73a).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
pnpm/crates/cli/src/cli_args/self_update.rs 47.36% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12992      +/-   ##
==========================================
+ Coverage   85.51%   85.52%   +0.01%     
==========================================
  Files         496      496              
  Lines       79399    79405       +6     
==========================================
+ Hits        67898    67915      +17     
+ Misses      11501    11490      -11     

☔ 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.

@github-actions

github-actions Bot commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: 3f78f487931f

Each scenario reports direct installs and pnpr installs. Bencher consumes pacquet@HEAD and pnpr@HEAD.

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 3.678 ± 0.069 3.574 3.802 1.74 ± 0.10
pacquet@main 3.707 ± 0.143 3.582 3.986 1.76 ± 0.11
pnpr@HEAD 2.117 ± 0.108 1.973 2.288 1.00 ± 0.07
pnpr@main 2.110 ± 0.108 1.973 2.308 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 3.678414323860001,
      "stddev": 0.06866879587176813,
      "median": 3.6932762120600002,
      "user": 3.6562428999999996,
      "system": 3.2864131400000005,
      "min": 3.5737807150600003,
      "max": 3.8017847810600003,
      "times": [
        3.6295603240600003,
        3.5737807150600003,
        3.7124955890600004,
        3.72333925206,
        3.6287563300600003,
        3.8017847810600003,
        3.7245741910600003,
        3.68988086406,
        3.6966715600600004,
        3.60329963206
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 3.7069882311599995,
      "stddev": 0.14268818598029606,
      "median": 3.64217544156,
      "user": 3.6210008,
      "system": 3.3039690399999997,
      "min": 3.5816439840600003,
      "max": 3.9864597170600002,
      "times": [
        3.8410539370600003,
        3.59923408606,
        3.58753696706,
        3.6103202420600002,
        3.9864597170600002,
        3.85733756206,
        3.5816439840600003,
        3.59832252606,
        3.67403064106,
        3.7339426490600003
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 2.11685585216,
      "stddev": 0.10823992021736593,
      "median": 2.06724922056,
      "user": 2.7756558,
      "system": 2.91729454,
      "min": 1.97314976106,
      "max": 2.28826953106,
      "times": [
        2.0029268080600002,
        2.28826953106,
        2.06701128106,
        2.06748716006,
        2.21044653206,
        2.05418462506,
        2.23885423406,
        1.97314976106,
        2.0645282910600002,
        2.20170029806
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 2.11014299136,
      "stddev": 0.10811825579413314,
      "median": 2.08804802106,
      "user": 2.7633631000000003,
      "system": 2.9541727399999997,
      "min": 1.97336592306,
      "max": 2.3077856960600003,
      "times": [
        2.3077856960600003,
        1.97336592306,
        2.2098507130600002,
        2.23610604006,
        2.1114244010600003,
        2.0962667820600003,
        2.07982926006,
        2.03997421606,
        2.00688633806,
        2.0399405440600002
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 658.3 ± 28.2 631.8 729.9 1.00
pacquet@main 720.5 ± 37.1 680.0 811.5 1.09 ± 0.07
pnpr@HEAD 711.6 ± 21.1 680.6 744.1 1.08 ± 0.06
pnpr@main 726.7 ± 11.1 716.5 752.3 1.10 ± 0.05
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.6582944417400001,
      "stddev": 0.028158352126413818,
      "median": 0.65242312924,
      "user": 0.37457779999999996,
      "system": 1.34271606,
      "min": 0.63181997974,
      "max": 0.72986030274,
      "times": [
        0.64402863474,
        0.64080814974,
        0.65705260974,
        0.6567671687400001,
        0.6385130867400001,
        0.6480790897400001,
        0.6756220617400001,
        0.63181997974,
        0.6603933337400001,
        0.72986030274
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.7204785627400001,
      "stddev": 0.03709872166642049,
      "median": 0.71737281324,
      "user": 0.4043297,
      "system": 1.3692841599999999,
      "min": 0.6799974817400001,
      "max": 0.81149116074,
      "times": [
        0.6799974817400001,
        0.71299605174,
        0.7233832187400001,
        0.72174957474,
        0.69104701574,
        0.7045622627400001,
        0.73013136174,
        0.81149116074,
        0.6910536807400001,
        0.7383738187400001
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.7115818030400001,
      "stddev": 0.021143504162377567,
      "median": 0.7143168987400002,
      "user": 0.40830890000000003,
      "system": 1.35987436,
      "min": 0.6805975857400001,
      "max": 0.7440958107400001,
      "times": [
        0.7323276807400001,
        0.7118476157400001,
        0.7169889517400001,
        0.6805975857400001,
        0.7167861817400001,
        0.69488815674,
        0.6900429977400001,
        0.6945771617400001,
        0.7336658877400001,
        0.7440958107400001
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.72665921024,
      "stddev": 0.01105190771437752,
      "median": 0.7241555407400001,
      "user": 0.41533749999999997,
      "system": 1.37313236,
      "min": 0.71650307674,
      "max": 0.7522623017400001,
      "times": [
        0.71920317274,
        0.7242259967400001,
        0.7176306127400001,
        0.7240850847400001,
        0.71650307674,
        0.7298242527400001,
        0.73773484674,
        0.72607636474,
        0.7522623017400001,
        0.71904639274
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.348 ± 0.065 4.256 4.425 1.98 ± 0.13
pacquet@main 4.392 ± 0.055 4.302 4.477 2.00 ± 0.13
pnpr@HEAD 2.251 ± 0.129 2.072 2.419 1.03 ± 0.09
pnpr@main 2.194 ± 0.135 2.037 2.412 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.348308744060001,
      "stddev": 0.06535056455348988,
      "median": 4.34801609426,
      "user": 3.8710514199999997,
      "system": 3.37868736,
      "min": 4.25607927926,
      "max": 4.42497942126,
      "times": [
        4.41124955726,
        4.42497942126,
        4.36251001726,
        4.42382798126,
        4.33352217126,
        4.39536952026,
        4.26100556326,
        4.25607927926,
        4.32679096926,
        4.28775296026
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.3917746406600005,
      "stddev": 0.05545682090662466,
      "median": 4.40086344276,
      "user": 3.92436302,
      "system": 3.3938574600000004,
      "min": 4.30240525026,
      "max": 4.47716317626,
      "times": [
        4.40737654126,
        4.31318674126,
        4.37823349726,
        4.35821002926,
        4.39435034426,
        4.42327626726,
        4.41639357726,
        4.30240525026,
        4.47716317626,
        4.44715098226
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 2.2511654189600003,
      "stddev": 0.1287086539200765,
      "median": 2.25056296076,
      "user": 2.6046703199999994,
      "system": 2.8948847599999996,
      "min": 2.07238365826,
      "max": 2.41917105926,
      "times": [
        2.2438735042599998,
        2.21871217026,
        2.36870381326,
        2.31326817226,
        2.08299545926,
        2.12400755126,
        2.41128638426,
        2.25725241726,
        2.41917105926,
        2.07238365826
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 2.19354699156,
      "stddev": 0.13457883913916582,
      "median": 2.15858974026,
      "user": 2.64057782,
      "system": 2.88848086,
      "min": 2.03651110126,
      "max": 2.41227964126,
      "times": [
        2.38211982326,
        2.11331242426,
        2.09150181326,
        2.28590165426,
        2.04777650426,
        2.12115039526,
        2.19602908526,
        2.24888747326,
        2.41227964126,
        2.03651110126
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.461 ± 0.019 1.429 1.486 2.11 ± 0.08
pacquet@main 1.459 ± 0.029 1.439 1.532 2.11 ± 0.09
pnpr@HEAD 0.693 ± 0.025 0.675 0.760 1.00
pnpr@main 0.700 ± 0.049 0.674 0.840 1.01 ± 0.08
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.4606203649199998,
      "stddev": 0.018866335849560587,
      "median": 1.46261169382,
      "user": 1.4222849199999998,
      "system": 1.73949022,
      "min": 1.42936886132,
      "max": 1.48597907032,
      "times": [
        1.46231166232,
        1.42936886132,
        1.46291172532,
        1.48597907032,
        1.47810135532,
        1.48189147332,
        1.4661486343199999,
        1.4550487673199999,
        1.44850186532,
        1.43594023432
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.4593187786199997,
      "stddev": 0.029374653874272082,
      "median": 1.44771567432,
      "user": 1.4129800199999998,
      "system": 1.7383221199999999,
      "min": 1.43863653132,
      "max": 1.5323681733199999,
      "times": [
        1.44103134732,
        1.5323681733199999,
        1.44760031032,
        1.43863653132,
        1.44088899332,
        1.45511502332,
        1.48866753432,
        1.44783103832,
        1.45404455832,
        1.44700427632
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.69318185502,
      "stddev": 0.024557238011141822,
      "median": 0.68764708982,
      "user": 0.35384822,
      "system": 1.3026089200000002,
      "min": 0.67457300032,
      "max": 0.75968943332,
      "times": [
        0.67990758732,
        0.69093114432,
        0.75968943332,
        0.69223536232,
        0.68287290832,
        0.67457300032,
        0.67671608932,
        0.68436303532,
        0.6928195983200001,
        0.69771039132
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.7001664764200001,
      "stddev": 0.04925429001043744,
      "median": 0.68584314432,
      "user": 0.36754011999999997,
      "system": 1.30427652,
      "min": 0.6740185803200001,
      "max": 0.8395353063200001,
      "times": [
        0.68333070632,
        0.68210563632,
        0.68213327032,
        0.68925805732,
        0.6740185803200001,
        0.68835558232,
        0.68937545432,
        0.6921662053200001,
        0.6813859653200001,
        0.8395353063200001
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 3.182 ± 0.042 3.142 3.278 4.63 ± 0.18
pacquet@main 3.158 ± 0.047 3.105 3.260 4.59 ± 0.18
pnpr@HEAD 0.700 ± 0.008 0.686 0.712 1.02 ± 0.04
pnpr@main 0.687 ± 0.026 0.664 0.754 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 3.1819679508000003,
      "stddev": 0.04235190095492845,
      "median": 3.1706895293,
      "user": 1.8720997000000001,
      "system": 2.03653884,
      "min": 3.1416250118,
      "max": 3.2783192298,
      "times": [
        3.2783192298,
        3.1932977648,
        3.1514039508000002,
        3.1420830648,
        3.2214329028,
        3.1416250118,
        3.1690117708,
        3.1933175698,
        3.1723672878,
        3.1568209548
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 3.1579612602,
      "stddev": 0.046882170906538484,
      "median": 3.1454599028,
      "user": 1.8496885999999997,
      "system": 2.0201707399999997,
      "min": 3.1049076398,
      "max": 3.2600578108000002,
      "times": [
        3.1049076398,
        3.1058335708,
        3.1977175278,
        3.1833979108,
        3.1668049728,
        3.1337864268,
        3.1540867908,
        3.2600578108000002,
        3.1368330148,
        3.1361869368
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.6998012999000001,
      "stddev": 0.008465386384715806,
      "median": 0.6996268128,
      "user": 0.36245209999999994,
      "system": 1.30342144,
      "min": 0.6860582918000001,
      "max": 0.7117483318000001,
      "times": [
        0.7112261258000001,
        0.6999841018,
        0.6932194808000001,
        0.6956908078,
        0.7078813278000001,
        0.6992695238000001,
        0.7117483318000001,
        0.7006381438000001,
        0.6860582918000001,
        0.6922968638000001
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.6874381876000001,
      "stddev": 0.02571283959775309,
      "median": 0.6845592038000001,
      "user": 0.34806299999999996,
      "system": 1.2980549399999999,
      "min": 0.6640707268000001,
      "max": 0.7540633598,
      "times": [
        0.6943815838,
        0.6730559608000001,
        0.6886810938000001,
        0.6866619468,
        0.6923509448,
        0.6824564608000001,
        0.7540633598,
        0.6706375168,
        0.6640707268000001,
        0.6680222818000001
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 672.3 ± 25.6 644.0 714.0 5.99 ± 0.23
pacquet@main 663.5 ± 7.8 652.5 675.6 5.91 ± 0.09
pnpr@HEAD 112.2 ± 1.0 110.0 114.4 1.00
pnpr@main 112.3 ± 0.7 110.9 113.8 1.00 ± 0.01
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.67232355048,
      "stddev": 0.02564892027420042,
      "median": 0.6621427819800001,
      "user": 0.6256784599999999,
      "system": 0.15443013999999997,
      "min": 0.64399772048,
      "max": 0.7140068874800001,
      "times": [
        0.7140068874800001,
        0.7135439224800001,
        0.6955750164800001,
        0.6611904874800001,
        0.6666513514800001,
        0.6536420724800001,
        0.6630950764800001,
        0.64399772048,
        0.6569169004800001,
        0.6546160694800001
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.66347225118,
      "stddev": 0.007754526874561786,
      "median": 0.6600776324800001,
      "user": 0.62035246,
      "system": 0.15331334,
      "min": 0.65250825548,
      "max": 0.6756053534800001,
      "times": [
        0.6595916244800001,
        0.66056364048,
        0.65250825548,
        0.65887464348,
        0.6756053534800001,
        0.6670458474800001,
        0.6745441894800001,
        0.66960976648,
        0.65856049248,
        0.6578186984800001
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.11223939243833335,
      "stddev": 0.0009743123911319527,
      "median": 0.11223262548000001,
      "user": 0.028300659999999995,
      "system": 0.02204739833333333,
      "min": 0.11001150048000001,
      "max": 0.11437634348000002,
      "times": [
        0.11253448848000001,
        0.11188280048000002,
        0.11216897948000001,
        0.11437634348000002,
        0.11001150048000001,
        0.11237637148000001,
        0.11347853548000002,
        0.11157926448000001,
        0.11269646248000001,
        0.11177516848,
        0.11244622848000001,
        0.11254855548,
        0.11215785748000001,
        0.11203806848000002,
        0.11300413848000002,
        0.11111164648,
        0.11309839048000002,
        0.11111286848000002,
        0.11370319848000002,
        0.11131274848000001,
        0.11303551648000001,
        0.11083103548,
        0.11226398748000001,
        0.11220126348000001
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.11229116881333333,
      "stddev": 0.000689664305137096,
      "median": 0.11233774748,
      "user": 0.028497576666666663,
      "system": 0.02196223166666666,
      "min": 0.11089048448000001,
      "max": 0.11380316448000001,
      "times": [
        0.11089048448000001,
        0.11257048748000001,
        0.11248914548000001,
        0.11219870948,
        0.11235046648000001,
        0.11208540948000001,
        0.11277077748000001,
        0.11213250948000002,
        0.11380316448000001,
        0.11102363948,
        0.11232502848,
        0.11347921248000001,
        0.11181640048000001,
        0.11156481748000001,
        0.11231033648000001,
        0.11319563648000001,
        0.11181463648000001,
        0.11249259048000002,
        0.11145121148,
        0.11259818448000002,
        0.11244517348000001,
        0.11262500948000001,
        0.11179214348000001,
        0.11276287648000001
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 6.627 ± 0.158 6.321 6.878 1.36 ± 0.05
pacquet@main 6.643 ± 0.119 6.534 6.917 1.36 ± 0.04
pnpr@HEAD 4.873 ± 0.129 4.706 5.135 1.00
pnpr@main 4.906 ± 0.101 4.801 5.143 1.01 ± 0.03
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 6.626995469480001,
      "stddev": 0.15824642098156072,
      "median": 6.66261904488,
      "user": 3.9207082799999995,
      "system": 3.5916983799999995,
      "min": 6.32068881238,
      "max": 6.87811520038,
      "times": [
        6.68078715138,
        6.67462674738,
        6.46349553038,
        6.51941206238,
        6.65061134238,
        6.32068881238,
        6.87811520038,
        6.61239099038,
        6.71300218838,
        6.75682466938
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 6.6430413043800005,
      "stddev": 0.11871805288995305,
      "median": 6.60743621538,
      "user": 3.91462728,
      "system": 3.5861589799999996,
      "min": 6.53427291538,
      "max": 6.91704749238,
      "times": [
        6.57716634138,
        6.53427291538,
        6.91704749238,
        6.62662490038,
        6.62817726538,
        6.58498721238,
        6.78950701838,
        6.62284111638,
        6.55775746738,
        6.59203131438
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 4.87260714068,
      "stddev": 0.12930039087699957,
      "median": 4.84680006138,
      "user": 2.8356016799999995,
      "system": 3.12314088,
      "min": 4.70556742038,
      "max": 5.13462990638,
      "times": [
        4.99714931638,
        4.94175557638,
        4.75335099038,
        4.89291566838,
        4.91137098438,
        4.79933579638,
        4.70556742038,
        4.80068445438,
        5.13462990638,
        4.78931129338
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 4.9059573061799995,
      "stddev": 0.10133125203596832,
      "median": 4.87387839288,
      "user": 2.82394948,
      "system": 3.12106938,
      "min": 4.80087598838,
      "max": 5.14265720338,
      "times": [
        4.92506058538,
        4.83767318238,
        4.84757566338,
        4.80087598838,
        4.89066723738,
        4.98898909638,
        4.82761702438,
        4.85708954838,
        5.14265720338,
        4.94136753238
      ]
    }
  ]
}

@github-actions

github-actions Bot commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/12992
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
4,348.31 ms
(+2.04%)Baseline: 4,261.47 ms
5,113.76 ms
(85.03%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
3,181.97 ms
(+5.88%)Baseline: 3,005.24 ms
3,606.28 ms
(88.23%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
1,460.62 ms
(+10.09%)Baseline: 1,326.71 ms
1,592.06 ms
(91.74%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
672.32 ms
(+7.81%)Baseline: 623.64 ms
748.36 ms
(89.84%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
3,678.41 ms
(-4.45%)Baseline: 3,849.69 ms
4,619.63 ms
(79.63%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
6,627.00 ms
(-6.37%)Baseline: 7,078.05 ms
8,493.66 ms
(78.02%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
658.29 ms
(+2.36%)Baseline: 643.11 ms
771.73 ms
(85.30%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

github-actions Bot commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/12992
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
2,251.17 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
699.80 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
693.18 ms
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
⚠️ NO THRESHOLD
112.24 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
2,116.86 ms
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
⚠️ NO THRESHOLD
4,872.61 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
711.58 ms
🐰 View full continuous benchmarking report in Bencher

…ng it

The immutable borrow of the devEngines `version` entry ends (via NLL) before
the mutable `entry.as_object_mut()` reborrow, so the pin-specifier lookup can
take `Option<&str>` directly instead of allocating a `String` to decouple the
lifetimes.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings July 14, 2026 13:47

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 3f78f48

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

/improve is deprecated. Use /agentic_review instead (removal date not yet scheduled).

No code suggestions found for the PR.

Auto-approved notes - no code suggestions found
- 'approve_pr_on_self_review' flag enabled

@greptile-apps

greptile-apps Bot commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

Safe to merge — the change is a targeted, self-contained correctness fix with no new dependencies or interface changes.

The fix correctly threads the resolved manifest constraint (pin_specifier) through both self-update paths. The package_manager_pin_specifier helper mirrors the read-back logic in package_manager_to_sync, so the lockfile and manifest will stay in agreement after self-update. Unit tests cover the key regression and edge cases.

No files require special attention.

Reviews (2): Last reviewed commit: "docs(self-update): drop pin-specifier co..." | Re-trigger Greptile

…per doc

The block comment before `pin_specifier` and the test preamble restated the
contract already documented on `package_manager_pin_specifier`. Keep only the
non-obvious details: the devEngines-has-no-pnpm-entry fallback, and the
regression the test guards.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings July 14, 2026 18:01

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 216c73a

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

/improve is deprecated. Use /agentic_review instead (removal date not yet scheduled).

No code suggestions found for the PR.

Auto-approved notes - no code suggestions found
- 'approve_pr_on_self_review' flag enabled

@zkochan

zkochan commented Jul 14, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Jul 14, 2026
@zkochan
zkochan merged commit e0c790c into main Jul 14, 2026
34 of 36 checks passed
@zkochan
zkochan deleted the fix-update-lockfile-job branch July 14, 2026 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product: pacquet reviewed: coderabbit CodeRabbit submitted an approving review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants