Repository navigation
fix(git-resolver): don't record SSH URLs for git deps that didn't ask for SSH - #13290
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughGit resolver fallbacks now use HTTPS for shorthand and HTTPS-style specifications when probes fail, while retaining SSH fallback for explicitly SSH-style inputs. HTTP visibility probes retry transient failures. Rust and TypeScript implementations, tests, dependencies, and release metadata are updated. ChangesGit HTTPS fallback
Estimated code review effort: 4 (Complex) | ~45 minutes Assessment against linked issues
Sequence Diagram(s)sequenceDiagram
participant PackageResolver
participant GitResolver
participant GitHub
participant Codeload
PackageResolver->>GitResolver: resolve shorthand or HTTPS Git specifier
GitResolver->>GitHub: probe HTTPS visibility and remote access
GitHub-->>GitResolver: probe result
GitResolver->>Codeload: resolve commit tarball when HTTPS Git resolution is unavailable
Codeload-->>PackageResolver: HTTPS tarball resolution
Possibly related PRs
Suggested labels: Suggested reviewers: ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Confidence Score: 5/5The PR appears safe to merge. No blocking failures remain within the scope of the previous review thread. Reviews (8): Last reviewed commit: "fix(git-resolver): fall back to HTTPS in..." | Re-trigger Greptile |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
pnpm/crates/resolving-git-resolver/src/git_resolver/tests.rs (1)
243-248: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse a regular rationale comment for this private test.
These rustdoc lines narrate the test scenario and expected resolution. Replace them with a concise
//comment explaining only the CI/explicit-HTTPS invariant.As per path instructions, “Use rustdoc comments for public API contracts and regular comments for implementation rationale. Do not duplicate test behavior in documentation.”
🤖 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/resolving-git-resolver/src/git_resolver/tests.rs` around lines 243 - 248, Replace the rustdoc block above the private test with a concise regular // comment. Keep only the implementation rationale that explicit HTTPS must remain usable in CI when SSH and anonymous HTTPS probes fail; remove the step-by-step scenario and expected tarball-resolution details.Source: Path instructions
🤖 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 `@pnpm/crates/resolving-git-resolver/src/git_resolver/tests.rs`:
- Around line 243-248: Replace the rustdoc block above the private test with a
concise regular // comment. Keep only the implementation rationale that explicit
HTTPS must remain usable in CI when SSH and anonymous HTTPS probes fail; remove
the step-by-step scenario and expected tarball-resolution details.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: bcbfaaf9-e5bd-4946-b47b-de3e29bce3e3
📒 Files selected for processing (7)
.changeset/git-ci-https-fallback.mdpnpm/crates/resolving-git-resolver/src/git_resolver/tests.rspnpm/crates/resolving-git-resolver/src/hosted_git.rspnpm/crates/resolving-git-resolver/src/parse_bare_specifier.rspnpm/crates/resolving-git-resolver/src/parse_bare_specifier/tests.rspnpm11/resolving/git-resolver/src/parseBareSpecifier.tspnpm11/resolving/git-resolver/test/index.ts
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13290 +/- ##
==========================================
+ Coverage 88.00% 88.17% +0.17%
==========================================
Files 567 612 +45
Lines 97930 99604 +1674
==========================================
+ Hits 86179 87823 +1644
- Misses 11751 11781 +30 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
pnpm/crates/resolving-git-resolver/src/parse_bare_specifier/tests.rs (1)
123-126: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winAssert the probe behavior, not only the final URL.
Fakerecords probe calls, but this test never inspects them. A regression that skips or changes the HTTPS/SSH probe sequence could still pass while returning the expected SSH fallback. Assert the expected recorded calls (and ordering/count) alongsidefetch_spec.As per path instructions,
REVIEW_GUIDE.mdrequires regression coverage for both the selected transport and probe behavior.🤖 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/resolving-git-resolver/src/parse_bare_specifier/tests.rs` around lines 123 - 126, Update the test around kind.finalize(&probe) to assert Fake’s recorded probe calls in addition to spec.fetch_spec. Verify the expected HTTPS/SSH probe sequence, including ordering and call count, so the test covers both selected transport and probe behavior.Source: Path instructions
🤖 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 `@pnpm/crates/resolving-git-resolver/src/parse_bare_specifier/tests.rs`:
- Around line 123-126: Update the test around kind.finalize(&probe) to assert
Fake’s recorded probe calls in addition to spec.fetch_spec. Verify the expected
HTTPS/SSH probe sequence, including ordering and call count, so the test covers
both selected transport and probe behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 7ee11de5-0e2a-42ac-b78a-a3110fefb08d
📒 Files selected for processing (3)
pnpm/crates/resolving-git-resolver/src/git_resolver/tests.rspnpm/crates/resolving-git-resolver/src/parse_bare_specifier/tests.rspnpm11/resolving/git-resolver/test/index.ts
💤 Files with no reviewable changes (1)
- pnpm11/resolving/git-resolver/test/index.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- pnpm/crates/resolving-git-resolver/src/git_resolver/tests.rs
Integrated-Benchmark Report (Linux)Commit: 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
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.7275738907400005,
"stddev": 0.13393324754075028,
"median": 2.71279164174,
"user": 2.29335488,
"system": 1.7804692799999997,
"min": 2.53825423474,
"max": 2.91729972174,
"times": [
2.53825423474,
2.91230268574,
2.81574340374,
2.58878468574,
2.61305602274,
2.65046814274,
2.91729972174,
2.7395808857399997,
2.68600239774,
2.81424672674
]
},
{
"command": "pacquet@main",
"mean": 2.64873416464,
"stddev": 0.13917619800597367,
"median": 2.6003342192399996,
"user": 2.2023819799999997,
"system": 1.6912917799999998,
"min": 2.47158340074,
"max": 2.89810978474,
"times": [
2.58444926574,
2.56719645274,
2.47158340074,
2.69155820774,
2.89810978474,
2.57648940574,
2.5993787947399998,
2.88698126374,
2.61030542674,
2.60128964374
]
},
{
"command": "pnpr@HEAD",
"mean": 1.67692673674,
"stddev": 0.12185867715472072,
"median": 1.66125153824,
"user": 1.4305934799999995,
"system": 1.4457087799999997,
"min": 1.47802501874,
"max": 1.83435241974,
"times": [
1.7965989757399998,
1.59344054174,
1.75798454274,
1.83435241974,
1.62075213574,
1.62807020974,
1.81607425174,
1.69443286674,
1.54953640474,
1.47802501874
]
},
{
"command": "pnpr@main",
"mean": 1.73232961824,
"stddev": 0.13844462129416696,
"median": 1.78655986574,
"user": 1.6746933799999997,
"system": 1.67996768,
"min": 1.50965095574,
"max": 1.90507122874,
"times": [
1.81607785874,
1.50965095574,
1.5869613617399998,
1.84031092074,
1.75704187274,
1.82215305874,
1.90507122874,
1.8163813387399999,
1.5386138697399998,
1.7310337167399998
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.37675756744000005,
"stddev": 0.02067183865916729,
"median": 0.37613369744,
"user": 0.30966238,
"system": 0.7030866199999999,
"min": 0.34815938744,
"max": 0.40363483644000003,
"times": [
0.40363483644000003,
0.40263020044000003,
0.39774981444,
0.37039648244000006,
0.36587204344,
0.38187091244000004,
0.34815938744,
0.38652120544,
0.35494731644000005,
0.35579347544000006
]
},
{
"command": "pacquet@main",
"mean": 0.34538746074,
"stddev": 0.031236461014083117,
"median": 0.3453057984400001,
"user": 0.30597838,
"system": 0.6396968199999999,
"min": 0.27730099744000003,
"max": 0.38896705844000007,
"times": [
0.38896705844000007,
0.35451520444000006,
0.35640591644,
0.33273140244000005,
0.33467024344,
0.27730099744000003,
0.33609639244000006,
0.37895977444000006,
0.36365707444000006,
0.33057054344000003
]
},
{
"command": "pnpr@HEAD",
"mean": 0.34719966323999996,
"stddev": 0.03017866204140098,
"median": 0.34600181544,
"user": 0.28803118,
"system": 0.6518081199999999,
"min": 0.30542338444000006,
"max": 0.41332641844000007,
"times": [
0.37534025644,
0.34577995844000003,
0.41332641844000007,
0.35658432144,
0.34697148644000003,
0.30542338444000006,
0.32911298744000006,
0.32334899044000004,
0.32988515644000005,
0.34622367244
]
},
{
"command": "pnpr@main",
"mean": 0.42512845334000005,
"stddev": 0.056611379743693215,
"median": 0.42113985294000006,
"user": 0.34567568,
"system": 0.7190866199999999,
"min": 0.35135435844,
"max": 0.53029364644,
"times": [
0.38151279944000005,
0.35135435844,
0.35137151044000003,
0.44143000944000005,
0.41008259644000006,
0.42605671744000007,
0.46342770544000006,
0.53029364644,
0.41622298844000005,
0.47953220144
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.9980535004399997,
"stddev": 0.07458067646806933,
"median": 2.98746058474,
"user": 2.5426973399999997,
"system": 2.08488014,
"min": 2.90410413174,
"max": 3.1596243077399997,
"times": [
3.0641102017399997,
3.1596243077399997,
3.00907049974,
2.9200110267399997,
3.0013094747399998,
3.0291425187399996,
2.90410413174,
2.95485283374,
2.9736116947399998,
2.96469831474
]
},
{
"command": "pacquet@main",
"mean": 3.03849425074,
"stddev": 0.14196056533544893,
"median": 2.99293054874,
"user": 2.5236788399999996,
"system": 2.0360540400000002,
"min": 2.88001625274,
"max": 3.3091053587399997,
"times": [
3.18758115274,
3.3091053587399997,
3.18608602574,
3.0245229227399997,
2.96510040874,
2.98073510474,
2.95843771674,
2.88823157174,
2.88001625274,
3.00512599274
]
},
{
"command": "pnpr@HEAD",
"mean": 1.7989981398399997,
"stddev": 0.12021709762045915,
"median": 1.77083164124,
"user": 1.55015594,
"system": 1.6309227400000001,
"min": 1.60378147274,
"max": 2.0077539777399998,
"times": [
1.73512138274,
1.80191245474,
1.7316983937400001,
1.7914457667400001,
1.75021751574,
1.91730812974,
2.0077539777399998,
1.60378147274,
1.72063838274,
1.93010392174
]
},
{
"command": "pnpr@main",
"mean": 1.7595465270400001,
"stddev": 0.1272659514820241,
"median": 1.8043242432400002,
"user": 1.43709034,
"system": 1.5694010399999998,
"min": 1.52864942574,
"max": 1.9108788647400001,
"times": [
1.7971163657400002,
1.52864942574,
1.6288437317400002,
1.81708777474,
1.8115321207400001,
1.82783081174,
1.78813336574,
1.9108788647400001,
1.60305644074,
1.88233636874
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.5755099405,
"stddev": 0.023028164818616484,
"median": 0.567398344,
"user": 0.76065942,
"system": 0.94295542,
"min": 0.5475866805,
"max": 0.6087345725,
"times": [
0.5475866805,
0.5578517795,
0.5693122935,
0.5497644415,
0.5646353905,
0.6076062235,
0.5654843945,
0.5857704435,
0.6087345725,
0.5983531855
]
},
{
"command": "pacquet@main",
"mean": 0.5432674826999999,
"stddev": 0.04747784473821738,
"median": 0.5248959,
"user": 0.76656042,
"system": 0.8520861200000001,
"min": 0.5024036525,
"max": 0.6412602495,
"times": [
0.5824778805,
0.5024036525,
0.5030273425,
0.5106101845,
0.6412602495,
0.5981093685,
0.5187521965,
0.5317353905,
0.5310396035,
0.5132589585
]
},
{
"command": "pnpr@HEAD",
"mean": 0.3997703543000001,
"stddev": 0.013739991957766954,
"median": 0.3984937475,
"user": 0.29687101999999993,
"system": 0.6456384199999999,
"min": 0.3766289635,
"max": 0.4202726005,
"times": [
0.4024572615,
0.40662236350000003,
0.3945302335,
0.4202726005,
0.4156199025,
0.4106355705,
0.3936138635,
0.3906120855,
0.3766289635,
0.3867106985
]
},
{
"command": "pnpr@main",
"mean": 0.3986746841999999,
"stddev": 0.029819598012241152,
"median": 0.39370436750000004,
"user": 0.30055232,
"system": 0.66528332,
"min": 0.3531226755,
"max": 0.4427892295,
"times": [
0.4265139125,
0.4427892295,
0.4004092145,
0.4114336095,
0.3737426925,
0.3767527355,
0.3787948195,
0.3869995205,
0.4361884325,
0.3531226755
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.91785025012,
"stddev": 0.11250926485572676,
"median": 1.88292733662,
"user": 1.0634684799999998,
"system": 0.9532408,
"min": 1.80824062262,
"max": 2.11060706062,
"times": [
2.11060706062,
2.07374279462,
2.02131538962,
1.85098060262,
1.8264903866200002,
1.84339183062,
1.91487407062,
1.8111876366200002,
1.80824062262,
1.91767210662
]
},
{
"command": "pacquet@main",
"mean": 1.98954384952,
"stddev": 0.11708329797437687,
"median": 1.98345268912,
"user": 1.18802288,
"system": 1.0529528999999997,
"min": 1.85291897362,
"max": 2.12705001862,
"times": [
1.86491102562,
1.8992826796200002,
1.95345193462,
2.01345344362,
1.85810032362,
1.85291897362,
2.10750206162,
2.12227971962,
2.09648831462,
2.12705001862
]
},
{
"command": "pnpr@HEAD",
"mean": 0.47195551302000005,
"stddev": 0.08576504797305042,
"median": 0.45540804062000007,
"user": 0.33851767999999993,
"system": 0.7509612999999999,
"min": 0.36232467962000003,
"max": 0.64954218862,
"times": [
0.46456293662000003,
0.44136491262000005,
0.49961287162,
0.52008387262,
0.54594616062,
0.64954218862,
0.44625314462000004,
0.41185444162,
0.37800992162,
0.36232467962000003
]
},
{
"command": "pnpr@main",
"mean": 0.69631675772,
"stddev": 0.19976935335961435,
"median": 0.64926297362,
"user": 0.50055638,
"system": 0.9440429000000001,
"min": 0.52257142562,
"max": 1.20256150762,
"times": [
0.5870984986200001,
0.68659728962,
0.61192865762,
1.20256150762,
0.71711151462,
0.7836539426200001,
0.74925019262,
0.56812406762,
0.53427048062,
0.52257142562
]
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.3558666383000001,
"stddev": 0.08382247015326869,
"median": 0.31715566250000005,
"user": 0.32876684,
"system": 0.12124868,
"min": 0.2817490875,
"max": 0.5608083415,
"times": [
0.3117269865,
0.5608083415,
0.41689709950000003,
0.39120723550000003,
0.3202541025,
0.3565740625,
0.2940829435,
0.2817490875,
0.3140572225,
0.3113093015
]
},
{
"command": "pacquet@main",
"mean": 0.3269280120000001,
"stddev": 0.06260211638641812,
"median": 0.31228710800000004,
"user": 0.2956859399999999,
"system": 0.11891088000000001,
"min": 0.26038644050000004,
"max": 0.46199891550000005,
"times": [
0.2910368125,
0.27484360550000003,
0.3255908765,
0.30489509350000005,
0.3196791225,
0.39104860750000003,
0.36376557150000005,
0.46199891550000005,
0.27603507450000003,
0.26038644050000004
]
},
{
"command": "pnpr@HEAD",
"mean": 0.10932170412962965,
"stddev": 0.011495507221887316,
"median": 0.1076824635,
"user": 0.03275729185185185,
"system": 0.016395346666666664,
"min": 0.0947262375,
"max": 0.1339339525,
"times": [
0.1018654865,
0.10287507350000001,
0.1076824635,
0.0947262375,
0.10632348050000001,
0.12209965350000002,
0.12003872150000001,
0.11535368150000001,
0.11219543050000001,
0.12966577550000002,
0.1339339525,
0.11398524250000001,
0.12242865150000001,
0.10646603850000001,
0.09488792150000001,
0.12263697250000001,
0.12644361250000002,
0.10784281450000001,
0.09926893950000001,
0.11181808150000001,
0.10052922750000001,
0.09525463950000002,
0.10216549050000001,
0.10983379450000001,
0.09780582150000001,
0.09482013350000001,
0.09873867350000001
]
},
{
"command": "pnpr@main",
"mean": 0.10434051702000001,
"stddev": 0.006953573212462496,
"median": 0.10248833650000001,
"user": 0.03132623999999999,
"system": 0.013526920000000003,
"min": 0.09495329350000001,
"max": 0.11717521350000001,
"times": [
0.11175451150000001,
0.11077362950000001,
0.10205677750000001,
0.11489198550000002,
0.1092414715,
0.10739388050000001,
0.1090708615,
0.09834601650000001,
0.09495329350000001,
0.10076430950000001,
0.09611735150000002,
0.09733985650000002,
0.09833747050000001,
0.11717521350000001,
0.11140752050000001,
0.1105996535,
0.09815445750000001,
0.09933462350000001,
0.10248833650000001,
0.1053523365,
0.10683270750000001,
0.0964550645,
0.11500655050000001,
0.0969362685,
0.09772877750000002
]
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.0140686773822223,
"stddev": 0.22434410537313595,
"median": 0.98705882816,
"user": 0.9394805844444445,
"system": 0.16039069333333333,
"min": 0.7612668371600001,
"max": 1.43477632916,
"times": [
1.20567067216,
1.18675952116,
0.80081793816,
0.7612668371600001,
0.81094485916,
0.9260932751600001,
0.98705882816,
1.43477632916,
1.01322983616
]
},
{
"command": "pacquet@main",
"mean": 1.1861399008266666,
"stddev": 0.34482654743989005,
"median": 1.1656134681599999,
"user": 1.124891362222222,
"system": 0.1976594711111111,
"min": 0.74321576716,
"max": 1.72047623716,
"times": [
1.20834193516,
1.05702023716,
0.9108457321600001,
1.72047623716,
1.1656134681599999,
1.70044431916,
1.29803239916,
0.8712690121600001,
0.74321576716
]
},
{
"command": "pnpm@HEAD",
"mean": 4.283795133493333,
"stddev": 0.37287859495364717,
"median": 4.4237296301599995,
"user": 6.607410139999999,
"system": 0.4070752488888889,
"min": 3.77026484916,
"max": 4.758348778159999,
"times": [
4.4237296301599995,
3.82427748116,
3.77026484916,
4.45652483916,
4.55542420116,
4.758348778159999,
4.62510748216,
4.27189618116,
3.86858275916
]
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.85645253436,
"stddev": 0.22578658609845478,
"median": 4.897009339359999,
"user": 2.66629404,
"system": 2.00798832,
"min": 4.519608874859999,
"max": 5.17859632486,
"times": [
4.693216682859999,
5.06779804486,
4.63948068886,
5.17859632486,
5.02320506586,
4.970739507859999,
4.519608874859999,
4.6253652998599994,
5.023235682859999,
4.823279170859999
]
},
{
"command": "pacquet@main",
"mean": 4.78468136476,
"stddev": 0.2654465397846592,
"median": 4.72296456386,
"user": 2.77677994,
"system": 2.0191183199999996,
"min": 4.535671488859999,
"max": 5.48535504986,
"times": [
5.48535504986,
4.80743393886,
4.64568233286,
4.69455556086,
4.535671488859999,
4.77795237886,
4.613695326859999,
4.66202899286,
4.75137356686,
4.8730650108599995
]
},
{
"command": "pnpr@HEAD",
"mean": 3.7381289703600005,
"stddev": 0.17263787377287326,
"median": 3.7128608093600004,
"user": 1.77648924,
"system": 1.71432702,
"min": 3.52604248486,
"max": 4.09451765386,
"times": [
3.60563532186,
4.09451765386,
3.85133863586,
3.5973345238600003,
3.86075628886,
3.6485763758600003,
3.8096756608600004,
3.77714524286,
3.6102675148600003,
3.52604248486
]
},
{
"command": "pnpr@main",
"mean": 3.6815194185599998,
"stddev": 0.15682051767342609,
"median": 3.62161673436,
"user": 1.70802144,
"system": 1.58656782,
"min": 3.52735543586,
"max": 3.90761550286,
"times": [
3.87020438986,
3.52999756786,
3.60789629886,
3.63533716986,
3.90761550286,
3.8571441868600003,
3.54445688286,
3.52735543586,
3.79071116286,
3.54447558786
]
}
]
} |
|
| Project | pnpm's project |
| Branch | pr/13290 |
| Testbed | pnpr |
⚠️ 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-thresholdsflag.
Click to view all benchmark results
| Benchmark | Latency | milliseconds (ms) |
|---|---|---|
| isolated-linker.fresh-install.cold-cache.cold-store | 📈 view plot | 1,430.66 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 283.45 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 294.09 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 83.41 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 1,364.05 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 3,450.50 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 245.86 ms |
b1cca05 to
cc45dcc
Compare
Code Review by Qodo
1. Changeset uses historical phrasing
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Code review by qodo was updated up to the latest commit 29063b7 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Code review by qodo was updated up to the latest commit 2633230 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
2633230 to
d231976
Compare
|
Code review by qodo was updated up to the latest commit d231976 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Code review by qodo was updated up to the latest commit c8987f0 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
…not transport choices (#13684) Hosted specs (github:/gitlab:/bitbucket: shortcuts and HTTPS/SSH URLs of those hosts) now all resolve through the host's canonical HTTPS URL. The lockfile records either the host archive tarball - only when an anonymous HEAD of the exact archive URL succeeds, so a recorded archive URL is fetchable by construction - or a git resolution over the canonical HTTPS URL, which any machine with access to the repo can fetch. SSH is never inferred: reaching a host over SSH is per-machine git configuration (url.insteadOf), which pnpm honors by shelling out to git. This deletes the resolve-time transport probing (HTTP HEAD publicness check plus https/ssh ls-remote reachability ladder) that could freeze one machine's working transport into the lockfile and break every environment configured differently - the #13276 bug class. URLs of unknown hosts and URLs with embedded credentials keep their exact URL and never resolve to a host archive. parse_bare_specifier becomes fully synchronous and network-free; the GitProbe seam shrinks to one method (anonymous_head_ok, with transient-status retries) consumed by pick_resolution. Existing lockfile entries are untouched - the new rules apply to fresh and re-resolutions only, and both recorded shapes already exist in the lockfile format. Rust-only breaking change for the v12 lane; the TypeScript CLI stays on the v11 probing behavior (fixed separately in #13290). Related to #13276.
…t specs on CI Two flaws let a transient probe failure record an SSH URL for a spec that never asked for SSH: the visibility HEAD probe ran once with retries disabled and treated any failure as private, and the SSH ls-remote probe ran before the anonymous HTTPS one. On a machine with SSH keys, a throttled HEAD request resolved a public repo to git@host:..., breaking later installs on keyless CI runners with Permission denied (publickey). The resolver now retries transient HEAD failures, probes anonymous HTTPS git access before SSH for every representation except explicit SSH URLs, falls back to HTTPS when every probe fails, and records the host-archive tarball only for repos proven public - otherwise the resolution stays type: git so ambient credentials apply. TypeScript CLI only: pacquet resolves this bug class structurally via the v12 identity redesign (pnpm#13684), which supersedes the Rust-side commits this PR previously carried. Closes pnpm#13276. Co-Authored-By: Claude Fable 5 <[email protected]>
c8987f0 to
54835ae
Compare
|
Rebuilt this branch on top of the merged v12 identity redesign (pnpm/pnpm#13684): the pacquet commits this PR carried are superseded by that redesign, so the branch is now a single TypeScript-only commit ( Written by an agent (Claude Code, claude-fable-5). |
|
Code review by qodo was updated up to the latest commit 54835ae |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
… how (#13794) A specifier that does not ask for SSH resolves over HTTPS, because the URL pnpm records is shared by every machine that installs the lockfile (#13290). On a machine whose git cannot use that transport - a container without the host's CA certificates, say - resolution then failed with a raw execa dump: "Command failed with exit code 128: git ls-remote -- 'https://github.com/...'" and a JS stack, naming neither the dependency nor a way forward. A failed ls-remote is now ERR_PNPM_GIT_RESOLVE_FAILED, naming the dependency and redacting the credentials a URL git echoes back can carry. When the resolution went over HTTPS, the error also says why, and points at git's own url.<base>.insteadOf to substitute the transport on this machine only, leaving the recorded URL alone. A missing git binary says so instead of surfacing a bare spawn error. The TypeScript resolver also stops probing anonymous HTTPS git access for a repository the visibility probe already proved public: both outcomes of that probe recorded the same resolution, so its only effect was an extra ls-remote round-trip per git dependency. pacquet never probed. Carrying the code and the remediation across pacquet's type-erased resolver seam takes the mechanism resolver-base documents for exactly that: the diagnostic is boxed outermost and recovered by downcast, in the tree walker and in add. Related to #13743.
Summary
TypeScript CLI (v11) only. This PR fixes a CI regression where shorthand Git dependencies (such as
github:owner/repo) fail to install on CI environments that lack SSH keys, and hardens the git-resolver probing so a transient network failure can no longer poison the lockfile with an SSH URL.Previously, the resolver could record an SSH URL for a spec that never asked for SSH, in two ways:
git+ssh://...).git ls-remoteprobe won andgit@host:...was written into the lockfile, breaking every subsequent install on keyless CI even for public repos.Now:
git ls-remoteaccess is probed before SSH, so SSH is only recorded when HTTPS demonstrably cannot reach the repository.codeload.github.com, which a private repository's consumers cannot fetch); it stays atype: gitresolution against the recorded URL so ambient Git credentials (helpers, tokens) apply.Behavior note: a private repository reachable both over authenticated HTTPS and over SSH now resolves to its HTTPS URL, where previous versions recorded the SSH URL.
Rust side: this PR originally carried matching pacquet commits; they were superseded by the merged v12 identity redesign (pnpm/pnpm#13684), which removes this bug class structurally (no transport probing at all). The branch has been rebuilt on top of that merge as TypeScript-only, and the changeset no longer targets
pacquet.Fixes pnpm/pnpm#13276.
Squash Commit Body
Checklist
pnpm/port, or the description notes what still needs porting. (TypeScript-only by design: the Rust v12 CLI resolves this bug class via the identity redesign merged in feat(resolving-git-resolver)!: treat hosted git specs as identities, not transport choices #13684.)pnpm changeset) if this PR changes any published package.Written by an agent (Claude Code, claude-fable-5).