Repository navigation
feat(cli): oa check reads poetry.lock, uv.lock and Cargo.lock - #486
Merged
Merged
Conversation
pkg/lockfile gains three TOML parsers (go-toml/v2, already linked by oa): - poetry.lock: packages from PyPI or a "legacy" source (a custom index); git, directory, file and URL packages are left out. Poetry 2 lists each package's groups and Poetry before 1.5 a category, so a package outside "main" is development-only; Poetry 1.5 to 1.8 record neither. - uv.lock: packages with a registry source. The workspace members (virtual or editable) are the project: no requirers, and a package is development-only when their dependencies and extras do not reach it, only their dependency groups. A dependency that names a version picks that one of several locked versions. - Cargo.lock: crates of a registry+ or sparse+ source; git crates are left out and crates without a source (workspace members, path crates) are no requirers. Cargo.lock records no dev-dependencies. Python names are normalized (PEP 503), as an index and the requirement keys agree on. lockfile.DevRecorded tells oa check when --no-dev means nothing: yarn.lock, Cargo.lock and a poetry.lock of Poetry 1.5 to 1.8, which it now refuses for all of them. --fetch requests the simple API project page (simple/<name>/) or the sparse index file (index/<prefix>/<crate>). The fixtures are real lockfiles of one project generated by uv 0.11, Poetry 2.2 and 1.8 and cargo 1.99, with the packages renamed to acme-*, the descriptions and extras dropped and the file hashes removed; uv and Poetry 2.2 parse to the same packages and dev flags. Fuzz targets for each format. Checked end to end against a compose stack with PyPI and cargo proxies to pypi.org and index.crates.io behind groups: a cold proxy answers unknown, --fetch makes every package available, a minimum age holds the young version with its until time, and a version upstream lacks is not_found. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Collaborator
|
Thanks @orcamedia, merged! |
orcamedia
added a commit
to openartifact/openartifact-agent-plugin
that referenced
this pull request
Nov 16, 2026
check-lockfile reads uv.lock, poetry.lock and Cargo.lock with awk and jq, and traces what requires a package in each. On the fixtures of openartifact/openartifact#486 the commands give the same packages as oa check's parsers, also with mawk and jq 1.6. New eval lockfile-uv (a curation hold on a transitive package); the lockfile cases score 1.00 with the plugin, mean delta +0.73. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Areef <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
oa check reads poetry.lock and uv.lock (against a PyPI repository) and Cargo.lock (against a cargo repository); --fetch requests the simple API page or sparse index file of each package. --no-dev is refused for every lockfile that does not record dev dependencies (yarn.lock, Cargo.lock, a poetry.lock of Poetry 1.5 to 1.8).
Fixtures are real lockfiles from uv 0.11, Poetry 2.2 and 1.8 and cargo 1.99, renamed to acme-*. Checked end to end against PyPI and cargo proxies to pypi.org and index.crates.io behind groups: cold proxies answer unknown, --fetch makes them available, a minimum age holds the young version with its until time, and a version upstream lacks is not_found.
Known limits, both server-side: the server matches PyPI versions against how the file names spell them, and a PyPI upstream that serves only HTML pages answers unknown. pylock.toml (PEP 751) is not covered.
🤖 Generated with Claude Code