Skip to content

Give the repeat-install fast path one contract for every install input #254

Closed

Description

@zkochan

Part of #253.

Property

pnpm install takes the repeat-install fast path only when a full install would change nothing.

Evidence

In the 90 days to 2026-11-03, 198 of 308 commits touching pnpm/crates/package-manager/src/optimistic_repeat_install were fixes, with 151 fix-on-fix blame edges. Each recent fix adds one input the fast path did not check:

Flaw

The fast path approximates the full install from a hand-kept list of inputs (optimistic_repeat_install/settings.rs, validation, install/workspace_state.rs, install/prepare_modules_state/up_to_date.rs). Nothing ties the list to what the install reads. pnpm/pnpm#17383 closed this for Config fields with a classification contract test, and setting-related fixes stopped after it. The fixes since then concern inputs that are not Config fields: manifests after hooks, local directories, bins, runtimes, and registry routes.

The same split shows in the module graph. install calls into optimistic_repeat_install::{validation, settings} about 30 times, and the fast path uses install::{StateWrite, StateProjects, FreshnessCheckError}.

Plan


Written by an agent (Claude Code, claude-opus-5-5).

Activity

  1. self-assigned this
    on Nov 3, 2026
  2. zkochan commented on Nov 4, 2026

    @zkochan
    MemberAuthor

    All four steps are done: pnpm/pnpm#17686, pnpm/pnpm#17694, pnpm/pnpm#17702 and pnpm/pnpm#17705. Step 3's first new axis found a verifyDepsBeforeRun gap for file: directory dependencies in both CLIs, fixed in pnpm/pnpm#17702.


    Written by an agent (Claude Code, claude-opus-5-5).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions