Skip to content

fix(engine): every lock-resolved version reports resolution: lockfile - #254

Merged
sweepies merged 2 commits into
mainfrom
fix/lockfile-resolution-kinds
Nov 11, 2026
Merged

sweepies merged 2 commits into
mainfrom
fix/lockfile-resolution-kinds

Conversation

@sweepies

@sweepies sweepies commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Bug 4 from design consult 4.

crates/engine/src/report.rs reported resolution.kind = lockfile only for npm and Cargo. Lock-resolved versions from Bun, Bundler, Composer, Pyproject, Go and Terraform providers reported declared.

Lockfile now applies to any non-tool, non-toolchain dependency whose resolved version came from a lockfile:

  • the descriptor fact movable_lockfile() covers Cargo.lock, uv.lock and poetry.lock, Gemfile.lock, composer.lock, and go.mod require versions;
  • npm, Bun and Terraform are named explicitly, because their parsers fill resolved only from a committed lockfile (package-lock.json, bun.lock or aube-lock.yaml, .terraform.lock.hcl) without a movable-lock fact.

Report JSON change: resolution.kind becomes lockfile instead of declared for those managers' lock-resolved dependencies. Tool and toolchain dependencies, and Go's go directive, keep their kinds.

Tests (engine/tests/resolution.rs): the Composer test now expects lockfile, and there are new cases for Bun, Bundler, Pyproject, Go (asserting the go directive stays declared) and Terraform.

Docs: the resolution row in reference/report.md.

The corpus proposal snapshot is unchanged; resolution kind is report output, not a lookup fact.

View guided diff Turn on auto-fix

Follow-up, not in this PR: pnpm-lock.yaml, yarn.lock and npm-shrinkwrap.json are lockfiles in the role taxonomy, but nothing reads them for resolution (only package-lock.json, bun.lock and aube-lock.yaml). NuGet packages.lock.json is selected but parsed as MSBuild XML, so it yields nothing. Those dependencies correctly report declared today. Reading these lockfiles would be a feature; the Npm arm here would then already cover pnpm and yarn, and NuGet would need a movable_lockfile fact.

`resolution.kind` named `lockfile` for npm and Cargo alone, so a
version Bun, Bundler, Composer, Pyproject, Go or Terraform resolved
from its committed lockfile reported `declared`. Derive the kind from
`movable_lockfile` — the descriptor fact naming each declaration its
lockfile records a resolved version for — and keep an explicit list
for npm, Bun and Terraform, whose parsers fill `resolved` from a
committed lock without a movable-lock fact. Report JSON's
`resolution.kind` changes for those managers.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
count-patchula e2a3ecd Commit Preview URL

Branch Preview URL
Nov 11 2026, 07:32 AM

A gem with no committed Gemfile.lock records no resolved version, so
the report carries no `resolution` for it at all — `lockfile` can never
appear. And `packageManager`, a tool whose `resolved` is the value the
manifest names, stays `declared` under the kind exclusion.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@sweepies
sweepies merged commit 8e489cd into main Nov 11, 2026
12 checks passed
@sweepies
sweepies deleted the fix/lockfile-resolution-kinds branch November 11, 2026 07:52
@sweepies-ops sweepies-ops Bot mentioned this pull request Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant