Skip to content

Re-download after a content-hash mismatch drops the per-dependency skills selection #3884

Closed

Description

APM 0.36.1 can resolve all skills for a dependency whose manifest selects a subset when an older package copy already exists in apm_modules/. The first frozen install fails, then an identical second install succeeds after APM refreshes the package copy.

Reproduction: install a locked manifest with APM 0.36.0. Update the manifest and lock to a new commit that restricts transitive skills, retaining the old apm_modules/ package copies. Run apm install --frozen --parallel-downloads 0 with APM 0.36.1. The same issue occurs with apm install --global --frozen --only apm --ssh --parallel-downloads 1 --no-trust-bin for a managed toolkit.

Expected: APM re-downloads mismatched package content and retains each dependency's selected skill subset. Actual: the first install reports --frozen: dependency selections differ from apm.lock.yaml and shows resolved skills all for a dependency locked to a subset. Removing only the APM download directory before the install makes the first frozen install pass. In one test, APM also replaced a user-added file inside its own package cache during refresh.

Activity

  1. danielmeppiel commented on Nov 19, 2026

    @danielmeppiel
    Collaborator

    Decision: approve
    Area: project
    Scope: Make the dependency resolver reuse an apm_modules package copy only when its recorded commit (or content hash) matches apm.lock.yaml, so a stale copy never decides transitive skill selections.
    Done when: An installed-CLI lifecycle test with a stale package copy passes apm install --frozen on the first run, and fails on main.
    Out of scope: #3701, #3720, hook filename routing, and replacing user-added files inside apm_modules (APM-owned).
    Review contact: Daniel Meppiel (@danielmeppiel)

  2. added
    status/accepted
    on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    status/accepted

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions