Repository navigation
fix(pacquet): resolve caller catalogs in dlx overrides and find runtime bins - #12817
Conversation
…me bins `pnpm dlx` (pnx) failed in two ways when run from a project such as pnpm/pnpm itself: 1. The dlx cache install inherits the caller project's `overrides`, but severs `workspace_dir` before installing, so `catalog:` values in those overrides were resolved against an empty catalog set and every dlx invocation failed with ERR_PNPM_CATALOG_IN_OVERRIDES. Resolve the references against the caller's catalogs before the workspace link is severed. This matches the TypeScript CLI, which runs the dlx install with the invoking project's already-loaded config, where overrides and catalogs stay consistent. The caller's catalogs are deliberately not injected into `config.catalogs`: that would shadow the prepare-dir catalog write-back that `catalogMode: strict` relies on. 2. `pnpm dlx node@runtime:26.4.0 <script>` installed the runtime but then failed with ERR_PNPM_DLX_NO_DEP: the manifest writer round-trips the added runtime dependency to `engines.runtime`, leaving `dependencies` empty, and dlx's bin discovery reads the raw `dependencies` map. Apply the manifest reader's `engines.runtime` to dependencies conversion when reading the cache manifest. The TypeScript CLI avoids this because its dlx never pre-writes a cache manifest, so its manifest write takes the raw fallback and keeps the runtime entry under `dependencies` on disk.
PR Summary by QodoFix pacquet dlx: resolve catalog overrides before workspace unlink; detect runtime bins
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
|
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 (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR adds a Changesdlx override and runtime resolution
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant CLI as pacquet dlx
participant InstallCache as install_into_cache
participant Workspace as Workspace manifest
participant Overrides as parse_overrides_iter
CLI->>InstallCache: invoke with config.overrides, config.workspace_dir
InstallCache->>Workspace: read caller workspace manifest
Workspace-->>InstallCache: catalogs
InstallCache->>Overrides: resolve overrides against catalogs
Overrides-->>InstallCache: resolved selector -> bare-specifier map
InstallCache->>InstallCache: replace config.overrides, clear workspace_dir
Possibly related PRs
Suggested labels: ✨ 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 |
Code Review by Qodo
1. Dlx cache omits overrides
|
Micro-Benchmark ResultsLinux |
|
Code review by qodo was updated up to the latest commit bc9f5cc |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
pacquet/crates/cli/src/cli_args/dlx.rs (1)
273-287: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd error context to the workspace-manifest read.
get_catalogs_from_workspace_manifest(...)gets a.wrap_err(...)for diagnostics, but the precedingread_workspace_manifest(workspace_dir)call (Line 277) does not. A malformed callerpnpm-workspace.yamlwould surface a bare error with no indication it happened while preparing the dlx cache install.♻️ Proposed fix
let workspace_manifest = - pacquet_workspace::read_workspace_manifest(workspace_dir).into_diagnostic()?; + pacquet_workspace::read_workspace_manifest(workspace_dir) + .into_diagnostic() + .wrap_err("reading the caller's workspace manifest for the dlx install")?;🤖 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/cli/src/cli_args/dlx.rs` around lines 273 - 287, The workspace-manifest read in the dlx override path is missing diagnostic context, so a malformed caller workspace file can fail without indicating where it happened. Update the `read_workspace_manifest(workspace_dir)` call in `cli_args/dlx.rs` to attach a `.wrap_err(...)` message consistent with the existing `get_catalogs_from_workspace_manifest(...)` handling, so errors are clearly tied to preparing the dlx cache install.
🤖 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/cli/src/cli_args/dlx.rs`:
- Around line 273-287: The workspace-manifest read in the dlx override path is
missing diagnostic context, so a malformed caller workspace file can fail
without indicating where it happened. Update the
`read_workspace_manifest(workspace_dir)` call in `cli_args/dlx.rs` to attach a
`.wrap_err(...)` message consistent with the existing
`get_catalogs_from_workspace_manifest(...)` handling, so errors are clearly tied
to preparing the dlx cache install.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 401ee5b8-289a-4f29-82bc-69ed5353aeb5
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock,!Cargo.lock
📒 Files selected for processing (4)
pacquet/crates/cli/Cargo.tomlpacquet/crates/cli/src/cli_args/dlx.rspacquet/crates/cli/src/cli_args/dlx/tests.rspacquet/crates/cli/tests/dlx.rs
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12817 +/- ##
==========================================
+ Coverage 85.18% 85.19% +0.01%
==========================================
Files 416 416
Lines 65903 65920 +17
==========================================
+ Hits 56141 56163 +22
+ Misses 9762 9757 -5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Integrated-Benchmark Report (Linux)Commit: Each scenario reports direct installs and pnpr installs. Bencher consumes pacquet@HEAD and pnpr@HEAD. Scenario: Isolated linker: fresh restore, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 3.83525307266,
"stddev": 0.18047185087896336,
"median": 3.8668868336599997,
"user": 3.6513585799999992,
"system": 3.2525824599999993,
"min": 3.61023893066,
"max": 4.07952053866,
"times": [
4.07952053866,
3.9364009216599998,
3.9157708746599997,
3.67353592666,
4.02764723866,
4.00420732466,
3.66160786066,
3.8180027926599998,
3.61023893066,
3.6255983176599997
]
},
{
"command": "pacquet@main",
"mean": 3.81297388256,
"stddev": 0.2106974990023133,
"median": 3.71162321266,
"user": 3.6271379799999997,
"system": 3.2716911600000005,
"min": 3.54363654866,
"max": 4.18443444366,
"times": [
4.18443444366,
3.69097588266,
3.71092357266,
3.69928724966,
3.71232285266,
3.62009165566,
3.90801732066,
3.54363654866,
4.01993903466,
4.04011026466
]
},
{
"command": "pnpr@HEAD",
"mean": 2.10741245916,
"stddev": 0.1174862371140138,
"median": 2.0572774661599995,
"user": 2.75612158,
"system": 2.84631886,
"min": 1.97539172366,
"max": 2.30171116566,
"times": [
2.26333564366,
2.0526102916599998,
2.06929022566,
2.25003894766,
2.04435559166,
2.0521208346599997,
1.97539172366,
2.30171116566,
2.0619446406599997,
2.00332552666
]
},
{
"command": "pnpr@main",
"mean": 2.13655832146,
"stddev": 0.08273398485710953,
"median": 2.13302294116,
"user": 2.7591449800000003,
"system": 2.8860016600000002,
"min": 2.02112365866,
"max": 2.27791535266,
"times": [
2.0611060006599997,
2.18858305566,
2.07249029666,
2.0810730026599997,
2.27791535266,
2.14965221166,
2.24759375366,
2.12330271666,
2.14274316566,
2.02112365866
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.64908215908,
"stddev": 0.006437709236035235,
"median": 0.64722679868,
"user": 0.3826766,
"system": 1.3262614000000001,
"min": 0.63836350468,
"max": 0.6582742826800001,
"times": [
0.64672517768,
0.63836350468,
0.6556811826800001,
0.6494225126800001,
0.64584383568,
0.6442280046800001,
0.6477284196800001,
0.6464423786800001,
0.6582742826800001,
0.6581122916800001
]
},
{
"command": "pacquet@main",
"mean": 0.6488117526800001,
"stddev": 0.019553134454307137,
"median": 0.6427165701800001,
"user": 0.39379489999999995,
"system": 1.3170169999999999,
"min": 0.63181867968,
"max": 0.69657064168,
"times": [
0.63444723368,
0.65735488968,
0.6413393536800001,
0.6453100846800001,
0.6334409456800001,
0.69657064168,
0.63181867968,
0.6440937866800001,
0.6629747436800001,
0.6407671676800001
]
},
{
"command": "pnpr@HEAD",
"mean": 0.72055997758,
"stddev": 0.06220189674977801,
"median": 0.7029189571800001,
"user": 0.391694,
"system": 1.3599902,
"min": 0.6870701396800001,
"max": 0.89604012068,
"times": [
0.7082236876800001,
0.7113364296800001,
0.69367259668,
0.69087287368,
0.6870701396800001,
0.70284508168,
0.71043613668,
0.70299283268,
0.70210987668,
0.89604012068
]
},
{
"command": "pnpr@main",
"mean": 0.7257831986800001,
"stddev": 0.04990525355220269,
"median": 0.70516363418,
"user": 0.4098898999999999,
"system": 1.3471678,
"min": 0.6770864896800001,
"max": 0.8522074846800001,
"times": [
0.76136001168,
0.70512475868,
0.7039998496800001,
0.7349886226800001,
0.7010946386800001,
0.7052025096800001,
0.69916325268,
0.6770864896800001,
0.8522074846800001,
0.7176043686800001
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.2346072636,
"stddev": 0.029269650829383206,
"median": 4.2464863112,
"user": 3.8052573,
"system": 3.266275039999999,
"min": 4.181273694700001,
"max": 4.2772427627,
"times": [
4.245378344700001,
4.2561426287,
4.181273694700001,
4.2259562527000005,
4.2515542147000005,
4.2475942777,
4.201285907700001,
4.2495904577,
4.2100540947,
4.2772427627
]
},
{
"command": "pacquet@main",
"mean": 4.216914749,
"stddev": 0.04600223927876409,
"median": 4.2341050012000006,
"user": 3.7972731000000004,
"system": 3.27698104,
"min": 4.1215550507000005,
"max": 4.2716282557000005,
"times": [
4.2336639287,
4.2285257417,
4.2472681537,
4.234546073700001,
4.2452300667000005,
4.1921908737,
4.1215550507000005,
4.2716282557000005,
4.2368069087,
4.157732436700001
]
},
{
"command": "pnpr@HEAD",
"mean": 2.2492311429000003,
"stddev": 0.11444200871608781,
"median": 2.2722891267,
"user": 2.5500148999999994,
"system": 2.7949914400000004,
"min": 2.0743659647,
"max": 2.4064394097,
"times": [
2.3564527227,
2.2859422127,
2.1276140957,
2.0743659647,
2.0915022387,
2.3341780207,
2.4064394097,
2.2557994017,
2.2586360407,
2.3013813217
]
},
{
"command": "pnpr@main",
"mean": 2.1859156728999998,
"stddev": 0.11433418851474657,
"median": 2.1753771542,
"user": 2.566170799999999,
"system": 2.77581654,
"min": 2.0501245377,
"max": 2.3733197667,
"times": [
2.3524927557,
2.2513427617,
2.0612005397,
2.3733197667,
2.0918459677,
2.2129475007,
2.1151285907,
2.1462568917,
2.2044974167,
2.0501245377
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.3964727309600002,
"stddev": 0.016744643656252015,
"median": 1.3966877534600002,
"user": 1.34133336,
"system": 1.7255444999999998,
"min": 1.3701800234600001,
"max": 1.42245846246,
"times": [
1.3701800234600001,
1.4009170964600002,
1.3754727124600001,
1.39174377946,
1.3850519164600001,
1.39813666346,
1.4107346144600001,
1.42245846246,
1.41479319746,
1.39523884346
]
},
{
"command": "pacquet@main",
"mean": 1.47267252216,
"stddev": 0.07700662076251097,
"median": 1.4545180714600001,
"user": 1.40535116,
"system": 1.7328719999999997,
"min": 1.38801716346,
"max": 1.6608166794600001,
"times": [
1.6608166794600001,
1.4289343514600001,
1.3992375334600002,
1.38801716346,
1.4472380584600002,
1.4554934224600002,
1.45354272046,
1.4887116664600002,
1.5116123324600002,
1.49312129346
]
},
{
"command": "pnpr@HEAD",
"mean": 0.6847316921600001,
"stddev": 0.012257469601216878,
"median": 0.6841754894600001,
"user": 0.36428436,
"system": 1.2910331999999998,
"min": 0.6664165964600001,
"max": 0.70261023946,
"times": [
0.67900698446,
0.69631229846,
0.66964601646,
0.70261023946,
0.6761084094600001,
0.68421295746,
0.69887471046,
0.68413802146,
0.6664165964600001,
0.68999068746
]
},
{
"command": "pnpr@main",
"mean": 0.70841510756,
"stddev": 0.07828963073735926,
"median": 0.68927474646,
"user": 0.36334375999999996,
"system": 1.3050484999999998,
"min": 0.66076806146,
"max": 0.92662457746,
"times": [
0.6688923464600001,
0.66076806146,
0.68405520846,
0.67074052246,
0.67331996346,
0.69666261446,
0.69703542046,
0.69449428446,
0.92662457746,
0.71155807646
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 3.1227041433800005,
"stddev": 0.068270880185391,
"median": 3.0907048671800004,
"user": 1.82101294,
"system": 1.99606202,
"min": 3.05620169218,
"max": 3.25653011218,
"times": [
3.21148890118,
3.25653011218,
3.1087755871800002,
3.0734207921800003,
3.09495397318,
3.07734098718,
3.05620169218,
3.18009613818,
3.0864557611800003,
3.0817774891800003
]
},
{
"command": "pacquet@main",
"mean": 3.0643997967800005,
"stddev": 0.028775726457691806,
"median": 3.0658863531800002,
"user": 1.7808064399999999,
"system": 1.9748602199999996,
"min": 3.02798560918,
"max": 3.1096020391800003,
"times": [
3.0494973461800003,
3.07651766318,
3.08558815618,
3.0304839821800003,
3.0662632431800003,
3.03384644118,
3.02798560918,
3.0987040241800003,
3.1096020391800003,
3.06550946318
]
},
{
"command": "pnpr@HEAD",
"mean": 0.66865890198,
"stddev": 0.010145885569915674,
"median": 0.6685465936800001,
"user": 0.34643484,
"system": 1.29204352,
"min": 0.65357913418,
"max": 0.6858719431800001,
"times": [
0.6682699551800001,
0.65357913418,
0.65376928018,
0.6716890171800001,
0.6858719431800001,
0.6750021671800001,
0.6790189081800001,
0.6661005241800001,
0.6644648581800001,
0.6688232321800001
]
},
{
"command": "pnpr@main",
"mean": 0.6842347453800001,
"stddev": 0.08615381872244457,
"median": 0.65371914318,
"user": 0.34722603999999996,
"system": 1.2709146199999997,
"min": 0.6505788951800001,
"max": 0.92851325118,
"times": [
0.6610353251800001,
0.6648052241800001,
0.6529740651800001,
0.6531713061800001,
0.6542669801800001,
0.6511985841800001,
0.6505788951800001,
0.92851325118,
0.6738586071800001,
0.65194521518
]
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.7271862092000001,
"stddev": 0.032764494102151626,
"median": 0.7344320284,
"user": 0.675219,
"system": 0.1615215,
"min": 0.6770927504,
"max": 0.7659428774,
"times": [
0.7659428774,
0.7310615994,
0.6935674494,
0.6770927504,
0.6781510294,
0.7347720094,
0.7340920474,
0.7453447384,
0.7586017074,
0.7532358834
]
},
{
"command": "pacquet@main",
"mean": 0.7224547841000002,
"stddev": 0.04658828744657848,
"median": 0.7164109599,
"user": 0.6754382000000001,
"system": 0.1607561,
"min": 0.6738007054,
"max": 0.8388942354000001,
"times": [
0.7389977534000001,
0.8388942354000001,
0.7301348374000001,
0.6738007054,
0.7093729484,
0.7306129364,
0.6766724864,
0.6932400184,
0.7135885774,
0.7192333424
]
},
{
"command": "pnpr@HEAD",
"mean": 0.1135975161083334,
"stddev": 0.005176319446397633,
"median": 0.11222025040000001,
"user": 0.028892575000000004,
"system": 0.02183283333333333,
"min": 0.1101855114,
"max": 0.1305309564,
"times": [
0.1108524324,
0.11214543340000001,
0.1294828674,
0.11238485240000001,
0.1111089474,
0.11176658440000001,
0.11229506740000002,
0.11184479240000002,
0.1118409154,
0.11306593440000001,
0.1133142074,
0.1101855114,
0.11309995540000001,
0.11107166140000001,
0.11237721140000001,
0.11200064540000002,
0.1305309564,
0.1150416154,
0.11043235140000002,
0.11353699140000001,
0.11136920840000002,
0.11330137840000001,
0.11242513340000002,
0.11086573240000001
]
},
{
"command": "pnpr@main",
"mean": 0.11048655673333334,
"stddev": 0.0022647115978852326,
"median": 0.11140095090000002,
"user": 0.028999616666666662,
"system": 0.020642666666666667,
"min": 0.10692364940000001,
"max": 0.11354665040000002,
"times": [
0.11214070640000001,
0.11274114140000001,
0.11142655440000002,
0.11286448240000001,
0.11224181340000002,
0.11244892840000001,
0.11144325940000001,
0.10994535140000002,
0.10747681040000001,
0.10740736540000001,
0.10798079140000001,
0.1131143274,
0.11216324540000001,
0.11354665040000002,
0.11190687540000001,
0.11053970240000001,
0.11110522140000001,
0.10692364940000001,
0.10770590940000001,
0.1113753474,
0.1074593394,
0.10791711040000002,
0.11229910340000002,
0.10750367540000001
]
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 6.51860988706,
"stddev": 0.10383412597724696,
"median": 6.501009274159999,
"user": 3.8135068199999997,
"system": 3.5602951,
"min": 6.35879830716,
"max": 6.6676897651600004,
"times": [
6.42911798316,
6.62834349616,
6.6676897651600004,
6.46366956716,
6.64238669516,
6.52339058816,
6.56156481016,
6.4325096981600005,
6.47862796016,
6.35879830716
]
},
{
"command": "pacquet@main",
"mean": 6.43968283986,
"stddev": 0.07549631402157446,
"median": 6.4636121721599995,
"user": 3.7830663199999988,
"system": 3.5252483999999997,
"min": 6.27374165716,
"max": 6.52052191716,
"times": [
6.51262202616,
6.52052191716,
6.46467921216,
6.48407679716,
6.27374165716,
6.36135981216,
6.45521477416,
6.39738785816,
6.46393802116,
6.46328632316
]
},
{
"command": "pnpr@HEAD",
"mean": 4.88976532866,
"stddev": 0.13475567996846022,
"median": 4.84805870116,
"user": 2.824494819999999,
"system": 3.0714092000000006,
"min": 4.685868220160001,
"max": 5.1937167661600006,
"times": [
4.85051190316,
4.84560549916,
4.8228636941600005,
4.86681808016,
4.84479062416,
4.685868220160001,
4.93430696116,
5.01102460716,
4.84214693116,
5.1937167661600006
]
},
{
"command": "pnpr@main",
"mean": 4.919922269959999,
"stddev": 0.10092498721099427,
"median": 4.88628849216,
"user": 2.82615972,
"system": 3.0975248,
"min": 4.80057171516,
"max": 5.09103850516,
"times": [
4.8767045731600005,
4.88541375316,
5.09103850516,
4.80057171516,
4.89772428716,
5.08511027516,
4.88716323116,
4.84736315716,
4.98789872416,
4.84023447816
]
}
]
} |
…talog Resolving overrides in the dlx cache install only matters when at least one override value uses the `catalog:` protocol; otherwise the parse returns the map verbatim. Guard the workspace-manifest read and the override re-parse on that, so dlx cache misses in projects with plain overrides do no extra filesystem or YAML work. Addresses a Qodo review finding on #12817.
|
Two updates: Qodo finding 2 (unconditional workspace YAML read) — addressed in 49d15a4: the workspace-manifest read and override re-parse now only run when at least one override value actually uses the Bencher alert on
The benchmark is re-running on the new head; the alert should clear. Written by an agent (Claude Code, claude-fable-5). |
|
Code review by qodo was updated up to the latest commit 49d15a4 |
1 similar comment
|
Code review by qodo was updated up to the latest commit 49d15a4 |
|
| Branch | pr/12817 |
| 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 | 2,249.23 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 668.66 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 684.73 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 113.60 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 2,107.41 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 4,889.77 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 720.56 ms |
Summary
pnpm dlx(pnx) in the Rust CLI failed in two independent ways when invoked from a project like pnpm/pnpm itself, which is why the "Compile TypeScript" step (pnx node@runtime:26.4.0 …incompile-only) failed on the TS CI of #12811 after updating the package manager to v12.0.0-alpha.1:ERR_PNPM_CATALOG_IN_OVERRIDESon every dlx invocation. The dlx cache install inherits the caller project'soverrides, but seversworkspace_dirbefore installing, socatalog:values in those overrides (e.g.hosted-git-info@1: 'catalog:'in this repo) were resolved against an empty catalog set. The TypeScript CLI doesn't have this problem because its dlx runs the install with the invoking project's already-loaded config, where overrides and catalogs stay consistent. The fix resolves thecatalog:references against the caller's catalogs before the workspace link is severed. The caller's catalogs are deliberately not injected intoconfig.catalogs, because that would shadow the prepare-dir catalog write-back thatcatalogMode: strictrelies on.ERR_PNPM_DLX_NO_DEPfor runtime specs.pnpm dlx node@runtime:26.4.0 <script>installed the runtime but then couldn't find it: the manifest writer round-trips the added runtime dependency toengines.runtime, leavingdependenciesempty, and dlx's bin discovery reads the rawdependenciesmap. The fix applies the manifest reader'sengines.runtime→ dependencies conversion when reading the cache manifest. The TypeScript CLI avoids this because its dlx never pre-writes a cache manifest, so its manifest write takes the raw fallback increateProjectManifestWriterand keeps the runtime entry underdependencieson disk.Verified end-to-end: with this repo's exact
pnpm-workspace.yaml(catalog overrides +catalogMode: strict) and a fresh store,pacquet dlx node@runtime:26.4.0 --versionnow printsv26.4.0.Known follow-up (pre-existing, out of scope): a store whose node-runtime CAS index was written by an older tool version without the synthesized
package.jsonstill breaksdlx node@runtime:<version>(the materialized slot has no manifest, so no.binlink is created). The TypeScript CLI tolerates exactly this state via thegetBinNamefallback indlx.tsplus resolution-driven bin linking; pacquet doesn't yet. Fresh stores and stores populated by current pnpm v11 or v12 are unaffected (both verified).Squash Commit Body
Checklist
pacquet/port, or the description notes what still needs porting.(pacquet-only fix — the TypeScript CLI already behaves correctly; both
failure modes are pacquet regressions against it.)
inheritance and a unit test for the runtime manifest shape; both verified
to fail without their fix.)
Written by an agent (Claude Code, claude-fable-5).
Summary by CodeRabbit
dlxpackage selection so runtime entries are recognized even when stored in manifest runtime fields.dlx.