Skip to content

Commit 0581af1

Browse files
committed
pip: 2026-11-29 run
1 parent 35b8dda commit 0581af1

3 files changed

Lines changed: 53 additions & 12 deletions

File tree

‎entries/pip/20261129T035047Z.md‎

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
[agent] 2026-11-29: pip / requirements.txt bug-hunt run
2+
3+
**Tested:** main `cfc870f` (unchanged; backlog not empty), latest release v5.1.0 (release binary for the regression check). Linux only: real pip 26.3 / CPython 3.12, plus pip 20.3.4 (py3.8), 23.3.2, 24.0–26.2.2 for the boundary of the new bug. Harness: mock2.py from entry 20261029T021000Z plus a `/patches/blob/<gitsha>` route, a `/mirror/<path>` prefix (GET and HEAD), and a second mock instance on another port acting as the mirror host.
4+
5+
## Re-triage
6+
7+
- #2329, #2302, #2272: main unchanged since they were filed; not re-run. #977: `agent:needs-human`, skipped.
8+
9+
## Cells (Linux)
10+
11+
| Cell | Result |
12+
| --- | --- |
13+
| Vendored requirements.txt, then `pip lock -r` (archive `file:///<abs>` entries, no `version`): install, list, `vendor --check`, vex | pass (vex warns "not a root-anchored artifact" but attests via requirements.txt) |
14+
| Same, rollback | refuses (`vendor_revert_residual_reference`, exit 1); following the remedy (`pip lock` re-export, rollback again) restores and cleans up: pass |
15+
| Vendored root + `-r base.txt` → hosted scan with `--patch-mirror-url` | pass: root pin moved onto the mirror, include kept vendored (`redirect_requirements_takeover_unreachable`); install / vex / list / `--check` ok |
16+
| Following that warning's remedy (vendor --revert, move the pin to root, re-scan hosted) then rollback | pass |
17+
| Totals for the case above: "1 vulnerability left to patch (50%)" while six stays vendored and patched | #2304 (cross-ecosystem); PyPI evidence commented |
18+
| Vendored + mirror: `/other/…` fork on the mirror host | pass: refused `pypi_requirement_not_pinned` |
19+
| `scan -g` hosted / vendored | refused exit 2 (documented) |
20+
| Hosted + `-c constraints.txt` with hashes, unhashed root: `pip install -r` and `--require-hashes` (26.3, 23.3.2, 20.3.4) | pass (patched) |
21+
| Vendored + `-c constraints.txt` with hashes (hand-written, and `pip-compile --generate-hashes`), unhashed root | **fail → #2357**: unhashed vendor lines; pip ≥ 26.1 installed the baseline but refuses after vendoring; `vendor --check` 0. Same on v5.1.0 |
22+
23+
## Issues
24+
25+
- Filed: #2357 https://github.com/SocketDev/socket-patch/issues/2357
26+
- Commented: #2304 https://github.com/SocketDev/socket-patch/issues/2304#issuecomment-7250252577 (PyPI hosted variant of the "left to patch" miscount).
27+
- Closed: none.
28+
29+
## False positives ruled out
30+
31+
- Known-non-bug "pip 24 refuses hashed constraints next to an unhashed root" was out of date: pip 26.1+ accepts that layout. Line rewritten to point at #2357.
32+
- Vendored mirror fork refusal: the contract's mirror rule (a pin outside the base is the project's own source).
33+
34+
## Next
35+
36+
1. #2357 / #2329 / #2302 / #2272 re-verify once fixed; #2357 variants (`PIP_CONSTRAINT`, `-c` inside an include, the hosted → vendored eject).
37+
2. Vendored `--user`.

‎known-non-bugs/pip.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Moved from state/pip.md on 2026-11-26 when the state file was compacted. Search
6161
- Hosted `rollback` only recognises hosted URLs of the shape `/patch/pypi/<name>/<ver>/<tok>/<uuid>/<file>`; a mock without that path gets "Manifest not found".
6262
- 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.
6363
- In the sandbox, the CLI can't reach pypi.org directly (`NO_PROXY` lists it), so hosted `rollback`'s upstream lookup fails with "error sending request". Run with `NO_PROXY=localhost,127.0.0.1`.
64-
- pip 24 refuses hashed constraints next to an unhashed root, so constraint-only hash layouts aren't a socket-patch case.
64+
- pip 20.3–26.0 refuse hashed constraints next to an unhashed root, so on those versions a constraint-only hash layout fails before socket-patch touches it. pip ≥ 26.1 accepts it, and vendored mode breaks it: #2357 (2026-11-29). Hosted is fine there.
6565
- 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).
6666
- Hosted refuses bare URL / bare path lines (no `name @`) and `${VAR}` pins with `redirect_requirements_entry_not_found`, exit 0 (the documented hosted-refusal posture).
6767
- A hosted rollback restores a pip-equivalent line, not the original bytes (comment spacing, joined continuations, `(==X)` → `==X`, case).
@@ -110,3 +110,5 @@ Moved from state/pip.md on 2026-11-26 when the state file was compacted. Search
110110
- A hand-written pylock with `dependency-groups` + `'dev' in dependency_groups` markers, hosted or vendored: `vex` against a venv that installed only `--group pylock.toml:web` still attests the `dev` package. Documented: hosted with nothing installed attests from the lock pin; vendored attests the committed artifact (CLI_CONTRACT "Verification basis") (2026-11-27).
111111
- Vendored over a latin-1 PEP 263 requirements.txt refuses every package ("not UTF-8 text"), exit 1, nothing written: fail-closed like the hosted twin (2026-11-27).
112112
- With `--patch-mirror-url <host>/mirror`, a requirements.txt pin in the patch-server path shape under another repository of the same host (`<host>/other/patch/pypi/…`) is left alone with `redirect_pin_on_unconfigured_host`, and list / vex ignore it: the contract's "fork on the mirror's host" rule (2026-11-28).
113+
- Vendored with `--patch-mirror-url`: a `six @ <mirror-host>/other/patch/pypi/…` fork (outside the mirror base) is refused as `pypi_requirement_not_pinned`, exit 1, the other package still wired. It is the project's own source by the contract's mirror rules (2026-11-29).
114+
- A `-r`-include pin kept vendored under a hosted run (`redirect_requirements_takeover_unreachable`) is counted "left to patch" in the closing totals: the cross-ecosystem #2304 (PyPI evidence commented there, 2026-11-29). Don't file it separately.

‎state/pip.md‎

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[agent] Progress ledger for the scheduled pip / requirements.txt bug-hunt routine (label pm:pip).
22

3-
Last run: 2026-11-28, main `cfc870f`, release v5.1.0, newest pip 26.3 (CPython 3.8–3.14 covered). Open bughunt issues: #2329 (new), #2302, #2272, #977 (needs-human). Harness: mock2.py from entry 20261029T021000Z plus a `/patches/blob/<gitsha>` route (BLOB map of before/after file contents) and an auth-checking mirror proxy (entry 20261127).
3+
Last run: 2026-11-29, main `cfc870f`, release v5.1.0, newest pip 26.3 (CPython 3.8–3.14 covered). Open bughunt issues: #2357 (new), #2329, #2302, #2272, #977 (needs-human). Harness: mock2.py from entry 20261029T021000Z plus a `/patches/blob/<gitsha>` route and a `/mirror/<path>` prefix (HEAD too) served by a second mock instance on another port (entry 20261129).
44

55
## Coverage matrix
66

@@ -12,7 +12,7 @@ Cells dated before 2026-11-11 count as untested for the release (see INSTRUCTION
1212
| Plain `pip install -r` after rollback / revert (#1953) | n/a | pass: reinstall advisory (2026-11-26) | pass: advisory (2026-11-26) |
1313
| CRLF + marker + mixed-case name | pass (26.3/py3.12, 20.3.4/py3.8, 2026-11-27) | pass (20.3.4, 2026-11-26; restore normalises name) | pass (20.3.4, 2026-11-26) |
1414
| pip-compile hashed pins, `--require-hashes` | pass (old) | pass (26.3 + mirror, 2026-11-26) | pass (24.0/25.0.1, 2026-10-29) |
15-
| `-r` / `-c` includes | n/a | root file only (documented) | pass (2026-10-29) |
15+
| `-r` / `-c` includes | n/a | root file only (documented); hashed `-c` constraints + unhashed root pass (26.3/23.3.2/20.3.4, 2026-11-29) | pass (2026-10-29); hashed `-c` constraints → fail #2357 (pip ≥ 26.1) |
1616
| `${VAR}` in requirement lines + pylock (#1873) | n/a | pass (refuses) | pass: fixed, six refused, not attested (2026-11-26) |
1717
| Out-of-root `-r` include (#1851) | n/a | root-only (documented), eject refused (2026-11-27) | pass: refused, fixed (26.3, 2026-11-27) |
1818
| `pip lock` pylock.toml / `pip install -r pylock.toml` | n/a | pass (26.3, 2026-11-26); sole-package restore refusal is known | pass (26.2.2, 2026-10-29) |
@@ -26,20 +26,21 @@ Cells dated before 2026-11-11 count as untested for the release (see INSTRUCTION
2626
| `pip freeze`-regenerated file, `--max-new-patches` | pass (2026-11-27) | pass (2026-11-27) | pass `--max-new-patches` (2026-11-27) |
2727
| pip 26.3 `--group` from pylock with group markers | n/a | pass (2026-11-27) | pass (2026-11-27) |
2828
| Warm venv: follow the printed reinstall advice | n/a | fail #2302 | fail #2302 |
29-
| `pip lock -r requirements.txt` over a hosted requirements.txt (archive entries, no `version`): re-scan / rollback / list / vex | n/a | fail #2329 (26.3, 25.1; also v5.1.0) | untested |
30-
| Mirror: fork in another repository of the mirror host (`/other/…` patch-path shape) | n/a | pass: left alone, `redirect_pin_on_unconfigured_host`; list / vex ignore it (2026-11-28) | untested |
29+
| `pip lock -r requirements.txt` over a hosted requirements.txt (archive entries, no `version`): re-scan / rollback / list / vex | n/a | fail #2329 (26.3, 25.1; also v5.1.0) | pass: list / `--check` / vex attest via requirements.txt; rollback refuses with residual-reference remedy, which works after `pip lock` re-export (26.3, 2026-11-29) |
30+
| Mirror: fork in another repository of the mirror host (`/other/…` patch-path shape) | n/a | pass: left alone, `redirect_pin_on_unconfigured_host`; list / vex ignore it (2026-11-28) | pass: refused `pypi_requirement_not_pinned` (2026-11-29) |
31+
| Mirror: vendored root + `-r` include → hosted takeover with mirror; follow the printed remedy for the include pin | n/a | pass: root pin moved to mirror, include kept vendored; remedy (revert, move pin, re-scan) works; install / vex / rollback (26.3, 2026-11-29). Totals miscount → #2304 | pass |
32+
| `-g` with hosted / vendored | pass (24.0, 2026-11-27) | refused exit 2 (documented, 2026-11-29) | refused exit 2 (2026-11-29) |
3133
| pip 26.3 `--uploaded-prior-to` with hosted URL pins | n/a | pass (2026-11-28) | n/a |
3234
| macOS / Windows | blocked (probe workflows off by maintainer decision) | blocked | blocked |
3335

3436
## Backlog
3537

36-
1. #2272, #2302, #2329: re-verify once fixed (#2329: also check the vendored eject over a `pip lock -r` pylock with no `version`).
37-
2. Mirror follow-ups: a `-r` include pinned on the patch server, then a mirror run (vendored → hosted takeover); mirror fork cell in vendored mode.
38-
3. `pip lock -r` over a vendored requirements.txt (`file://` archive, no version) + `vex` — the 2026-10-14 revert drift-keep is known; check list / vex attribution.
39-
4. Hosted `-g` on main; vendored `--user`.
40-
5. #2201 / #2194 (enhancements, agent-mode RECORD / variant selection): don't re-file; check `pip check` / `pip uninstall` after an agent apply once they land.
41-
6. Maintainer questions still open (details in history): hosted rollback restoring an unpinned root as `==X`; `vendor --revert` vs `rollback` on a one-sided `state.json` merge; residual probe reading only `*.txt` / `*.lock`.
42-
7. Friction (not filed): with the mirror set, a pin elsewhere on the mirror host gets "which this run was not given as a patch mirror … set --patch-mirror-url" though it was; consider if users hit it.
38+
1. #2357, #2272, #2302, #2329: re-verify once fixed. For #2357 also check `PIP_CONSTRAINT` / pip.conf `constraint =` with hashes, a `-c` inside an `-r` include, and the hosted → vendored eject over the same layout.
39+
2. Vendored `--user` (`pip install --user -r` over a vendored file).
40+
3. pip 26.1+ hashed-constraint layout in other shapes: `pip lock` from such a tree, and `pip install --require-hashes` with the hosted pin on pip 20.3 / 23.x (baseline fails there).
41+
4. #2201 / #2194 (enhancements, agent-mode RECORD / variant selection): don't re-file; check `pip check` / `pip uninstall` after an agent apply once they land.
42+
5. Maintainer questions still open (details in history): hosted rollback restoring an unpinned root as `==X`; `vendor --revert` vs `rollback` on a one-sided `state.json` merge; residual probe reading only `*.txt` / `*.lock`.
43+
6. Friction (not filed): with the mirror set, a pin elsewhere on the mirror host gets "which this run was not given as a patch mirror … set --patch-mirror-url" though it was. After a vendored rollback refused on a `pip lock` pylock and the pylock is re-exported, the second rollback says "the vendor line for requirements.txt:1 changed since vendoring; left untouched", though the first attempt had already restored it. A vendored re-scan over a `pip lock` pylock warns "pylock.toml do not contain this package version" (the entry has no `version`).
4344

4445
## Known non-bugs
4546

@@ -54,3 +55,4 @@ Full list: `known-non-bugs/pip.md` (search with `git grep`). Most likely to be r
5455
- The agent mock needs a `/patches/blob/<sha>` route; "Before blob could not be downloaded" from a mock without it is a harness gap.
5556
- v5 has no `setup` command / `.pth` hook; that focus area is obsolete.
5657
- `vex` attests a pylock dependency-group package that the venv didn't install: documented verification basis (lock pin / committed artifact).
58+
- A package kept vendored by a hosted run counted "left to patch": #2304 (cross-ecosystem), not a separate pip bug.

0 commit comments

Comments
 (0)