Repository navigation
feat(resolving-git-resolver)!: treat hosted git specs as identities, not transport choices - #13684
Conversation
…not transport choices 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. Rust-only breaking change for the v12 lane; the TypeScript CLI keeps the v11 probing behavior. Co-Authored-By: Claude Fable 5 <[email protected]>
|
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:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughGit dependency parsing now creates canonical HTTPS identities without network probes. ChangesGit identity contract
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant GitResolver
participant GitProbe
participant RealGitProbe
GitResolver->>GitResolver: Finalize the Git spec
GitResolver->>GitProbe: Check the generated archive URL
GitProbe->>RealGitProbe: Send throttled HTTP HEAD requests
RealGitProbe-->>GitProbe: Return archive availability
GitProbe-->>GitResolver: Return the probe result
GitResolver->>GitResolver: Select tarball or Git resolution
Possibly related PRs
Suggested labels: Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
PR Summary by QodoResolve hosted git deps by identity (canonical HTTPS) with archive HEAD gating
AI Description
Diagram
High-Level Assessment
Files changed (10)
|
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Reviews (5): Last reviewed commit: "fix(resolving-git-resolver): bound each ..." | Re-trigger Greptile |
Micro-Benchmark ResultsLinux |
Code Review by Qodo
1.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
pnpm/crates/resolving-git-resolver/src/runners.rs (1)
34-55: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winWire the probe retry budget through
GitFetchContext.
RealGitProbestill uses a 500 ms / 1 / 2 exponential loop with hardcoded 408, 409, 420, and 429 status retries, while install callers passretry_optsviaGitFetchContext. Move that policy into the probe trait or context and reuse it inRealGitProbe::anonymous_head_ok()so network retries and thetype: gitfallback path share the same policy. Also log rejectedsend()errors at debug level so transport failures do not look like private repos.🤖 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/runners.rs` around lines 34 - 55, Update `RealGitProbe::anonymous_head_ok()` to stop hardcoding the 500 ms / 1 / 2 retry loop and the 408/409/420/429 transient set; instead, read and reuse the retry budget from `GitFetchContext` or the probe trait so the same policy drives both network retries and the `type: git` fallback path. Keep the existing success/non-transient short-circuit behavior, but route the retry timing/status checks through the shared retry settings. Also add a debug-level log for `send()` failures in `anonymous_head_ok()` so transport errors are surfaced without being treated like private-repo responses.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.
Inline comments:
In @.changeset/git-specs-are-identities.md:
- Around line 9-11: Update the fenced code block containing the git config
command to specify the sh language identifier, preserving the command and
surrounding documentation unchanged.
---
Nitpick comments:
In `@pnpm/crates/resolving-git-resolver/src/runners.rs`:
- Around line 34-55: Update `RealGitProbe::anonymous_head_ok()` to stop
hardcoding the 500 ms / 1 / 2 retry loop and the 408/409/420/429 transient set;
instead, read and reuse the retry budget from `GitFetchContext` or the probe
trait so the same policy drives both network retries and the `type: git`
fallback path. Keep the existing success/non-transient short-circuit behavior,
but route the retry timing/status checks through the shared retry settings. Also
add a debug-level log for `send()` failures in `anonymous_head_ok()` so
transport errors are surfaced without being treated like private-repo responses.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 668fd13e-246c-4c62-aa52-1a7d4ff3788c
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock,!Cargo.lock
📒 Files selected for processing (9)
.changeset/git-specs-are-identities.mdpnpm/crates/resolving-git-resolver/Cargo.tomlpnpm/crates/resolving-git-resolver/src/git_resolver.rspnpm/crates/resolving-git-resolver/src/git_resolver/tests.rspnpm/crates/resolving-git-resolver/src/lib.rspnpm/crates/resolving-git-resolver/src/parse_bare_specifier.rspnpm/crates/resolving-git-resolver/src/parse_bare_specifier/tests.rspnpm/crates/resolving-git-resolver/src/runners.rspnpm/crates/resolving-git-resolver/src/runners/tests.rs
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13684 +/- ##
==========================================
+ Coverage 88.16% 88.18% +0.02%
==========================================
Files 612 612
Lines 99579 99539 -40
==========================================
- Hits 87791 87776 -15
+ Misses 11788 11763 -25 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.8817508333600004,
"stddev": 0.21528193509241306,
"median": 2.9432141868599997,
"user": 2.5056027999999997,
"system": 1.9398625200000001,
"min": 2.55713105786,
"max": 3.1690657768599997,
"times": [
3.1690657768599997,
3.13211932886,
2.60315448686,
2.7188175818599998,
2.73264786186,
3.01594596586,
2.93883449786,
2.94759387586,
3.0021978998599996,
2.55713105786
]
},
{
"command": "pacquet@main",
"mean": 2.7607484101599993,
"stddev": 0.18551397845250894,
"median": 2.7911788823599997,
"user": 2.1459532999999995,
"system": 1.6210607199999998,
"min": 2.4319879048599997,
"max": 3.0455939648599997,
"times": [
3.0455939648599997,
2.7857307848599997,
2.7966269798599996,
2.82038062486,
2.7411449748599996,
2.92424990486,
2.82980470186,
2.75959744586,
2.47236681486,
2.4319879048599997
]
},
{
"command": "pnpr@HEAD",
"mean": 1.50595829866,
"stddev": 0.11106088415434356,
"median": 1.4995890583600002,
"user": 1.1776723999999998,
"system": 1.27687662,
"min": 1.38826463186,
"max": 1.72378230186,
"times": [
1.48706052386,
1.39184894086,
1.4960907008600002,
1.38826463186,
1.6577708018600001,
1.72378230186,
1.50495347286,
1.3915270958600001,
1.50308741586,
1.51519710086
]
},
{
"command": "pnpr@main",
"mean": 1.4871206694599999,
"stddev": 0.12330817879115119,
"median": 1.44566291086,
"user": 1.2825646,
"system": 1.31170002,
"min": 1.39179410786,
"max": 1.7673322718600002,
"times": [
1.39576941786,
1.48376918386,
1.39348704886,
1.4533956268600001,
1.46575233686,
1.7673322718600002,
1.39179410786,
1.43793019486,
1.4353998808600001,
1.64657662486
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.32592376924,
"stddev": 0.024960970527392632,
"median": 0.32607285254,
"user": 0.27721878,
"system": 0.5999438,
"min": 0.29281087804,
"max": 0.35593688204,
"times": [
0.32301780204,
0.29281087804,
0.29579114804,
0.31118089704,
0.30038944904,
0.35458904804,
0.34782109104000003,
0.35593688204,
0.34857259404,
0.32912790304
]
},
{
"command": "pacquet@main",
"mean": 0.34318441944,
"stddev": 0.026343511421145372,
"median": 0.34777294004000003,
"user": 0.29439008,
"system": 0.6512722000000001,
"min": 0.30835269404,
"max": 0.39065801804,
"times": [
0.39065801804,
0.34872716304,
0.35195749304,
0.37011927204,
0.34681871704,
0.32534812004,
0.32185386404,
0.30835269404,
0.35626178204000003,
0.31174707104
]
},
{
"command": "pnpr@HEAD",
"mean": 0.39275520514,
"stddev": 0.07195530006303485,
"median": 0.36323102404,
"user": 0.33180058,
"system": 0.7026977000000001,
"min": 0.32462979004,
"max": 0.54958156004,
"times": [
0.32462979004,
0.33328133804,
0.38749267104,
0.35731212604,
0.36280144204000003,
0.36366060604,
0.44836837504,
0.33859347004,
0.46183067304000003,
0.54958156004
]
},
{
"command": "pnpr@main",
"mean": 0.39223925594,
"stddev": 0.06927880637720829,
"median": 0.36570621804000003,
"user": 0.33161878,
"system": 0.6851315,
"min": 0.33286885804,
"max": 0.5743601260400001,
"times": [
0.5743601260400001,
0.41915039904,
0.39490143304,
0.36024475204,
0.36096020604,
0.35034668404,
0.37045223004,
0.33286885804,
0.35487296304,
0.40423490804
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.8298235541200003,
"stddev": 0.12641369733983704,
"median": 2.80101044102,
"user": 2.19160968,
"system": 1.77309494,
"min": 2.70930559502,
"max": 3.14517429102,
"times": [
3.14517429102,
2.89407318902,
2.81267877602,
2.8763012890199997,
2.83121204602,
2.78934210602,
2.70930559502,
2.73084638002,
2.7709604300199997,
2.73834143902
]
},
{
"command": "pacquet@main",
"mean": 2.7736750076199996,
"stddev": 0.07372608067709843,
"median": 2.76200226852,
"user": 2.0024189800000003,
"system": 1.6556468399999997,
"min": 2.67629565002,
"max": 2.9063860350199997,
"times": [
2.72811224902,
2.88925262702,
2.78467342802,
2.7441669110199998,
2.67629565002,
2.77516702702,
2.74883751002,
2.77910666302,
2.70475197602,
2.9063860350199997
]
},
{
"command": "pnpr@HEAD",
"mean": 1.71431244792,
"stddev": 0.15791900147192056,
"median": 1.6862885730200001,
"user": 1.4821115800000002,
"system": 1.66603174,
"min": 1.5038233480200003,
"max": 1.99379890002,
"times": [
1.5505432460200002,
1.7476913840200001,
1.59975548102,
1.5038233480200003,
1.6462847500200002,
1.7970955780200002,
1.6672636480200003,
1.9315546460200002,
1.99379890002,
1.70531349802
]
},
{
"command": "pnpr@main",
"mean": 1.88736945552,
"stddev": 0.4127864878546561,
"median": 1.7781102530200001,
"user": 1.8229203799999998,
"system": 1.9142247399999999,
"min": 1.5937033120200002,
"max": 3.01736574602,
"times": [
1.74388260302,
1.7279452410200002,
1.8781246100200002,
1.6207426300200003,
1.8350245790200002,
3.01736574602,
1.8123379030200002,
1.68741200702,
1.95715592402,
1.5937033120200002
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.6626949457200001,
"stddev": 0.09108856870614197,
"median": 0.6649398455200002,
"user": 0.9038033199999997,
"system": 1.0216894,
"min": 0.49385416702,
"max": 0.8157666710200001,
"times": [
0.5870252610200001,
0.6412962300200001,
0.8157666710200001,
0.7012978030200001,
0.6217395970200001,
0.49385416702,
0.73819172602,
0.7284164590200001,
0.6885834610200001,
0.6107780820200001
]
},
{
"command": "pacquet@main",
"mean": 0.5562894657200002,
"stddev": 0.040069347104468245,
"median": 0.55926835352,
"user": 0.7441427199999999,
"system": 0.9304924,
"min": 0.49658175502,
"max": 0.6346693830200001,
"times": [
0.5205129000200001,
0.6346693830200001,
0.5801208320200001,
0.58696526802,
0.5680224690200001,
0.5660009500200001,
0.5190233310200001,
0.5525357570200001,
0.49658175502,
0.5384620120200001
]
},
{
"command": "pnpr@HEAD",
"mean": 0.41741945922,
"stddev": 0.026565136793861074,
"median": 0.42724345702,
"user": 0.30046621999999995,
"system": 0.7095020999999999,
"min": 0.36704400802000003,
"max": 0.44757282602000004,
"times": [
0.44757282602000004,
0.36704400802000003,
0.43512282302000005,
0.42094492202,
0.40069189002,
0.37893438902000004,
0.43123792002,
0.42590172002000004,
0.42858519402,
0.43815890002
]
},
{
"command": "pnpr@main",
"mean": 0.38497535252000004,
"stddev": 0.013629110521278794,
"median": 0.38549201652,
"user": 0.27683972,
"system": 0.6542408,
"min": 0.36318418202,
"max": 0.39951353502000003,
"times": [
0.36318418202,
0.39938296902000003,
0.39932567202,
0.39951353502000003,
0.37802456002,
0.37978235302,
0.39120168002,
0.37748808102000003,
0.39451081002000005,
0.36733968302000003
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.85102886096,
"stddev": 0.042442686859032554,
"median": 1.8582151263600002,
"user": 0.9255281399999999,
"system": 0.91146354,
"min": 1.7924178913600002,
"max": 1.90141446436,
"times": [
1.8883547333600001,
1.8922596533600002,
1.90141446436,
1.8179307603600001,
1.8641508643600002,
1.8901116263600002,
1.8522793883600002,
1.81655618536,
1.7924178913600002,
1.7948130423600002
]
},
{
"command": "pacquet@main",
"mean": 2.00021628216,
"stddev": 0.1675266726552328,
"median": 1.91019867036,
"user": 1.21115124,
"system": 1.04106664,
"min": 1.86111548836,
"max": 2.3272486193599997,
"times": [
1.88236577536,
1.88835534336,
1.88274139136,
1.86111548836,
1.86196161036,
1.93204199736,
2.09034788036,
2.04789450536,
2.22809021036,
2.3272486193599997
]
},
{
"command": "pnpr@HEAD",
"mean": 0.47427006346,
"stddev": 0.062411953770259654,
"median": 0.45818531036,
"user": 0.34020404000000004,
"system": 0.79817874,
"min": 0.40910522836,
"max": 0.5730910223600001,
"times": [
0.41551433636,
0.42876027636,
0.51643516836,
0.40910522836,
0.42493811136000004,
0.43091018836,
0.48886360936,
0.5730910223600001,
0.56962226136,
0.48546043236
]
},
{
"command": "pnpr@main",
"mean": 0.41146511146,
"stddev": 0.021994668549312615,
"median": 0.41004660786,
"user": 0.32073734,
"system": 0.6772032399999999,
"min": 0.38147902636000003,
"max": 0.44412162336,
"times": [
0.41302670036,
0.40706651536,
0.38147902636000003,
0.39072268136,
0.39788517636000004,
0.42281666336,
0.43775717936,
0.38836197436000003,
0.44412162336,
0.43141357436
]
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.2520244470781819,
"stddev": 0.015077048857596101,
"median": 0.24612233226,
"user": 0.22773062363636365,
"system": 0.10173261272727271,
"min": 0.23496879326,
"max": 0.27748253226,
"times": [
0.24603038826,
0.25588051526000005,
0.25002306326,
0.27040823426000005,
0.27748253226,
0.27242694926000005,
0.24396029726000001,
0.24612233226,
0.23496879326,
0.23639731026,
0.23856850226
]
},
{
"command": "pacquet@main",
"mean": 0.2658634234418182,
"stddev": 0.016224541788693914,
"median": 0.25973412826000003,
"user": 0.2412565327272727,
"system": 0.10562070363636365,
"min": 0.24190589426,
"max": 0.29908174526000003,
"times": [
0.25407764626,
0.24190589426,
0.25696638526000004,
0.28254986826000006,
0.27559582526000004,
0.25620261026,
0.25636070826,
0.27770147426,
0.29908174526000003,
0.26432137226,
0.25973412826000003
]
},
{
"command": "pnpr@HEAD",
"mean": 0.10114587796370372,
"stddev": 0.0039998715975774575,
"median": 0.10110076726,
"user": 0.027795630370370368,
"system": 0.014924043703703706,
"min": 0.09383339626000001,
"max": 0.11212161426000002,
"times": [
0.10311633726000001,
0.10053054526,
0.10357783326,
0.09743228026,
0.10247957926000001,
0.10110365226000001,
0.10107291526,
0.10110076726,
0.09938953026000001,
0.10327675726,
0.11212161426000002,
0.10242546726000001,
0.09947598326000001,
0.10638153426000001,
0.11063536126000001,
0.09807915726000001,
0.10224818426000001,
0.10205599326,
0.09752594726000001,
0.09703660826,
0.09383339626000001,
0.09647127426,
0.09889983926000001,
0.10247597126,
0.09966613026000001,
0.09734181126000001,
0.10118423426
]
},
{
"command": "pnpr@main",
"mean": 0.10866215390285718,
"stddev": 0.004788430147030137,
"median": 0.10889790926000001,
"user": 0.03172086714285714,
"system": 0.01770684,
"min": 0.09951672026000001,
"max": 0.11776423126,
"times": [
0.09999291526000001,
0.11280139226000001,
0.10430785526000001,
0.09951672026000001,
0.11233570826000001,
0.10647408826,
0.10865886526000001,
0.10240699326000001,
0.10319909226000001,
0.11776423126,
0.11399778126000001,
0.10265990826,
0.10599265326000001,
0.10702418226,
0.10651278026000001,
0.10996681326,
0.10366815326,
0.11093551526,
0.11620315726000001,
0.11137029126,
0.11160318026,
0.10909283026000001,
0.10928904026000001,
0.10794649626000001,
0.11199533726000001,
0.11415648026000001,
0.11396485926000001,
0.10870298826000001
]
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.3589155709844445,
"stddev": 0.3060501296991132,
"median": 1.47469090854,
"user": 1.280690188888889,
"system": 0.2739608,
"min": 0.9014393205400001,
"max": 1.7177677185400002,
"times": [
1.13242708554,
1.7177677185400002,
1.67525428154,
1.47469090854,
1.49653843754,
1.53884121854,
0.9014393205400001,
1.3758438745400001,
0.91743729354
]
},
{
"command": "pacquet@main",
"mean": 1.0486552489844445,
"stddev": 0.3859559552788052,
"median": 1.14480151654,
"user": 0.9876981888888889,
"system": 0.17920513333333335,
"min": 0.6523024875400001,
"max": 1.72861438854,
"times": [
1.72861438854,
0.67709509454,
0.6894671805400001,
1.40234412954,
0.6523024875400001,
1.15669697754,
1.14480151654,
0.7166661795400001,
1.26990928654
]
},
{
"command": "pnpm@HEAD",
"mean": 3.8829992589844458,
"stddev": 0.1570909523503433,
"median": 3.83194442454,
"user": 5.981157188888889,
"system": 0.33493091111111106,
"min": 3.65527924454,
"max": 4.09759021654,
"times": [
4.04513313454,
4.07462108754,
4.09759021654,
3.71632426154,
3.8278641435400003,
3.65527924454,
3.86893859854,
3.83194442454,
3.82929821954
]
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.754154862679999,
"stddev": 0.11726995337246929,
"median": 4.70848484028,
"user": 2.66793336,
"system": 2.00699238,
"min": 4.64296173428,
"max": 4.93959138428,
"times": [
4.72374981628,
4.90674448628,
4.65251027428,
4.69321986428,
4.83949900128,
4.84795933628,
4.93959138428,
4.64296173428,
4.64750719928,
4.647805530279999
]
},
{
"command": "pacquet@main",
"mean": 4.78883773218,
"stddev": 0.17578485795359217,
"median": 4.77643021978,
"user": 2.52137246,
"system": 1.8930321799999998,
"min": 4.52042780428,
"max": 5.04819238328,
"times": [
4.89165981828,
4.64677897928,
4.7426816582799995,
4.94139409528,
4.52042780428,
4.993406398279999,
5.04819238328,
4.647225833279999,
4.810178781279999,
4.64643157028
]
},
{
"command": "pnpr@HEAD",
"mean": 3.68626560678,
"stddev": 0.11820115779450781,
"median": 3.6647363947800002,
"user": 1.8295038599999998,
"system": 1.71398918,
"min": 3.53395574428,
"max": 3.93124399028,
"times": [
3.5554280422800004,
3.66070750528,
3.64702144628,
3.93124399028,
3.76924674728,
3.53395574428,
3.67708982528,
3.62341888428,
3.66876528428,
3.79577859828
]
},
{
"command": "pnpr@main",
"mean": 3.66869117318,
"stddev": 0.13679968251414393,
"median": 3.63523175178,
"user": 1.7468089599999999,
"system": 1.6687785800000001,
"min": 3.56197813628,
"max": 4.028858233279999,
"times": [
3.5666375352800004,
3.56197813628,
3.58510045628,
3.6469309662800002,
3.6191280372800003,
3.66327795828,
4.028858233279999,
3.73730197328,
3.62353253728,
3.65416589828
]
}
]
} |
…client selection acquire_for_url applies the per-origin maxSockets cap and per-URL TLS routing that every other outbound request in pacquet gets; the bare acquire() was inherited from the deleted probe ladder. The permit now also spans the response's lifetime while never being held across a backoff sleep. Also trims a narrating test-helper doc and adds the changeset code fence language, both from review. Co-Authored-By: Claude Fable 5 <[email protected]>
|
Code review by qodo was updated up to the latest commit 6bb25fe |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
The bump type carries the breaking-change semantics, so the prose prefix saying so is dropped. Co-Authored-By: Claude Fable 5 <[email protected]>
|
Code review by qodo was updated up to the latest commit 085d9a3 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
The identity rule stays in parse_bare_specifier's module doc with lib.rs pointing at it, the credentials rationale stays on the implementation branch, and the test doc comments that re-explained their own asserts are dropped. Co-Authored-By: Claude Fable 5 <[email protected]>
|
Code review by qodo was updated up to the latest commit 34c743b |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
…s own deadline The install-wide fetchTimeout (60s default) is sized for downloads; an archive endpoint a firewall blackholes while the repo host stays reachable would stall resolution for attempts x fetchTimeout per git dependency. The probe only gates the archive optimization, so a 10-second per-attempt deadline loses nothing: on expiry the resolution falls back to type: git. Co-Authored-By: Claude Fable 5 <[email protected]>
|
Code review by qodo was updated up to the latest commit 6103ab5 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
…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]>
…t specs on CI (#13290) 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 (#13684), which supersedes the Rust-side commits this PR previously carried. Closes #13276. Co-authored-by: Zoltan Kochan <[email protected]> Co-authored-by: Claude Fable 5 <[email protected]>
Summary
Breaking change, Rust CLI (v12 lane) only. Git dependency specs of known hosts (GitHub, GitLab, Bitbucket) are now treated as identities, not transport choices. Every representation of the same repository —
github:owner/repo,owner/repo,git+https://…,git+ssh://git@…— resolves through the host's canonical HTTPS URL, and nothing transport-shaped is ever probed for or recorded in the lockfile.The resolution shape is decided by a single fail-safe check: after
ls-remotepins the commit, the resolver issues one anonymous HTTP HEAD of the exact archive URL it would record (with transient-failure retries). Success records the host-archive tarball — fetchable by construction. Anything else recordstype: gitover the canonical HTTPS URL, which is always valid for any machine that can access the repo. A false negative (throttling past retries) therefore costs archive speed on one dependency, never correctness.Reaching a private hosted repo over SSH becomes per-machine configuration, which git already provides:
git config --global url."[email protected]:".insteadOf https://github.com/. pnpm shells out togitforls-remoteand clones, so the rewrite applies everywhere automatically. Unknown-host URLs keep their exact URL (SSH included); credential-embedded URLs are kept verbatim and never resolve to a host archive.This deletes the resolve-time transport-probing ladder (publicness HEAD heuristic, HTTPS/SSH
ls-remote --exit-codereachability probes, SSH fallback) that could freeze one machine's working transport into the lockfile and break every environment configured differently. Ecosystem precedent: Go modules and Cargo record identity only and delegate transport to gitconfig; no other package manager probes the network to choose a transport at resolve time.Related to #13276 (the v12 resolution of that bug class; #13290 fixes the acute v11 regression within the probing design, which the TypeScript CLI keeps).
Squash Commit Body
Checklist
already linked to it solves it.
pnpm/port, or the description notes what still needs porting. (Deliberately Rust-only: this is a v12 breaking change and the Rust CLI is the v12 version; the TypeScript CLI will not have a v12.)pnpm changeset) if this PR changes any publishedpackage. Keep it short and written for pnpm users — it becomes a release note.
insteadOfrecipe should follow before v12 stable.)Written by an agent (Claude Code, claude-fable-5).
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit
New Features
Bug Fixes