GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Fix lock-only requirements.txt discovery (#412, #523) by mikolalysenko · Pull Request #530 · SocketDev/socket-patch Conversation
|
| Issue | Test | Without fix | With fix |
|---|---|---|---|
| #523 | utils::requirements::tests::exact_pin_is_the_shared_registry_pin_rule (spaced, tab, paren and extras forms; ==1.*, ,<2 and stray-paren negatives) |
FAILED | ok |
| #523 | vendor::lock_inventory::tests::requirements_spaced_and_parenthesised_pins_are_inventoried |
FAILED | ok |
| #523 | scan_requirements_lock_only::lock_only_scan_discovers_spaced_pins (built binary; hosted + vendored; purls must reach /patches/batch) |
FAILED | ok |
| #412 | vendor::lock_inventory::tests::requirements_in_root_includes_are_inventoried (nested and relative includes, --requirement=, -rfile, cycle, -c and ../ not followed, ProjectView::Memory) |
FAILED | ok |
| #412 | vendor::lock_inventory::tests::requirements_index_option_in_an_include_spans_the_tree |
FAILED | ok |
| #412 | scan_requirements_lock_only::lock_only_scan_discovers_included_pins (built binary; hosted + vendored) |
FAILED | ok |
cargo clippy --workspace --all-features -- -D warnings: clean.cargo test --workspace --all-features --no-fail-fast: 214 targets. 12 tests fail only because this sandbox runs as root, which ignores the read-only or unremovable fixtures they rely on (*_write_failure_*, *unremovable*, relax_loop_must_not_traverse_symlinked_root). All 12 pass when re-run as a non-root user. Everything else passes.cargo test -p socket-patch-cli --test e2e_vex_build -- pip:: --ignored (real pip, every major, hosted + vendored → manifest-less VEX): ok.cargo fmt --all -- --check is not clean on main itself with the pinned 1.93.1 toolchain (128 files), and CI doesn't run it. The files this PR touches are rustfmt-clean, and no unrelated files were reformatted.acb0abb: 477 success, 6 skipped (matrix templates and canary/downgrade), 0 failed. native (ubuntu-latest, 2.9.3) failed once in its PDM extras vendored lane (appliedExactlyOne). That lane reads pdm.lock and never reaches the requirements.txt inventory, and it passed on its single re-run.acb0abb: no issues found.None.
🤖 Generated with Claude Code
https://claude.ai/code/session_01JASDoVJNrZUBy9kd7fWPxN
Generated by Claude Code
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Assisted-by: Claude Code:claude-opus-5-5
A requirements.txt pin written with spaces around `==` (`six == 1.15.0`), or in the legacy `six (==1.15.0)` form, was not recognized as an exact pin. On a fresh checkout with no venv, lock-only discovery never asked the patch API about the package. scan reported "No patches available" and pip installed the unpatched release. pip treats these forms exactly like `six==1.15.0`, and so does the hosted rewriter. exact_pin now parses the name, extras, optional parentheses and `==` the way pip does. Only options may follow the version, so a range such as `six==1.0,<2` is no longer mistaken for a pin. Lock-only `vex` evidence uses the same rule and gets the fix too. Fixes #523 Assisted-by: Claude Code:claude-opus-5-5
On a fresh checkout, lock-only discovery read only the root requirements.txt and skipped its `-r` include lines. A pin kept in an included file (`-r requirements/base.txt`) was never sent to the patch API. scan reported "No patches available", exited 0, and pip installed the unpatched release, in both hosted and vendored mode. The lock inventory now walks the same in-root include tree the vendored writer edits, using the writer's include parser. The walk runs through the project view, so the in-memory hosted engine sees it too. `-c` constraints and out-of-root includes are still not followed. An index option in any file of the tree now makes hashed pins unverifiable everywhere, matching how pip applies options globally. Fixes #412 Assisted-by: Claude Code:claude-opus-5-5
|
BugBot review Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit acb0abb. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Ready for review at
Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Reviewed No actionable correctness/security regressions found. Checked pin parsing, relative includes/cycle guards, in-memory parity, global index-option handling, and the shared writer/VEX behavior. Validation: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Lockfile-only requirements.txt discovery skips exact pins written with spaces (six == 1.15.0, six (==1.15.0)), so a fresh checkout reports "No patches available" and pip installs the unpatched release
Lockfile-only scan ignores pins in requirements.txt -r includes, so a fresh checkout reports "No patches available" and installs unpatched (hosted and vendored)
There was an error while loading. Please reload this page.