Skip to content

fix(package-manager): save hosted-git adds in normalized shortcut form - #12557

Merged
zkochan merged 2 commits into
mainfrom
feat/pacquet-git-add-normalization
Jun 21, 2026
Merged

zkochan merged 2 commits into
mainfrom
feat/pacquet-git-add-normalization

Conversation

@zkochan

@zkochan zkochan commented Jun 21, 2026 •

Copy link
Copy Markdown
Member

Summary

pacquet add <name>@owner/repo#sha (and GitHub / GitLab / Bitbucket URL forms) previously saved the request to package.json verbatim. pnpm saves the resolver's normalized shortcut form. This change does the same: the hosted-git request is rewritten to its github: / gitlab: / bitbucket: shortcut (e.g. owner/repo#sha → github:owner/repo#sha) via the git resolver's own HostedGit::from_url(...).shortcut(...) — the same logic that produces ResolveResult::normalized_bare_specifier — matching pnpm's saved normalizedBareSpecifier.

The normalization runs only in add's non-registry fallback: a git shorthand isn't claimed by the npm resolver (parse_bare_specifier returns None for it, since //# fail the dist-tag check), so no registry fetch happens and registry ranges, npm: aliases, file:, link:, workspace:, and tarball URLs are left untouched.

Scope note: this covers the aliased add <name>@<git> form. The aliasless add owner/repo#sha form (where pnpm derives the alias from the resolved repo's manifest) is a separate, larger feature and is out of scope here.

This is the focused, in-scope piece of #12548 — wiring the full post-resolution updateProjectManifest into pacquet add/update turned out to be a parity-only refactor with no functional gain and real regression risk (pacquet's resolver doesn't compute saved specs for registry deps, and pacquet's name-keyed writes are already immune to #11267), so only the genuine behavioral gap — git-shorthand normalization — is implemented.

Squash Commit Body

fix(package-manager): save hosted-git adds in normalized shortcut form

`pacquet add <name>@owner/repo#sha` (and GitHub / GitLab / Bitbucket URL
forms) previously saved the request verbatim. Save the resolver's shortcut
form instead — `github:owner/repo#sha` — matching pnpm's saved
normalizedBareSpecifier. The normalization runs only in the non-registry
fallback (a git shorthand isn't claimed by the npm resolver, so no registry
fetch happens), leaving registry ranges, npm: aliases, file:, link:,
workspace:, and tarball URLs untouched.

Related to #12548.

Checklist

  • The change is implemented in both the TypeScript CLI and the Rust
    pacquet/ port, or the description notes what still needs porting. (Matches
    pnpm's existing normalizedBareSpecifier behavior; pacquet-only fix.)
  • Added or updated tests. (Unit test for the normalization across shorthand,
    URL, idempotent github:, and non-git specifiers.)

Summary by CodeRabbit

  • Bug Fixes

    • Improved handling of hosted Git repository specifications when saving manifests, normalizing GitHub/GitLab/Bitbucket inputs into standardized shortcut forms while preserving auth-bearing specs and leaving non-Git specifiers unchanged.
  • Tests

    • Added unit tests to verify normalization behavior for hosted Git shorthands and full URLs, idempotency for existing shortcuts, preservation of auth-bearing inputs, and no changes for non-Git specifiers.

`pacquet add <name>@owner/repo#sha` (and GitHub / GitLab / Bitbucket URL
forms) previously saved the request verbatim. Save the resolver's shortcut
form instead — `github:owner/repo#sha` — matching pnpm's saved
`normalizedBareSpecifier`. The normalization runs only in the non-registry
fallback (a git shorthand isn't claimed by the npm resolver, so no registry
fetch happens), leaving registry ranges, `npm:` aliases, `file:`, `link:`,
`workspace:`, and tarball URLs untouched.
@coderabbitai

coderabbitai Bot commented Jun 21, 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: 73b93d61-3fe8-4820-ad6c-90476208a736

📥 Commits

Reviewing files that changed from the base of the PR and between eb8aec3 and 0559861.

📒 Files selected for processing (2)
  • pacquet/crates/package-manager/src/add.rs
  • pacquet/crates/package-manager/src/add/tests.rs
🚧 Files skipped from review as they are similar to previous changes (2)
  • pacquet/crates/package-manager/src/add/tests.rs
  • pacquet/crates/package-manager/src/add.rs

📝 Walkthrough

Walkthrough

In Add::run, the fallback saved specifier for non-registry explicit add <name>@<spec> inputs is changed from the raw spec string to the output of a new normalized_save_specifier helper. That helper uses HostedGit::from_url to rewrite GitHub/GitLab/Bitbucket shorthand and URLs into github:/gitlab:/bitbucket: shortcut forms, leaving other specifiers unchanged.

Changes

Hosted-git specifier normalization

Layer / File(s) Summary
normalized_save_specifier helper and Add::run wiring
pacquet/crates/package-manager/src/add.rs
Imports HostedGit, introduces normalized_save_specifier that converts recognized hosted-git inputs to shortcut form via HostedGit::from_url, and applies it in Add::run where the raw spec was previously saved directly.
Unit tests
pacquet/crates/package-manager/src/add/tests.rs
Adds normalized_save_specifier to the test import and introduces a test covering GitHub shorthand, full GitHub URL, idempotent github: input, and non-git passthrough cases.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • pnpm/pnpm#12429: Both PRs modify the same Add::run saved-specifier fallback path in pacquet/crates/package-manager/src/add.rs around resolve_explicit_registry_spec(...).
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/pacquet-git-add-normalization

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 and usage tips.

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Fix pacquet add: normalize hosted-git specs to github:/gitlab:/bitbucket: shortcuts
🐞 Bug fix 🧪 Tests 🕐 10-20 Minutes

Grey Divider

Description

• Normalize hosted-git add specifiers to github:/gitlab:/bitbucket: shortcut form before saving.
• Preserve non-git specifiers verbatim (registry ranges, npm: aliases, file:/workspace:, tarballs).
• Add unit coverage for shorthand, URL, idempotent shortcut, and non-git cases.
Diagram

graph TD
  A["Add command"] --> B["split_name_spec"] --> C{"Registry spec?"} --> D["resolve_explicit_registry_spec"] --> E["Registry range"] --> H["Write package.json"]
  C --> F["normalized_save_specifier"] --> G["HostedGit shortcut"] --> H
  subgraph Legend
    direction LR
    _proc["Process"] ~~~ _dec{"Decision"}
  end
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Full post-resolution manifest update (pnpm-style updateProjectManifest)
  • ➕ Single canonical place to compute saved specifiers across all dependency types
  • ➕ Potentially improves parity for more specifier kinds long-term
  • ➖ Broader refactor with higher regression risk
  • ➖ Requires pacquet to compute saved specs for registry deps the same way pnpm does
2. Teach npm bare-spec parser to classify hosted-git and return a normalized form
  • ➕ Centralizes normalization in one parsing step
  • ➕ Avoids introducing an add-specific helper
  • ➖ Blurs resolver responsibilities (npm parser recognizing git hosting shortcuts)
  • ➖ Risk of accidentally changing resolution/registry-fetch behavior for ambiguous inputs

Recommendation: The PR’s minimal, add-only normalization using HostedGit::from_url(...).shortcut(...) is the best tradeoff: it matches pnpm’s saved shortcut form for hosted-git inputs while intentionally limiting behavior changes to the non-registry fallback path.

Files changed (2) +38 / -2

Bug fix (1) +13 / -1
add.rsNormalize hosted-git specifiers before saving to manifest +13/-1

Normalize hosted-git specifiers before saving to manifest

• Adds a 'normalized_save_specifier' helper that rewrites hosted-git shorthands/URLs into 'github:'/'gitlab:'/'bitbucket:' shortcuts using the git resolver. Updates the non-registry fallback in 'Add::run' to save this normalized form instead of the raw input specifier.

pacquet/crates/package-manager/src/add.rs

Tests (1) +25 / -1
tests.rsAdd unit test coverage for hosted-git normalization behavior +25/-1

Add unit test coverage for hosted-git normalization behavior

• Introduces a test asserting that bare 'owner/repo#sha', full GitHub URLs, and explicit 'github:' specs normalize/idempotently round-trip, while non-git specifiers remain unchanged.

pacquet/crates/package-manager/src/add/tests.rs

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

🧹 Nitpick comments (1)
pacquet/crates/package-manager/src/add/tests.rs (1)

125-147: ⚡ Quick win

Expand hosted-git normalization assertions to GitLab and Bitbucket.

This test currently validates only GitHub forms. Please add GitLab/Bitbucket shorthand + URL assertions so provider-specific normalization regressions are caught at unit level.

As per coding guidelines, REVIEW_GUIDE.md requires “regression-proving” tests that assert the exact saved specifier output.

🤖 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 `@pacquet/crates/package-manager/src/add/tests.rs` around lines 125 - 147, The
test function normalizes_hosted_git_specifiers_to_shortcut_form currently only
validates GitHub hosted git normalization. Add additional assertion blocks
following the same pattern to test GitLab and Bitbucket providers, including
both shorthand forms (gitlab:owner/repo, bitbucket:owner/repo) and full URLs
(https://gitlab.com/owner/repo, https://bitbucket.org/owner/repo) to ensure
provider-specific normalization is properly tested and regressions are caught at
the unit test level.

Source: Coding guidelines

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

Nitpick comments:
In `@pacquet/crates/package-manager/src/add/tests.rs`:
- Around line 125-147: The test function
normalizes_hosted_git_specifiers_to_shortcut_form currently only validates
GitHub hosted git normalization. Add additional assertion blocks following the
same pattern to test GitLab and Bitbucket providers, including both shorthand
forms (gitlab:owner/repo, bitbucket:owner/repo) and full URLs
(https://gitlab.com/owner/repo, https://bitbucket.org/owner/repo) to ensure
provider-specific normalization is properly tested and regressions are caught at
the unit test level.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: dab606d5-3deb-4afd-bc04-daae4710b593

📥 Commits

Reviewing files that changed from the base of the PR and between 49971fb and eb8aec3.

📒 Files selected for processing (2)
  • pacquet/crates/package-manager/src/add.rs
  • pacquet/crates/package-manager/src/add/tests.rs

@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Jun 21, 2026
@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Jun 21, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

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

Grey Divider


Action required

1. Git URL auth dropped ✓ Resolved 🐞 Bug ⛨ Security
Description
normalized_save_specifier() rewrites any hosted-git URL to a github:/gitlab:/bitbucket:
shortcut, which cannot represent embedded HTTPS userinfo (e.g. tokens) and can break `pacquet add
<name>@git+https://[email protected]/...` for private repos. This also diverges from the git
resolver’s own normalized_bare_specifier behavior, which preserves auth-bearing HTTPS URLs in a
dedicated branch.
Code

pacquet/crates/package-manager/src/add.rs[196]

+            .unwrap_or_else(|| normalized_save_specifier(spec)),
Evidence
The new save path calls normalized_save_specifier(spec) when the registry resolver declines a
spec, and that helper always emits HostedGit::shortcut(...). HostedGit::from_url explicitly
parses HTTPS auth into HostedGit.auth, but shortcut() omits auth entirely. In contrast, the git
resolver’s hosted finalize path preserves auth-bearing HTTPS URLs by setting
normalized_bare_specifier to git+{https_url} when hosted.auth.is_some(), showing the new
save-time shortcutting is not equivalent and can break private-repo flows that rely on URL-embedded
credentials.

pacquet/crates/package-manager/src/add.rs[183-197]
pacquet/crates/package-manager/src/add.rs[468-477]
pacquet/crates/resolving-git-resolver/src/hosted_git.rs[144-178]
pacquet/crates/resolving-git-resolver/src/hosted_git.rs[229-242]
pacquet/crates/resolving-git-resolver/src/parse_bare_specifier.rs[259-279]

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

## Issue description
`pacquet add` now saves non-registry specs via `normalized_save_specifier(spec)`, which always converts hosted-git inputs to `hosted.shortcut(...)`. For inputs like `git+https://<token>:x-oa*******[email protected]/org/repo.git#ref`, this drops the embedded credentials when saving, causing the subsequent install (which reads the just-written manifest) to lose access to private repos.
### Issue Context
The git resolver’s hosted path explicitly preserves auth-bearing HTTPS URLs in `normalized_bare_specifier` (it emits `git+{https_url}` when `hosted.auth.is_some()`), so save-time normalization should not unconditionally shortcut auth-bearing URLs.
### Fix Focus Areas
- pacquet/crates/package-manager/src/add.rs[468-477]
- pacquet/crates/package-manager/src/add.rs[183-197]
- pacquet/crates/package-manager/src/add/tests.rs[125-147]
### Implementation notes
- Update `normalized_save_specifier(spec)` to avoid shortcutting when the parsed `HostedGit` carries auth (e.g., `if hosted.auth.is_some() { return spec.to_string(); }`).
- Add a unit test covering an auth-bearing URL (e.g. `git+https://000...:x-oa*******[email protected]/foo/bar.git#abc`) asserting the saved spec is not rewritten to `github:foo/bar#abc`.
- Keep the existing normalization behavior for non-auth hosted-git inputs.

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



Remediation recommended

2. Hosted-git tests too narrow ✓ Resolved 🐞 Bug ⚙ Maintainability
Description
The new unit test only validates GitHub normalization and does not assert the advertised
GitLab/Bitbucket shortcut rewriting paths, so regressions in those supported forms would not be
caught. This weakens confidence in the cross-host behavior claimed by the new helper’s
documentation.
Code

pacquet/crates/package-manager/src/add/tests.rs[R125-147]

+#[test]
+fn normalizes_hosted_git_specifiers_to_shortcut_form() {
+    // A bare `owner/repo#committish` shorthand becomes a `github:` shortcut.
+    assert_eq!(
+        normalized_save_specifier("pnpm/test-git-fetch#8b333f12d5357f4f25a654c305c826294cb073bf"),
+        "github:pnpm/test-git-fetch#8b333f12d5357f4f25a654c305c826294cb073bf",
+    );
+    // A full GitHub URL collapses to the same shortcut.
+    assert_eq!(
+        normalized_save_specifier("https://github.com/pnpm/test-git-fetch"),
+        "github:pnpm/test-git-fetch",
+    );
+    // An explicit `github:` shorthand is idempotent.
+    assert_eq!(
+        normalized_save_specifier("github:pnpm/test-git-fetch#abc"),
+        "github:pnpm/test-git-fetch#abc",
+    );
+    // Non-git specifiers are kept verbatim.
+    assert_eq!(normalized_save_specifier("^1.2.3"), "^1.2.3");
+    assert_eq!(normalized_save_specifier("npm:bar@^1"), "npm:bar@^1");
+    assert_eq!(normalized_save_specifier("file:../bar"), "file:../bar");
+    assert_eq!(normalized_save_specifier("workspace:*"), "workspace:*");
+}
Evidence
The helper explicitly claims GitHub/GitLab/Bitbucket rewriting, but the test only asserts GitHub
cases and non-git passthrough, leaving other supported hosts untested.

pacquet/crates/package-manager/src/add.rs[468-473]
pacquet/crates/package-manager/src/add/tests.rs[125-147]

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 added unit test covers only GitHub inputs (shorthand/URL/idempotent `github:`) and a few non-git passthrough examples, but it does not verify GitLab/Bitbucket cases even though the helper’s docstring claims those are rewritten too.
### Issue Context
This helper is the persistence layer for what gets written to `package.json`, so cross-host coverage in tests is important to prevent silent regressions.
### Fix Focus Areas
- pacquet/crates/package-manager/src/add/tests.rs[125-147]
- pacquet/crates/package-manager/src/add.rs[468-473]
Suggested additions:
- `normalized_save_specifier("https://gitlab.com/<group>/<repo>") -> "gitlab:<group>/<repo>"`
- `normalized_save_specifier("https://bitbucket.org/<owner>/<repo>") -> "bitbucket:<owner>/<repo>"`
- (Optional) an scp/ssh hosted input that should normalize consistently, if supported by `HostedGit::from_url`.

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



Informational

3. Unneeded hosted-git parsing 🐞 Bug ➹ Performance
Description
normalized_save_specifier() always calls HostedGit::from_url(), which performs URL normalization
and reqwest::Url::parse() even for non-git specifiers that are ultimately returned unchanged (e.g.
workspace:*, file:, npm:). This adds avoidable CPU work on pacquet add for non-registry adds
and scales with the number of deps added in one invocation.
Code

pacquet/crates/package-manager/src/add.rs[R474-477]

+fn normalized_save_specifier(spec: &str) -> String {
+    HostedGit::from_url(spec)
+        .map_or_else(|| spec.to_string(), |hosted| hosted.shortcut(HostedOpts::default()))
+}
Evidence
The new helper always invokes hosted-git parsing; the hosted-git parser performs URL parsing via
reqwest::Url::parse, so non-git specifiers pay this cost even though they’re returned unchanged.

pacquet/crates/package-manager/src/add.rs[468-477]
pacquet/crates/resolving-git-resolver/src/hosted_git.rs[144-166]
pacquet/crates/resolving-git-resolver/src/hosted_git.rs[398-427]

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

## Issue description
`normalized_save_specifier()` invokes hosted-git parsing for every non-registry specifier, even when the specifier is clearly not hosted-git and will be returned verbatim (e.g. `file:`, `workspace:`, `npm:` aliases). This introduces avoidable parsing/allocations on the `pacquet add` path.
### Issue Context
- The helper is intended to only rewrite hosted-git inputs to shortcuts, and leave everything else unchanged.
- `HostedGit::from_url()` runs `correct_protocol()` and `parse_git_url()`, which calls `reqwest::Url::parse()`.
### Fix Focus Areas
- pacquet/crates/package-manager/src/add.rs[468-477]
Suggested approach: add a cheap pre-check before calling `HostedGit::from_url()` (e.g., early-return for prefixes like `file:`, `link:`, `workspace:`, `npm:`, and/or only attempt hosted-git parsing if the input contains a `/` or looks like a URL/hosted shortcut).

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


Grey Divider

Qodo Logo

@github-actions

github-actions Bot commented Jun 21, 2026 •

Copy link
Copy Markdown
Contributor

Micro-Benchmark Results

Linux

group                          main                                   pr
-----                          ----                                   --
tarball/download_dependency    1.00      8.3±0.05ms   523.6 KB/sec    1.00      8.3±0.24ms   525.4 KB/sec

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit eb8aec3

@codecov-commenter

codecov-commenter commented Jun 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.03%. Comparing base (49971fb) to head (0559861).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12557      +/-   ##
==========================================
+ Coverage   87.97%   88.03%   +0.05%     
==========================================
  Files         321      321              
  Lines       44517    44522       +5     
==========================================
+ Hits        39166    39194      +28     
+ Misses       5351     5328      -23     

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

…specs

normalized_save_specifier shortcutted every hosted-git URL, but the shortcut
form cannot carry HTTPS userinfo, so an auth-bearing URL loses its credentials
on save and the follow-up install could no longer reach the private repo. Keep
auth-bearing URLs verbatim, mirroring the git resolver's normalized_bare_specifier,
which preserves them rather than shortcutting.

Also extend the unit test to GitLab and Bitbucket shorthand/URL forms.

Addresses review feedback on #12557.
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 0559861

1 similar comment
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 0559861

@github-actions

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

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.944 ± 0.196 3.657 4.257 1.88 ± 0.10
pacquet@main 3.899 ± 0.173 3.692 4.197 1.86 ± 0.09
pnpr@HEAD 2.093 ± 0.051 2.016 2.169 1.00
pnpr@main 2.181 ± 0.127 2.025 2.399 1.04 ± 0.07
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 3.9437285296600004,
      "stddev": 0.19551983535926803,
      "median": 3.90895300356,
      "user": 3.8020299599999996,
      "system": 3.35416612,
      "min": 3.65709906356,
      "max": 4.257088058560001,
      "times": [
        3.8512968715600002,
        4.052090118560001,
        4.257088058560001,
        3.9430026435600003,
        4.20244397256,
        3.87490336356,
        3.80525308256,
        4.05231511756,
        3.74179300456,
        3.65709906356
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 3.89894119826,
      "stddev": 0.17289261232932024,
      "median": 3.84218280256,
      "user": 3.74778326,
      "system": 3.3743854199999994,
      "min": 3.69165671556,
      "max": 4.19680024556,
      "times": [
        4.103043626560001,
        3.77895197156,
        4.19680024556,
        3.69165671556,
        3.87024543156,
        3.77904594656,
        3.89277038256,
        3.81412017356,
        3.76294302056,
        4.09983446856
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 2.0930718850599996,
      "stddev": 0.05130893920242444,
      "median": 2.09038942056,
      "user": 2.7676913599999997,
      "system": 2.9298991199999995,
      "min": 2.01600553256,
      "max": 2.16898815156,
      "times": [
        2.13580636856,
        2.12636989156,
        2.16898815156,
        2.04426177256,
        2.14696240256,
        2.01600553256,
        2.06845333256,
        2.05802657556,
        2.05351931456,
        2.11232550856
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 2.18117222376,
      "stddev": 0.12683620744844515,
      "median": 2.19130957756,
      "user": 2.76707396,
      "system": 2.9263640199999994,
      "min": 2.02463159756,
      "max": 2.39874436456,
      "times": [
        2.2481021065599998,
        2.32257554756,
        2.02463159756,
        2.39874436456,
        2.0490783545599998,
        2.05284734656,
        2.18287426156,
        2.19974489356,
        2.24956449956,
        2.08355926556
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 648.5 ± 10.5 635.2 663.7 1.00
pacquet@main 650.5 ± 21.8 626.3 706.5 1.00 ± 0.04
pnpr@HEAD 745.0 ± 47.2 705.1 873.5 1.15 ± 0.08
pnpr@main 750.7 ± 50.8 707.5 863.8 1.16 ± 0.08
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.6484721569199999,
      "stddev": 0.010466517904883696,
      "median": 0.64528248582,
      "user": 0.40250778,
      "system": 1.31556762,
      "min": 0.63523339432,
      "max": 0.66373648732,
      "times": [
        0.63523339432,
        0.64163348432,
        0.65609241032,
        0.65710856732,
        0.63545750932,
        0.66181915632,
        0.66373648732,
        0.64307558832,
        0.64449202232,
        0.64607294932
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.6504525742200001,
      "stddev": 0.021841259521715433,
      "median": 0.64548494132,
      "user": 0.37886597999999994,
      "system": 1.3276716199999998,
      "min": 0.62627916132,
      "max": 0.7065404213200001,
      "times": [
        0.65148686532,
        0.65175991332,
        0.6421608923200001,
        0.64276380832,
        0.64820607432,
        0.62627916132,
        0.63994459632,
        0.6354076403200001,
        0.65997636932,
        0.7065404213200001
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.7449588980199999,
      "stddev": 0.04723111123427726,
      "median": 0.73774966582,
      "user": 0.44017808,
      "system": 1.38425902,
      "min": 0.7051229493200001,
      "max": 0.8735443743200001,
      "times": [
        0.7051229493200001,
        0.7433033613200001,
        0.73599738932,
        0.74298928832,
        0.7249951773200001,
        0.71110092132,
        0.73950194232,
        0.8735443743200001,
        0.72780716832,
        0.7452264083200001
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.7507461788199998,
      "stddev": 0.05081422986060521,
      "median": 0.73766732682,
      "user": 0.44656108000000005,
      "system": 1.3936870200000002,
      "min": 0.7074587933200001,
      "max": 0.8638393603200001,
      "times": [
        0.72147992332,
        0.72175449132,
        0.7074587933200001,
        0.7107587053200001,
        0.73782543432,
        0.7471671403200001,
        0.8638393603200001,
        0.73750921932,
        0.8200317583200001,
        0.7396369623200001
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.507 ± 0.079 4.413 4.621 2.07 ± 0.12
pacquet@main 4.437 ± 0.043 4.394 4.545 2.04 ± 0.12
pnpr@HEAD 2.178 ± 0.075 2.075 2.311 1.00 ± 0.07
pnpr@main 2.172 ± 0.123 2.067 2.427 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.50699388914,
      "stddev": 0.07942485559988188,
      "median": 4.49144157894,
      "user": 4.0613002,
      "system": 3.4354785,
      "min": 4.4133682069399995,
      "max": 4.62050522994,
      "times": [
        4.56460454894,
        4.42288029194,
        4.45999307494,
        4.49187967394,
        4.62050522994,
        4.49100348394,
        4.4133682069399995,
        4.42249207694,
        4.57460827594,
        4.60860402794
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.436661464039999,
      "stddev": 0.043187374528634144,
      "median": 4.428794595439999,
      "user": 4.0140798,
      "system": 3.38857,
      "min": 4.3944295779399996,
      "max": 4.544684806939999,
      "times": [
        4.40414912194,
        4.44439752494,
        4.44000923694,
        4.4159594769399995,
        4.43567911094,
        4.46033027294,
        4.544684806939999,
        4.3944295779399996,
        4.40506543094,
        4.42191007994
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 2.17758763974,
      "stddev": 0.07541167951331174,
      "median": 2.16746003194,
      "user": 2.6561902,
      "system": 2.8980559,
      "min": 2.07464093094,
      "max": 2.31117681794,
      "times": [
        2.11160801594,
        2.21357298494,
        2.18011785294,
        2.2701726289399997,
        2.1391242669399997,
        2.1059367509399998,
        2.15480221094,
        2.07464093094,
        2.31117681794,
        2.21472393694
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 2.17223629074,
      "stddev": 0.12312426890936187,
      "median": 2.13924624844,
      "user": 2.7042075,
      "system": 2.9133223,
      "min": 2.06717018294,
      "max": 2.42721664294,
      "times": [
        2.1251756939399997,
        2.3334800319399998,
        2.1768555359399997,
        2.15331680294,
        2.0677222239399997,
        2.0740196479399997,
        2.21980704994,
        2.42721664294,
        2.07759909494,
        2.06717018294
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.468 ± 0.012 1.447 1.489 2.08 ± 0.07
pacquet@main 1.499 ± 0.093 1.448 1.763 2.12 ± 0.15
pnpr@HEAD 0.706 ± 0.022 0.684 0.750 1.00
pnpr@main 0.709 ± 0.021 0.690 0.765 1.00 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.4675202713200002,
      "stddev": 0.012468207663605098,
      "median": 1.46907348482,
      "user": 1.49123922,
      "system": 1.7640708799999998,
      "min": 1.44744380232,
      "max": 1.48928606132,
      "times": [
        1.47219327132,
        1.44744380232,
        1.4721888953200002,
        1.4628413743200002,
        1.47063050432,
        1.46486709032,
        1.44967986832,
        1.4785553803200002,
        1.48928606132,
        1.4675164653200001
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.4987985813200002,
      "stddev": 0.09347978853856058,
      "median": 1.47271982532,
      "user": 1.47158032,
      "system": 1.7674558799999995,
      "min": 1.44786089032,
      "max": 1.76302807332,
      "times": [
        1.4803141153200001,
        1.76302807332,
        1.4750829733200002,
        1.44786089032,
        1.4674712783200001,
        1.4564207153200002,
        1.46722238732,
        1.4748781313200001,
        1.4705615193200001,
        1.48514572932
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.7055085525200001,
      "stddev": 0.021998937829892297,
      "median": 0.6964550028200001,
      "user": 0.39005871999999997,
      "system": 1.3026556799999998,
      "min": 0.68410127932,
      "max": 0.75001067632,
      "times": [
        0.75001067632,
        0.69416268132,
        0.73953181932,
        0.69531520632,
        0.71154765532,
        0.69869616832,
        0.69574795632,
        0.68410127932,
        0.69716204932,
        0.68881003332
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.7086795411200001,
      "stddev": 0.02109880459993417,
      "median": 0.70297372132,
      "user": 0.38212711999999993,
      "system": 1.30751398,
      "min": 0.69021024232,
      "max": 0.76522793232,
      "times": [
        0.70052151232,
        0.6969437603199999,
        0.70542593032,
        0.70936924932,
        0.71074602732,
        0.69021024232,
        0.69863315232,
        0.69718220132,
        0.76522793232,
        0.71253540332
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 3.250 ± 0.064 3.190 3.411 4.61 ± 0.13
pacquet@main 3.212 ± 0.023 3.189 3.245 4.56 ± 0.10
pnpr@HEAD 0.705 ± 0.014 0.688 0.729 1.00
pnpr@main 0.720 ± 0.049 0.685 0.842 1.02 ± 0.07
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 3.2496469782600004,
      "stddev": 0.06378928916905001,
      "median": 3.2420981828599995,
      "user": 1.9719285799999997,
      "system": 2.0445194399999997,
      "min": 3.18998992536,
      "max": 3.4105283593599998,
      "times": [
        3.4105283593599998,
        3.25793351436,
        3.24772737636,
        3.21182234536,
        3.2463855363599996,
        3.18998992536,
        3.23781082936,
        3.28610000136,
        3.20886371736,
        3.19930817736
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 3.21205820936,
      "stddev": 0.022790528115574055,
      "median": 3.20490876636,
      "user": 1.93038518,
      "system": 2.0477472399999996,
      "min": 3.18908647636,
      "max": 3.2449258793599998,
      "times": [
        3.19041415436,
        3.19284780336,
        3.18908647636,
        3.1993285503599997,
        3.1949748693599997,
        3.24104115236,
        3.2150175163599997,
        3.2449258793599998,
        3.24245670936,
        3.21048898236
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.70457514386,
      "stddev": 0.013845707991883538,
      "median": 0.69792999036,
      "user": 0.37975378000000004,
      "system": 1.33162344,
      "min": 0.68759400936,
      "max": 0.72910135336,
      "times": [
        0.7177197003600001,
        0.7086975683600001,
        0.6969427003600001,
        0.6917705323600001,
        0.69801990836,
        0.72910135336,
        0.72118555636,
        0.69784007236,
        0.69688003736,
        0.68759400936
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.7201095902600001,
      "stddev": 0.04894990587409076,
      "median": 0.7052563483600001,
      "user": 0.38677558,
      "system": 1.31045124,
      "min": 0.68545979536,
      "max": 0.8420296323600001,
      "times": [
        0.68545979536,
        0.71421982636,
        0.6912071293600001,
        0.7027617853600001,
        0.6909838423600001,
        0.7681437253600001,
        0.6905571553600001,
        0.7079820993600001,
        0.70775091136,
        0.8420296323600001
      ]
    }
  ]
}

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/12557
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,506.99 ms
(+6.63%)Baseline: 4,226.79 ms
5,072.15 ms
(88.86%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
3,249.65 ms
(+8.22%)Baseline: 3,002.72 ms
3,603.27 ms
(90.19%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
1,467.52 ms
(+10.04%)Baseline: 1,333.68 ms
1,600.42 ms
(91.70%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
3,943.73 ms
(-2.29%)Baseline: 4,036.32 ms
4,843.58 ms
(81.42%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
648.47 ms
(+3.31%)Baseline: 627.67 ms
753.21 ms
(86.09%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/12557
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,177.59 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
704.58 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
705.51 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
2,093.07 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
744.96 ms
🐰 View full continuous benchmarking report in Bencher

@zkochan
zkochan merged commit b4fdfe9 into main Jun 21, 2026
35 checks passed
@zkochan
zkochan deleted the feat/pacquet-git-add-normalization branch June 21, 2026 14:48
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.

2 participants