Bug hunt ledger: pip / requirements.txt #309
Replies: 19 comments
|
[agent] 2026-09-30: pip / requirements.txt bug-hunt run This is the first run, so the ledger started empty and there were no Tested: main Setup: a local mock patch API (the same shape as the Pipenv, Poetry and Hatch routines) served a patched Cells
Issues
False positives ruled out
Probe runs
I couldn't delete the probe branches: the git proxy hangs up on ref-delete pushes, the same as the siblings. A maintainer should delete Next
|
|
[agent] 2026-10-01: maintainer note: test global ( This is a maintainer request, not a run report. Add it to the top of the backlog and keep it there until the cells below are covered. Ask: make sure we correctly scan global installs when Where pip / requirements.txt puts global installs: What to check (prove each with a real global install, not by reading source):
Add OS × pip / requirements.txt version cells for |
|
[agent] 2026-10-01: pip / requirements.txt bug-hunt run Tested: main Re-triageMain hasn't moved since the last run, so #376, #409, #410 and #412 can't have changed. No comments. Cells
Issues
Needs a maintainer decision (not filed)
False positives ruled out
Probe runs
I couldn't delete Next
|
|
[agent] 2026-10-01: pip / requirements.txt bug-hunt run Tested: main Setup:
Re-triage
Cells
Issues
False positives ruled out
Probe runs
I couldn't delete Next
|
|
[agent] 2026-10-01: pip / requirements.txt bug-hunt run Tested: main Setup:
Re-triage
Cells
Issues
False positives ruled out
Probe runs
I couldn't delete Next
|
|
[agent] 2026-10-02: pip / requirements.txt bug-hunt run Tested: main Setup:
Re-triageMain hasn't moved since the last run (#478 for #475, #503 for #328 and #481 are still open PRs), so #409 / #410 / #412 / #475 have nothing new to re-check. No comments. Cells
Issues
False positives ruled out
Probe runs
I couldn't delete Next
|
|
[agent] 2026-10-02: pip / requirements.txt bug-hunt run Tested: main Setup:
Re-triageMain hasn't moved. #412 / #523 are claimed by draft PR #530; #475 (PR #478) and #328 (PR #503) are still open. Nothing to re-check. Cells
Issues
False positives ruled out
Next
|
|
[agent] 2026-10-02: pip / requirements.txt bug-hunt run Tested: main Setup:
Re-triageMain hasn't moved and no human replies are on #309, so nothing needed re-checking. Open: #409, #410, #412, #475, #523, #542. Cells (Linux)
Sandbox hazard (again): agent IssuesNone filed, commented on or closed. False positives ruled out
Next
|
|
[agent] Janitor: ledger drift. The coverage matrix still lists these issues as
This is a heads-up only. The janitor never edits ledgers. Generated by Claude Code |
|
[agent] Janitor: ledger drift. This ledger still lists these issues as failing, but they are now closed:
Please re-check them and update the matrix on your next run. Generated by Claude Code |
|
[agent] 2026-10-02: pip / requirements.txt bug-hunt run Tested: main Setup:
Re-triage
Cells (Linux, pip 24.0 / py3.11)
Issues
False positives ruled out
Next
|
|
[agent] 2026-10-03: pip / requirements.txt bug-hunt run Tested: main Setup:
Re-triagemain hasn't moved, so #604, #542, #410 and #409 stand as last run. I didn't comment. #604 was re-observed (vendored lock-only Cells (Linux)
Issues
False positives and limits ruled out
Next
|
|
[agent] 2026-10-03 (08:23 UTC): pip / requirements.txt bug-hunt run Tested: main Setup:
Re-triagemain hasn't moved, so #638, #604, #542, #410 and #409 stand as last run. I didn't comment. The #410 sole-pin refusal was re-observed on the hosted → vendored takeover ( Cells (Linux)
Issues
False positives and limits ruled out
Next
|
|
[agent] 2026-10-03 (14:18 UTC): pip / requirements.txt bug-hunt run Tested: main Setup:
Re-triagemain hasn't moved and no fix PR touches the open pip issues, so #668, #638, #604, #542, #410 and #409 stand. I didn't comment. Cells (Linux)
Issues
False positives and limits ruled out
Next
|
|
[agent] 2026-10-03 (20:26 UTC): pip / requirements.txt bug-hunt run Tested: main Setup:
Re-triagemain hasn't moved. #699 is claimed, and draft PR #708 is open but not merged, so I'll re-verify it once it lands. #668, #638, #604, #542, #410 and #409 stand. I didn't comment. Cells (Linux)
Issues
False positives and limits ruled out
Next
|
|
[agent] 2026-10-04 (02:25 UTC): pip / requirements.txt bug-hunt run Tested: main Setup:
Re-triagemain hasn't moved. #721 now has a draft fix PR, #724; I commented on #721 with a new trigger (below). #699 (PR #708), #668, #638, #604, #542, #410 and #409 stand, with no change to re-verify. Cells (Linux)
Issues
False positives and limits ruled out
Next
|
|
[agent] 2026-10-04: handover from the uv bug-hunt routine (ledger #310) Vendored PyPI re-vendor on a superseding patch fails on a plain The local mock serves printf 'six==1.16.0\nidna==3.7\n' > requirements.txt
uv venv -p 3.11 && uv pip sync requirements.txt
socket-patch scan --mode vendored --json --yes --api-url $M --api-token fake --org acme --patch-server-url $M --vendor-url $M # success, uuid A vendored
# patch API now offers only uuid B
socket-patch scan --mode vendored --json --yes ...same flags...
# exit 1, partial_failure, updates: [{oldUuid: …0001, newUuid: …0004}]
# vendor event: failed, errorCode pypi_requirements_already_vendored
# requirements.txt keeps ./.socket/vendor/pypi/…0001/six-1.16.0-py2.py3-none-any.whlCLI_CONTRACT.md (the |
|
[agent] 2026-10-04 (08:23 UTC): pip / requirements.txt bug-hunt run Tested: main Setup:
Re-triagemain hasn't moved since the last run, so I had nothing to re-verify. #740, #721 (PR #724), #699 (PR #708), #668, #638, #604, #542, #410 and #409 stand. Cells (Linux)
Issues
False positives and limits ruled out
Next
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
[agent] Progress ledger for the scheduled pip / requirements.txt bug-hunt routine (label pm:pip).
Last run: 2026-10-04 08:23 UTC (fifteenth run), main
045d7ec(unchanged), latest release v4.0.0. Filed #765 (a vendored requirements.txt can't re-vendor to a superseding patch uuid:pypi_requirements_already_vendored, exit 1, while--dry-runpreviewswould_revendor; from the uv handover). #765, #740, #721 (PR #724), #699 (PR #708), #668, #638, #604, #542, #410 and #409 are open.Coverage matrix
-rinclude, lock-only==1.16)-g(--user)six == X)six @ mirror)==1.16)--json)vendor)vendor --dry-runover hostedget --mode vendoredover hosted-cby a sibling--global-prefix, unwritable)pip install/pip sync)--user)Scripts/+Lib/)--user,%APPDATA%\Python)pip 20.3.4 on py3.13 is blocked (no
distutils).setupwas removed in v5, so the old setup column (#377, #378) is retired; both issues are closed.Commands covered on Linux: scan (all modes), get (hosted, agent
-g), rollback, remove, vendored takeover, vex (hosted with the mock origin, vendored,-g), repair, list, concurrent runs. Also covered (2026-10-02): free-threaded CPython 3.13t venvs, a.venvsymlink to an out-of-tree venv, a 16-case hosted grammar sweep with fresh installs and rollbacks, virtualenv layouts, pip-toolspip-compile --generate-hashes/pip-syncover a hosted file plus rollback,-cconstraints with an unpinned root,pip install --targettrees,--jsonenvelopes of rollback / remove failures, and interrupted (SIGTERM / SIGKILL) hosted scans. Run ten (2026-10-03, pip 26.2.1 / py3.13 and pip 20.3.4 / py3.8): an 18-shape hosted and vendored grammar sweep with freshpip install -rplus rollback and reinstall, vendored lock-onlyscanover-r/-rX/--requirement=/ CRLF / subdirectory includes,-cconstraints, and grant-token re-pin: all pass or refuse explicitly. Run eight (pip 24.0 / py3.11 and pip 20.3.4 / py3.8): PEP 503 name normalisation (_/-/./ case, venv and lock-only), duplicate and marker-split pins, BOM, no trailing newline,--no-index+--find-links, per-line--config-settings,--require-hasheswith multiple and sha384 hashes,-e/ VCS neighbours (lock-only +vex), symlinked root and include files, out-of-root includes,--prefixtrees: all pass or refuse explicitly.Backlog
vexattests a hosted pin (six@1.16.0) from the lockfile basis when the venv holds a different version (six 1.15.0), with no warning (see the 20261002T142728Z entry). (b) The non--gno-venv fallback to global site-packages (20261001T083942Z). (c) Hosted rollback restores an unpinnedsix(or-c-constrained root) assix==1.16.0, because hosted mode is stateless; should the rewrite refuse unpinned roots, or keep them unpinned on restore? (d) Vendored mode wires a root(transitive)line but leaves a directsix==Xpin in a siblingrequirements-dev.txt, sopip install -r requirements-dev.txtalone stays unpatched (same class as Vendored mode in a Pipenv project wires only Pipfile.lock and silently leaves a sibling requirements.txt unpatched, and the hosted → vendored takeover reverts that file's hosted pin to plain PyPI #612 / Hostedscan --jsonon a PyPI project with no root requirements.txt (e.g. onlyrequirements-dev.txtorrequirements/base.txt) reports success with emptyskippedandwarnings, though the patched package is never pinned #638).--dry-runpreviewswould_revendorand the contract says it re-vendors automatically #765, Hosted and vendored rewrites of a requirements.txt that another file uses as-cconstraints break everypip installon pip 20.3–21.0 ("Links are not allowed as constraints"), with no warning #740, Hosted and lock-only scans treat a UTF-16 requirements.txt (what Windows PowerShell'spip freeze >writes) as absent: exit 0, no warning, and pip keeps installing the unpatched pin #721 (PR Fix UTF-16 requirements.txt silently skipped (#721) #724, plus the PEP 263 latin-1 case), Vendored → hosted takeover strands a requirements.txt pin that lives in a-rinclude or a vendored "(transitive)" line: the wet run reverts it to the unpatched release, while--dry-runpreviews a clean takeover #699 (PR Fix PyPI vendored→hosted takeover stranding unreachable pins (#699) #708),vendor --dry-runover a hosted requirements.txt pin previews apypi_requirement_not_pinnedfailure (exit 1), but the realvendortakes it over and succeeds #668, Hostedscan --jsonon a PyPI project with no root requirements.txt (e.g. onlyrequirements-dev.txtorrequirements/base.txt) reports success with emptyskippedandwarnings, though the patched package is never pinned #638, Lock-only requirements.txt discovery sends PEP 440-equivalent pins verbatim (six==1.16→pkg:pypi/six@1.16), so a fresh checkout reports "No patches available" while the same file with a venv is patched #604, Hosted requirements.txt rewrite replaces a user's own direct reference (six @ https://mirror/…/six-1.16.0-….whl,file://fork) with the Socket PyPI build, and rollback then restoressix==1.16.0from PyPI, losing the original source #542, Hostedrollback,removeand the vendored takeover refuse a requirements.txt whose only requirements are hosted pins (six==1.16.0alone can be patched but never unpatched) #410 and In a--system-site-packagesvenv, pip keeps the base interpreter's unpatched copy after a hosted rewrite, no stale-install warning fires, andvexattests it as patched #409 as fixes land. Poetry hosted ⇄ vendored mode switch is refused, and blames a "user-authored" source that socket-patch wrote itself #328 / Hosted requirements.txt rewrite skips PEP 440-equivalent pins likesix==1.16for an installed 1.16.0, soscanexits 0 and pip installs the unpatched release (regression from v4.0.0) #475 re-verify on pip 20.3.4 / 26.x is still open.1b. pip.conf
constraint =over a rewritten root (the Hosted and vendored rewrites of a requirements.txt that another file uses as-cconstraints break everypip installon pip 20.3–21.0 ("Links are not allowed as constraints"), with no warning #740 class). The command-line-candPIP_CONSTRAINTforms match Hosted and vendored rewrites of a requirements.txt that another file uses as-cconstraints break everypip installon pip 20.3–21.0 ("Links are not allowed as constraints"), with no warning #740's pip 20.3–21.0 boundary (verified 2026-10-04).1c. Vendored
scan --pruneafter the package leaves requirements.txt, and a re-vendor of a "(transitive)" line once Vendored requirements.txt never picks up a superseding patch: the re-vendor to a new uuid fails with pypi_requirements_already_vendored (exit 1), though--dry-runpreviewswould_revendorand the contract says it re-vendors automatically #765 is fixed.get --mode hostedover a vendored include pin (the Vendored → hosted takeover strands a requirements.txt pin that lives in a-rinclude or a vendored "(transitive)" line: the wet run reverts it to the unpatched release, while--dry-runpreviews a clean takeover #699 takeover throughget), once Fix PyPI vendored→hosted takeover stranding unreachable pins (#699) #708 lands.pip freeze >(UTF-16) file end to end (blocked while probe branches can't be deleted).3b. UTF-32 BOM: re-check with the Hosted and lock-only scans treat a UTF-16 requirements.txt (what Windows PowerShell's
pip freeze >writes) as absent: exit 0, no warning, and pip keeps installing the unpatched pin #721 fix (Fix UTF-16 requirements.txt silently skipped (#721) #724 decodes it). The PEP 263 coding line silently no-ops on main (commented on Hosted and lock-only scans treat a UTF-16 requirements.txt (what Windows PowerShell'spip freeze >writes) as absent: exit 0, no warning, and pip keeps installing the unpatched pin #721).3c. PyPy venvs (
lib/pypy3.X/site-packagesis not matched by the crawler'spython3.*glob): blocked in the sandbox (uv can't download PyPy), and outside the CPython scope.-g) mode: Homebrew / PEP 668 interpreters, the py launcher with several interpreters, pipx venvs (Fix global scan missing pipx venvs (#415) #418), non-root unwritable prefixes on CI.Known non-bugs
Hosted mode rewrites only the root
requirements.txt; an installed pin reached only through-rgetsredirect_requirements_entry_not_found(vendored follows includes). The lock-only discovery gap is Lockfile-onlyscanignores pins in requirements.txt-rincludes, so a fresh checkout reports "No patches available" and installs unpatched (hosted and vendored) #412.A warm plain venv keeps the upstream same-version install after a hosted rewrite; this is warned (
redirect_pypi_stale_install) andvexomits it. The system-site-venv variant is In a--system-site-packagesvenv, pip keeps the base interpreter's unpatched copy after a hosted rewrite, no stale-install warning fires, andvexattests it as patched #409.Vendored
vexattests from the committed artifact even when a plain venv still holds upstream bytes; it warnsvendored_tree_out_of_sync(documented).The v5 upstream restore of a hosted line lowercases the name (
Six→six) and normalises spacing before a trailing comment; pip reads both forms the same way.Hosted rollback refuses a file that mixes hashed and unhashed requirements ("not derivable"); pip can't install such a file anyway.
Vendored refuses
===pins,==X.*wildcards and a tab before--hash(pypi_requirement_not_pinned). This is fail-closed and isn't filed (the==1.16zero-padding case is part of Hosted requirements.txt rewrite skips PEP 440-equivalent pins likesix==1.16for an installed 1.16.0, soscanexits 0 and pip installs the unpatched release (regression from v4.0.0) #475).--vendor-source buildwas removed in v5; vendoring always needs a patch-service artifact.rollbackin agent mode drops the manifest entry, so a laterapplyis a no-op (documented).A venv directory not named
.venv/venvis only found throughVIRTUAL_ENV.SOCKET_API_TOKENformat warnings and theuv pipHEAD 501 are mock artifacts.vex -ois--org, not--output.vex --jsonrequires--output.scan --mode agentafter a failedget(unwritable target) skips the recorded entry ("already recorded … runsocket-patch apply") and exits 0. This is documented, and the failedgetitself exits 1.Hosted
vexignores hosted URLs that aren't onpatch.socket.dev. Pass--patch-server-url <mock origin>to attest mock-hosted projects locally.A concurrent second run in the same project exits 1 with "Another socket-patch process is operating in this directory" (by design).
A requirements.txt that v4.0.0 (or a pre-Fix requirements.txt writers ignoring pip hash mode (#376) #383 build) hosted with
--hashin an otherwise unhashed file stays in that shape on a re-scan (exit 0), so pip still fails in hash mode. This is documented in Fix requirements.txt writers ignoring pip hash mode (#376) #383;socket-patch rollbackthen a re-scan rewrites it to the fragment form (verified).Hosted decides hash mode from the root file only, while vendored checks the whole
-rtree. That's harmless: in hash mode pip accepts a user-supplied direct URL's#sha256=fragment as its hash (pip 20.3.4–26.0).The vendored wheel path is CWD-relative;
pip install -rmust run from the project root (documented in CLI_CONTRACT.md).Hosted
rollbackonly recognises hosted URLs of the shape/patch/pypi/<name>/<ver>/<tok>/<uuid>/<file>; a mock without that path gets "Manifest not found".Agent mode doesn't crawl
pip install --target <dir>trees; it reports the package[NOT INSTALLED]with a skip hint (not silent). Hosted works for such projects.In the sandbox, the CLI can't reach pypi.org directly (
NO_PROXYlists it), so hostedrollback's upstream lookup fails with "error sending request". Run withNO_PROXY=localhost,127.0.0.1.pip 24 refuses hashed constraints next to an unhashed root, so constraint-only hash layouts aren't a socket-patch case.
A SIGKILLed scan can leave
.socket-stage-<file>-<uuid>in the project root, and later runs don't remove it; SIGTERM leaves nothing. Not filed (inherent to SIGKILL, cross-ecosystem).Hosted refuses bare URL / bare path lines (no
name @) and${VAR}pins withredirect_requirements_entry_not_found, exit 0 (the documented hosted-refusal posture).A hosted rollback restores a pip-equivalent line, not the original bytes (comment spacing, joined continuations,
(==X)→==X, case).Vendored refuses a per-line option such as
--config-settingson the patched pin, and aname @ <url/file>direct reference, with "not pinned to ==X" (fail-closed; the wording is imprecise). Hosted rewrites--config-settingslines fine.A symlinked
requirements.txtor a symlinked-rinclude is refused explicitly (redirect_symlinked_file_unsupported/pypi_requirements_symlink_unsupported), and so is an include outside the project root (vendored). Nothing is written.Agent mode doesn't crawl
pip install --prefix <dir>trees either ([NOT INSTALLED]+ skip hint), same as--target.With a mock origin, hosted
rollback/vexneedSOCKET_PATCH_SERVER_URL(or--patch-server-url) set to it; vendored needs the mock to serve sha512 integrity.Lock-only cells need
VIRTUAL_ENVpointing at an EMPTY venv: an emptyVIRTUAL_ENV=falls back to the system dist-packages (Ubuntu's python3-six 1.16.0) and masks lock-only behaviour.Vendored refuses
six[extra]==X(pypi_extras_unsupported), and an unpinned root pinned only through-c constraints.txt(pypi_requirement_not_pinned; the wording says "not pinned" although the constraint pins it). Both are fail-closed.Hosted rollback restores
===Xas==Xand an unpinnedsixassix==<installed>. Hosted mode keeps no state, so the line is derived from the hosted URL (see backlog question 0c).A file with a single
--hashline next to unhashed lines is already uninstallable by pip; hosted keeps that shape and rollback drops the lone hash. Garbage in, garbage out.record_fetch_failedon a hosted scan means the mock lacks theviewroute; it isn't a CLI bug.Agent mode doesn't patch editable installs: a PEP 660 finder (
apply_failed"File not found") or a legacy.egg-link("matched no installed package"). Both exit 1 and leave the user's source untouched (fail-closed).The vendored takeover's
vendor_prebuilt_required404 in a local harness means--patch-server-urlrewrote the artifact host to a mock without the prebuilt routes (harness artifact).get --mode vendoredover a hosted BOM file writes the vendored line without the BOM (pip reads either form);rollbackrestores the BOM.Agent
rollback --offlineneeds the before blob in.socket/blobs; without it, it refuses with arepairhint (harness staging, not a bug).Hosted wheel pins under a
--no-binary :all:/--no-binary six/--only-binary :all:option line install fine (pip 24.3.1, 26.2.1): pip doesn't apply format control to direct URLs.Vendored
vendorrefuses a UTF-16 requirements.txt loudly (pypi_no_requirements, exit 1), andvexwarnslockfile_unreadable; only hosted / lock-only discovery is silent (Hosted and lock-only scans treat a UTF-16 requirements.txt (what Windows PowerShell'spip freeze >writes) as absent: exit 0, no warning, and pip keeps installing the unpatched pin #721).A hashed root requirements.txt used as
-cby an unhashed sibling is refused by pip before any rewrite; only the unhashed form is Hosted and vendored rewrites of a requirements.txt that another file uses as-cconstraints break everypip installon pip 20.3–21.0 ("Links are not allowed as constraints"), with no warning #740.pip ≥ 21.1 accepts both the hosted
name @ urland the vendored bare-path line as constraints; only pip 20.3.x–21.0.x reject them (Hosted and vendored rewrites of a requirements.txt that another file uses as-cconstraints break everypip installon pip 20.3–21.0 ("Links are not allowed as constraints"), with no warning #740).vendor --offlineneeds the vendoring service in v5 (vendor_service_offline_conflict). Local vendored repros use theprebuilt_commonfixture server plus aview/<uuid>route.The
-c/PIP_CONSTRAINT/ command-line constraint forms over a hosted or vendored root fail only on pip 20.3–21.0 (same as Hosted and vendored rewrites of a requirements.txt that another file uses as-cconstraints break everypip installon pip 20.3–21.0 ("Links are not allowed as constraints"), with no warning #740); don't re-file them.All reactions