Description
repro_deps_pinned automatically fails any project that uses requirements.txt without a separate lockfile, even when every dependency inside requirements.txt is strictly pinned to an exact version (==) or contains cryptographic hashes. While #416 mentions checking frozen-form requirements in its roadmap, current repro_deps_pinned_handler unconditionally returns a hard FAIL.
What We Did
- Created a Python project with
requirements.txt containing strictly pinned dependencies (such as numpy==2.5.2 or click==8.1.7).
- Ran
darnit audit . --framework reproducibility --show-all.
What It Was Supposed To Do
The check should inspect the contents of requirements.txt. If all dependencies specify exact versions (==) or --hash, it should pass (or return a warning about transitive resolution), rather than failing outright as an unpinned loose manifest.
What We Got
The check returned a hard FAIL:
✗ RE-01.01: FAIL - Dependency manifests found but no lock files: requirements.txt (pip requirements)
Proposed Fix
In repro_deps_pinned_handler, inspect the lines in requirements.txt:
- If any line uses open or range specifiers (
>=, ~=, >, *), flag as FAIL.
- If all non-comment lines use exact pins (
==) or hashes, return PASS (with lower confidence) or WARN recommending a formal lockfile for transitive resolution.
Reference report: https://github.com/Jaydeep869/darnit/blob/reproducibility-evaluation/reports/README.md#issue-2-false-positive-repro_deps_pinned-unconditionally-flags-exact-pinned-requirementstxt-as-loose-manifests
Description
repro_deps_pinnedautomatically fails any project that usesrequirements.txtwithout a separate lockfile, even when every dependency insiderequirements.txtis strictly pinned to an exact version (==) or contains cryptographic hashes. While #416 mentions checking frozen-form requirements in its roadmap, currentrepro_deps_pinned_handlerunconditionally returns a hardFAIL.What We Did
requirements.txtcontaining strictly pinned dependencies (such asnumpy==2.5.2orclick==8.1.7).darnit audit . --framework reproducibility --show-all.What It Was Supposed To Do
The check should inspect the contents of
requirements.txt. If all dependencies specify exact versions (==) or--hash, it should pass (or return a warning about transitive resolution), rather than failing outright as an unpinned loose manifest.What We Got
The check returned a hard
FAIL:Proposed Fix
In
repro_deps_pinned_handler, inspect the lines inrequirements.txt:>=,~=,>,*), flag asFAIL.==) or hashes, returnPASS(with lower confidence) orWARNrecommending a formal lockfile for transitive resolution.Reference report: https://github.com/Jaydeep869/darnit/blob/reproducibility-evaluation/reports/README.md#issue-2-false-positive-repro_deps_pinned-unconditionally-flags-exact-pinned-requirementstxt-as-loose-manifests