Follow-up to #434 (umbrella, closed). Slices 1–3 (#439, #456, #467) handle installability-driven skips end to end. This slice closes a different swallow path: an optional: true snapshot whose tarball / metadata / extract step fails at install time must not abort the install. The non-optional case still aborts.
Scope
Mirror pnpm/pnpm@94240bc046's two frozen-path catch sites:
Both sites are silent — no pnpm:skipped-optional-dependency event is emitted at fetch time on the frozen path. The corresponding upstream test at deps-restorer/test/index.ts:340-360 only asserts that the install completes and the other deps land — it never inspects the reporter mock.
For pacquet the equivalent surface is InstallPackageBySnapshot::run inside CreateVirtualStore. Today every fetch / extract error there propagates unconditionally as CreateVirtualStoreError::InstallPackageBySnapshot(...). This slice:
- Wraps the per-snapshot fetch / extract dispatch so an
optional: true snapshot's TarballError / WriteCasFileError / similar is silently dropped (no virtual-store slot created, no symlink, install continues).
- Non-optional failures still surface unchanged.
- The skip set is not updated for fetch failures — matches upstream behavior at the graph-builder site (only installability failures land in
opts.skipped at :213).
ResolutionFailure sibling payload
The doc comment at crates/reporter/src/lib.rs:546-562 already flags that resolution_failure carries a different payload shape ({ name?, version?, bareSpecifier }) than the other three reasons ({ id, name, version }). Upstream defines the discriminated union explicitly at core-loggers/src/skippedOptionalDependencyLogger.ts:10-31.
Land the variant now — either via a sibling SkippedOptionalDependencyLog enum or #[serde(untagged)] on SkippedOptionalPackage. The actual emit site is resolver-only (resolveDependencies.ts:1376-1383) and pacquet has no resolver yet, so the variant is wire-shape-only in slice 4. Slice 7 (ignoredOptionalDependencies) and any future resolver-side work consume it.
Tests to port
Out of scope
Upstream pin
pnpm/pnpm@94240bc046. Pacquet umbrella slice 1 in #439, slice 2 in #456, slice 3 in #467; this is umbrella slice 4.
Written by an agent (Claude Code, claude-opus-4-7).
Follow-up to #434 (umbrella, closed). Slices 1–3 (#439, #456, #467) handle installability-driven skips end to end. This slice closes a different swallow path: an
optional: truesnapshot whose tarball / metadata / extract step fails at install time must not abort the install. The non-optional case still aborts.Scope
Mirror pnpm/pnpm@94240bc046's two frozen-path catch sites:
lockfileToDepGraph.ts:286-298: wrapsstoreController.fetchPackage;if (pkgSnapshot.optional) return; throw err;.deps-restorer/src/index.ts:912-921: wraps the deferreddepNode.fetching()import; sameif (depNode.optional) return; throw err;.Both sites are silent — no
pnpm:skipped-optional-dependencyevent is emitted at fetch time on the frozen path. The corresponding upstream test atdeps-restorer/test/index.ts:340-360only asserts that the install completes and the other deps land — it never inspects the reporter mock.For pacquet the equivalent surface is
InstallPackageBySnapshot::runinsideCreateVirtualStore. Today every fetch / extract error there propagates unconditionally asCreateVirtualStoreError::InstallPackageBySnapshot(...). This slice:optional: truesnapshot'sTarballError/WriteCasFileError/ similar is silently dropped (no virtual-store slot created, no symlink, install continues).opts.skippedat:213).ResolutionFailure sibling payload
The doc comment at
crates/reporter/src/lib.rs:546-562already flags thatresolution_failurecarries a different payload shape ({ name?, version?, bareSpecifier }) than the other three reasons ({ id, name, version }). Upstream defines the discriminated union explicitly atcore-loggers/src/skippedOptionalDependencyLogger.ts:10-31.Land the variant now — either via a sibling
SkippedOptionalDependencyLogenum or#[serde(untagged)]onSkippedOptionalPackage. The actual emit site is resolver-only (resolveDependencies.ts:1376-1383) and pacquet has no resolver yet, so the variant is wire-shape-only in slice 4. Slice 7 (ignoredOptionalDependencies) and any future resolver-side work consume it.Tests to port
installing/deps-restorer/test/index.ts:340-360skipping optional dependency if it cannot be fetched— broken-URL optional snapshot, sibling non-failing snapshots, install completes, sibling slots present.Out of scope
resolution_failureemit site — needs a resolver, tracked separately.--no-optional/--omit=optionalplumbing — umbrella slice 5.Upstream pin
pnpm/pnpm@94240bc046. Pacquet umbrella slice 1 in #439, slice 2 in #456, slice 3 in #467; this is umbrella slice 4.
Written by an agent (Claude Code, claude-opus-4-7).