ADR-015: Fix unsatisfiable npm version ranges - #2
Merged
Conversation
Two optionalDependencies declared caret ranges that no published version satisfies: @llm-dev-ops/llm-cost-ops-sdk ^0.1.0 -> ^1.0.1 (published: 1.0.0, 1.0.1) @llm-dev-ops/llm-config-core ^0.1.0 -> ^0.5.0 (published: 0.5.0) Both fail for the same semver reason. A caret range does not cross a major boundary, so ^0.1.0 cannot reach 1.0.1. For 0.x the range is narrower still: ^0.1.0 desugars to >=0.1.0 <0.2.0, which excludes 0.5.0. Because these sit in optionalDependencies, npm skipped them silently and still reported success, so the failure never surfaced as an install error.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements step 14 of ADR-015: Platform Package Naming Authority and Dependency Name Resolution (Kind C — unresolvable version).
Unrelated to open PR #1 (ADR-0001); separate branch, no overlap.
The bug
Two
optionalDependenciesinpackage.jsondeclared caret ranges that no published version satisfies:@llm-dev-ops/llm-cost-ops-sdk^0.1.01.0.0,1.0.1^1.0.1@llm-dev-ops/llm-config-core^0.1.00.5.0^0.5.0Both fail for the same semver reason, though it's worth being precise about the second one since it looks satisfiable at a glance:
^0.1.0cannot reach1.0.1.^0.1.0desugars to>=0.1.0 <0.2.0, so0.5.0does not satisfy it either.Why this went unnoticed
These are
optionalDependencies. npm silently drops optional deps it cannot resolve and still exits 0 — so the failure never surfaced as an install error. The packages were simply absent from the tree, and anyrequire()of them would have failed at runtime instead.Verification (real output)
Before — both ranges 404 against the live registry:
Before — resolution reports success, but the two packages are missing from the tree while their siblings resolve fine:
After — both ranges resolve:
After — both now present in the resolved tree:
After — full
npm install, exit 0, packages physically on disk:Note:
package-lock.jsonis gitignored in this repo (.gitignore:51), so no lockfile change is included.Range choice
No source file imports either package —
grepacrosssrc/andtests/found references only inpackage.jsonand the Phase 2B docs table. So no code constraint dictates the range;^1.0.1and^0.5.0were chosen to track the current published version and stay within its compatible range. Also updated the matching rows indocs/PHASE_2B_INFRA_INTEGRATION_REPORT.md.Not addressed here
Scoped to the two ranges ADR-015 names. The other four
optionalDependencies(@llm-devops/latency-lens,@llm-dev-ops/sentinel-cli,llm-shield-core,@llm-dev-ops/observatory-sdk) were left alone.sentinel-cliandobservatory-sdkwere observed resolving correctly; the other two were not audited in this PR. Worth a follow-up sweep given the same silent-skip behaviour would hide an identical bug.