GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix Pipenv requirements remedy categories (#1507) by mikolalysenko · Pull Request #1508 · SocketDev/socket-patch

Conversation

@mikolalysenko

@mikolalysenko Mikola Lysenko (mikolalysenko) commented Oct 13, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

LLM Description written by Claude Code:claude-opus-5-5

Fixes #1507

Summary

Socket Patch prints a remedy when a --site-packages Pipenv venv imports an
unpatched copy from its base interpreter (#1450). If the package was pinned in
several lock categories and at least one was named ([packages] + [docs],
[dev-packages] + [docs], …), the remedy printed
pipenv requirements --categories "packages docs". On Pipenv
2022.12.x–2023.2.4 that export is empty, so the follow-up
pip install -r installed nothing and exited 0. The venv kept the unpatched
copy and the warning came back on the next scan.

The export now names comma-joined lock keys
(--categories "default,docs"), which every Pipenv release that has
--categories reads. The pipenv sync remedies are unchanged and keep the
Pipfile names that sync takes.

Root cause

install_over_command (crates/socket-patch-core/src/vendor/pypi_pipenv.rs)
reused sync_args, which joins Pipfile names with spaces. That's correct for
pipenv sync, but pipenv requirements before 2023.2.18 splits
--categories on commas and looks each name up as a raw lock key. The fix
adds requirements_args, which keeps sync_args' plain/--dev forms and
renders named categories as comma-joined lock keys. Hosted and vendored
modes both go through this one function, so both are fixed. The npm, PyPI and
gem wrappers don't touch this code.

Test evidence

  • New base_site_remedy_exports_comma_joined_lock_keys covers
    default+docs, develop+docs, default+develop+docs+tests and docs-only for
    both base-interpreter remedies. It also asserts that sync still takes
    Pipfile names. The existing Pipenv stale-install remedy can't replace a base-interpreter copy in a --site-packages venv: pip uninstall refuses it and pipenv sync keeps it, so following the warning leaves the package unpatched #1450 test's expectation was updated.

    • Red before the fix: both tests failed (cargo test -p socket-patch-core --lib base_site: 2 failed).
    • Green after: cargo test -p socket-patch-core --lib pypi_pipenv: 33 passed.
  • Real Pipenv run against the issue's lock (default: idna, six; develop: six; docs: six):

    pipenv requirements --categories … 2022.12.19 2023.2.4 2026.9.1
    "packages docs" (old) empty – –
    "dev-packages docs" (old) empty – –
    "default,docs" (new) idna six – idna six
    "develop,docs" (new) six – six
    "default,develop,docs" (new) idna six idna six idna six
    "docs" (new, single) six – six
  • cargo fmt --all -- --check: clean. cargo clippy --workspace --all-features -- -D warnings: clean.

  • cargo test -p socket-patch-cli --all-features --lib: 919 passed.

  • cargo test -p socket-patch-core --all-features: 6460 passed, 4 failed.
    The 4 failures are permission tests (copy_tree symlinked root,
    vlt_heal unremovable lock, pypi_poetry/pypi_requirements write
    failure). They can't fail as intended under root in this container, and
    they fail the same way with this PR's change reverted. CI runs as non-root.

  • The full cargo test --workspace hit this container's disk allowance
    while linking integration-test binaries (no test failed), so CI's full run
    is the check for those suites. No CLI integration test asserts this remedy
    string.

Per-issue checklist

  • Pipenv base-interpreter remedy (#1450) prints pipenv requirements --categories "packages docs", which Pipenv 2022.12.x–2023.2.4 export as empty, so following it installs nothing (exit 0) #1507: base_site_remedy_exports_comma_joined_lock_keys (red → green), plus the updated base_site_stale_install_remedy_installs_over_the_base_copy

/code-review high findings not fixed

  • Category names containing commas, spaces or shell metacharacters aren't
    escaped. This predates the PR: sync_args has always inserted names
    as-is. Pipenv's own --categories parsing can't express such names
    either.
  • The Pipenv backtest (scripts/backtest-pipenv.py) never runs the
    base-interpreter remedy, so it doesn't run the multi-category export. Adding
    that scenario is a separate change. I checked this PR by hand against real
    Pipenv releases (table above).
  • The version note keys on the rendered --categories prefix. A
    develop-only pin exports --dev, which also covers default. Both
    predate the PR and this fix doesn't change them.
  • The overlap between the updated Pipenv stale-install remedy can't replace a base-interpreter copy in a --site-packages venv: pip uninstall refuses it and pipenv sync keeps it, so following the warning leaves the package unpatched #1450 assertion and the new table is
    intentional: it keeps the original test's coverage of the full remedy text.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CdJ5dk71VDEiEYvkU3ULap


Generated by Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@claude
Start fix for #1507
792cea8
Assisted-by: Claude Code:claude-opus-5-5
@mikolalysenko Mikola Lysenko (mikolalysenko) mentioned this pull request Oct 13, 2026
Pipenv base-interpreter remedy (#1450) prints pipenv requirements --categories "packages docs", which Pipenv 2022.12.x–2023.2.4 export as empty, so following it installs nothing (exit 0) #1507
Closed
@claude
Fix empty Pipenv export in base-interpreter fix
9d5027f
The remedy for a stale base-interpreter copy in a --site-packages
venv printed `pipenv requirements --categories "packages docs"` when
the package sat in several lock categories, one of them named.
Pipenv 2022.12.x-2023.2.4 read that as one category the lock lacks,
so the export was empty, pip exited 0 and the venv kept importing
the unpatched copy while the warning repeated.

The export now names comma-joined lock keys ("default,docs"), which
every Pipenv release with --categories reads. The sync remedies keep
the Pipfile names `pipenv sync` takes.

Fixes #1507

Assisted-by: Claude Code:claude-opus-5-5
@mikolalysenko Mikola Lysenko (mikolalysenko) mentioned this pull request Oct 13, 2026
Swarm health manager log #1382
Open
@mikolalysenko
Mikola Lysenko (mikolalysenko) marked this pull request as ready for review October 13, 2026 23:01
@mikolalysenko

Mikola Lysenko (mikolalysenko) commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator Author

BugBot review


Generated by Claude Code

cursor[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cursor[bot]
cursor Bot reviewed Oct 13, 2026
View reviewed changes

@cursor cursor Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for 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 9d5027f. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Tanmay182003
Tanmay Singla (Tanmay182003) approved these changes Oct 13, 2026
View reviewed changes
@mikolalysenko
Mikola Lysenko (mikolalysenko) added this pull request to the merge queue Oct 13, 2026
Merged via the queue into main with commit 887a5f7 Oct 14, 2026
86 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@mikolalysenko
Mikola Lysenko (mikolalysenko) deleted the agent/fix-pipenv-requirements-categories branch October 14, 2026 00:00
This was referenced Oct 14, 2026
CI performance dashboard #1182
Open
CI perf (settings): slow Depot 16-core hosts since 10-13 15:20 add ~1.5–2.5 min to the merge-queue critical path (~0.6k Linux job-min/day) #1512
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@cursor cursor[bot] cursor[bot] left review comments
@Tanmay182003 Tanmay Singla (Tanmay182003) Tanmay182003 approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Pipenv base-interpreter remedy (#1450) prints pipenv requirements --categories "packages docs", which Pipenv 2022.12.x–2023.2.4 export as empty, so following it installs nothing (exit 0)

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@mikolalysenko @Tanmay182003 @claude
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.