[BUG] incompatible immutable dependency refs are silently collapsed
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 362
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 132
Description
Describe the bug
APM silently collapses incompatible immutable dependency refs for the same package identity.
A consumer declares both:
- a direct dependency on
shared-package#v1, and parent-package#v1, which transitively requiresshared-package#v2.
Both refs are immutable. APM installs and locks only shared-package#v1, emits no conflict warning or error, and accepts the resulting graph in frozen mode. The installed parent therefore receives a different immutable version than its manifest requires.
To Reproduce
- Create
shared-packagetagsv1andv2. - Create
parent-package#v1with a dependency onshared-package#v2. - Create a consumer with direct dependencies on
shared-package#v1andparent-package#v1. - Run a normal install.
- Inspect the lockfile and installed packages: only
shared-package#v1is present. - Run the equivalent frozen install. It succeeds without reporting the incompatible transitive requirement.
Expected behavior
Different immutable refs for one package identity should either:
- fail resolution with a clear conflict listing the parents and requested refs, or
- install isolated versions when the deployment model supports that safely.
Frozen replay should not accept a graph in which an immutable transitive requirement was replaced by a different ref.
Environment (please complete the following information):
- OS: macOS
- Python Version: 3.14.7
- APM Version: 0.31.0 installed with Homebrew
- VSCode Version (if relevant): Not applicable
Logs
No warning or error is emitted. The lockfile contains only the directly pinned immutable ref.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the dependency graph with shared-package#v1, shared-package#v2, and parent-package#v1, then inspect the lockfile and frozen-install path. Trace how immutable refs are resolved and collapsed for one package identity. Done means the incompatible transitive ref is rejected with a clear conflict or safely isolated, and frozen replay cannot accept the substituted graph.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100