Skip to content

Lockfile version is lowered when a registry dependency is removed #4232

Closed

Description

OpenAPM req-lk-002 says a written lockfile version MUST NOT be lowered, even when the entry that required it is removed. Today the lockfile drops from version 2 back to version 1 when the last registry-sourced dependency is removed, and a unit test asserts that behavior. Found during 0.37 spec-conformance linking (Part of #4092).

Activity

  1. danielmeppiel commented on Nov 20, 2026

    @danielmeppiel
    CollaboratorAuthor

    Decision: approve
    Area: project
    Scope: The lockfile write-authority owner writes max(required version, version read from the existing lockfile), so a lockfile version is never lowered when the entry that required it is removed (req-lk-002); the test asserting the old demotion is inverted.
    Done when: The inverted unit test and an installed-CLI test (install a registry or git-semver dependency, remove it, reinstall) fail before and pass after; the git-semver trigger is covered; versions 3 and 4 follow their own requirements; a bug-ledger row is added; the CI lint chain is green.
    Out of scope: Lockfile format changes; extending monotonicity rules beyond what the specification states.
    Review contact: Daniel Meppiel (@danielmeppiel)

  2. added
    type/bug
    status/accepted
    on Nov 20, 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/acceptedtype/bug

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions