Skip to content

Commit 91ff68c

Browse files
committed
pipenv: bug-hunt run 2026-11-28 (#2343)
1 parent 4ce496e commit 91ff68c

3 files changed

Lines changed: 55 additions & 13 deletions

File tree

‎entries/pipenv/20261128T185314Z.md‎

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
[agent] 2026-11-28: Pipenv bug-hunt run
2+
3+
**Tested:** main `cfc870f` (unchanged since the last run), latest release v5.1.0. No new Pipenv since 2026.12.1. Linux only. Real Pipenv 2026.12.1 and 2023.12.1 on py3.11, and 2018.11.26 on py3.8, with WORKON_HOME venvs. The mock is rebuilt as before (python http.server with batch, by-package, view with base64 `blobContent`, the before and after blobs, a package grant with sha256 + sha512, the patched six 1.16.0 wheel, and a `/pypi/` forwarder). The real patch API is blocked by the sandbox proxy.
4+
5+
## Re-triage
6+
Nothing to re-check: there are no open `bughunt` + `pm:pipenv` issues (#1246 is a perf enhancement).
7+
8+
## Cells (Linux, `cfc870f`)
9+
- **Named categories, hosted, 2026.12.1** (`[docs] six`): pass.
10+
- The rewrite and a lock-only `sync --categories docs` give PATCHED, and `install --deploy --categories docs` gives PATCHED.
11+
- vex gives `not_affected`, and rollback is byte-exact.
12+
- The stale warning prints `--categories "docs"`, and both remedies (uninstall + sync, and `--rm` + `"packages docs"`) give PATCHED.
13+
- **Split versions (#1616 fix), vendored, 2026.12.1** (`develop` 1.16.0 / `tests` 1.15.0):
14+
- pass: only `develop` is wired. A lock-only `sync --dev` gives PATCHED, and `--categories tests` gives upstream 1.15.0. vex and `vendor --check` pass, and the revert is byte-exact.
15+
- **fail #2343:** the reinstall remedy lists `"dev-packages tests"`, so following it leaves six 1.15.0.
16+
- **Split versions, hosted 2026.12.1 + vendored 2023.12.1** (`docs` 1.16.0 / `tests` 1.15.0): the stale remedy (both forms) leaves 1.15.0, while `--categories "docs"` gives PATCHED. **fail #2343** (2 repros). In #1616's own order (`docs` 1.15.0 / `tests` 1.16.0) the remedy works, but only because of the ordering.
17+
- **Agent, 2026.12.1, path with a space:**
18+
- `.env` `PIPENV_VENV_IN_PROJECT=1` (`.venv`): apply PATCHED, vex `not_affected`, rollback UPSTREAM.
19+
- `.venv` plus a WORKON_HOME venv: both are patched and both rolled back.
20+
- WORKON_HOME only: PATCHED, then UPSTREAM.
21+
- All pass.
22+
- **`use_pylock` + `pylock_name = "prod"` + `resolver_backend = "pure-python"`, 2026.12.1:** pass.
23+
- Hosted rewrites Pipfile.lock and pylock.prod.toml, and a lock-only `install --deploy` gives PATCHED. vex gives `not_affected`.
24+
- The vendored takeover gives PATCHED after `--rm` + sync.
25+
- The revert leaves pylock TOML-equivalent (known non-bug).
26+
- **Release re-run, Pipenv 2018.11.26 (py3.8):** pass.
27+
- Hosted: the stale warning and its remedy give PATCHED, a lock-only `install --deploy` gives PATCHED, and vex gives `not_affected`.
28+
- Vendored takeover: a lock-only `sync` gives PATCHED, and `vendor --revert` restores the upstream entry.
29+
30+
## Issues
31+
- Filed #2343: https://github.com/SocketDev/socket-patch/issues/2343. PR #1617 noted this as an untracked follow-up; the real-install evidence shows that following the remedy installs the other, unpatched release, and the warning then goes away.
32+
- None commented on or closed.
33+
34+
## False positives ruled out
35+
- A first agent rollback failed with "Before blob could not be downloaded". That was the mock: it didn't serve the original blob. With the blob served, rollback passes.
36+
- A split-version lock where `[packages]` and a named category pin different releases isn't lockable on Pipenv 2026 (categories are constrained by default). This is already a known non-bug.
37+
- After the #2343 remedy, vendored vex still prints `not_affected` from the committed artifact. That's the documented vendored behavior, not a separate bug.
38+
39+
## Next
40+
The release re-run of 11.10.4 (`path` form); mirror edge cases; `vendor_pypi_bazel_hub` with a Pipfile.lock export; and re-verifying #2343 once it's fixed. See the backlog in `state/pipenv.md`.

‎known-non-bugs/pipenv.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,4 @@ One line per ruled-out finding. Search with git grep; don't read the whole file.
105105
- Pipenv 2026.9.1 `pipenv uninstall idna` on a vendored `use_pylock` lock relocks the other vendored entry (six) into a hashless `{markers, version}` Pipfile.lock entry and a pylock.toml entry with `index` but no `wheels`, before socket-patch runs. `scan --mode vendored --prune` then re-wires six and GCs idna (pass), and `vendor --revert` restores Pipenv's hashless entry, i.e. what was there before the re-wire. That's Pipenv's relock, not a socket-patch rewrite (2026-10-17).
106106
- `uv pip install -r pylock.toml` of a Pipenv-written pylock (markers `'default' in dependency_groups`) installs nothing even before socket-patch touches it; Pipenv/uv interplay, not ours (2026-11-26).
107107
- Under `--patch-mirror-url`, a Pipfile.lock pin on a custom `--patch-server-url` origin (not patch.socket.dev, not the grant origin) is not moved onto the mirror: `redirect_mirror_pin_not_moved` + rollback remedy. By design (owned_url); a patch.socket.dev pin is moved (2026-11-26).
108+
- Harness note (2026-11-28): the mock must also serve the BEFORE blob (`/patch/blob/<gitsha256 of the original>`) or agent `rollback` fails "Before blob could not be downloaded". The real patch API (patches-api.socket.dev) is blocked by the sandbox proxy (CONNECT 403).

‎state/pipenv.md‎

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

3-
Last run: 2026-11-26 ~19:30Z, main `cfc870f` (release v5.1.0; release focus is on), newest Pipenv 2026.12.1 (2026.10.0–2026.12.1 are new since the previous run on 2026-10-17). Linux only. Compacted from 60 KB this run: the old matrix and per-run narrative are in the branch history (state/pipenv.md before 2026-11-26), and the non-bugs moved to `known-non-bugs/pipenv.md`.
3+
Last run: 2026-11-28 ~18:55Z, main `cfc870f` (release v5.1.0; release focus is on), newest Pipenv 2026.12.1 (no release since 2026-11-26). Linux only. The pre-compaction history is in the branch history (state/pipenv.md before 2026-11-26).
44

55
## Coverage matrix
66

@@ -9,28 +9,29 @@ One row per workflow, one column per mode. "pass `cfc870f`" means re-run this re
99
| Workflow | agent | hosted | vendored |
1010
| --- | --- | --- | --- |
1111
| Common path: scan, lock-only `sync` + fresh `install --deploy`, stale warning + remedy, vex, rollback byte-exact | pass 2026.12.1 `cfc870f` (2018–2026.9 pass `045d7ec`–`657fce2`) | pass 2022.12.19 / 2023.12.1 / 2026.12.1 `cfc870f` | pass 2022.12.19 / 2023.12.1 / 2026.12.1 `cfc870f` |
12-
| Pipenv 2018.11.26 / 2020 / 2021 / 2024 / 2025 / 11.x common path | pass `045d7ec`–`61cfb9b`; untested this release | pass (11 `path` form, 2018 py3.8) `2e0d17f`; untested this release | pass `2e0d17f` (7–11 refused, documented); untested this release |
12+
| Pipenv 2018.11.26 / 2020 / 2021 / 2024 / 2025 / 11.x common path | pass `045d7ec`–`61cfb9b`; untested this release | 2018.11.26 py3.8 pass `cfc870f` (stale remedy, lock-only `--deploy`, vex); 11.x / 2020–2025 untested this release | 2018.11.26 pass `cfc870f` (takeover, lock-only sync, revert); 7–11 refused (documented) |
1313
| Patch mirror (`--patch-mirror-url`, experimental) | n/a | pass 2026.12.1 `cfc870f`: fresh pin, lock-only `--deploy` PATCHED, idempotent rescan, `redirect_pin_on_unconfigured_host` without the mirror, patch.socket.dev pin moved onto the mirror, rollback byte-exact; no-mirror list/remove/rollback silence is #2272 (commented) | takeover of a mirrored pin with the mirror: pass 2026.12.1 `cfc870f` (revert byte-exact); without it: "user-declared file reference" (#2272 comment) |
1414
| Relock (`pipenv install <other>` keeps the pin, `pipenv lock` drops it, documented) | n/a | pass 2026.12.1 `cfc870f` | pass 2026.12.1 `cfc870f` |
15-
| `use_pylock` (Pipfile.lock + pylock.toml) | n/a | pass 2026.12.1 `cfc870f` (both rewritten, sync PATCHED, rollback TOML-equivalent) | pass 2026.12.1 `cfc870f` |
15+
| `use_pylock` (Pipfile.lock + pylock.toml), `pylock_name`, `resolver_backend = "pure-python"` | n/a | pass 2026.12.1 `cfc870f` (both rewritten, sync / lock-only `--deploy` PATCHED, rollback TOML-equivalent; `pylock.prod.toml` too) | pass 2026.12.1 `cfc870f` (incl. takeover with `pylock_name`) |
1616
| Stray `MODULE.bazel` at the repo root (Bazel lookup, new since v5.1.0) | untested | pass 2026.12.1 `cfc870f` | pass 2026.12.1 `cfc870f` (not declined) |
17-
| Named categories (`develop`, `[docs]`, `[tests]`), split versions (#1616) | n/a | pass 2022–2026.9 `657fce2`; untested this release | pass 2022–2026.9 `657fce2`; untested this release |
18-
| Out-of-tree venv discovery (WORKON_HOME, IN_PROJECT, `.env`, `.venv` pointer, VIRTUAL_ENV) | pass 2018–2026.8 `9c43dfc`–`b96a785`; untested this release; #842 (closed) | stale warning pass `9c43dfc`; untested this release | n/a |
17+
| Named categories (`develop`, `[docs]`, `[tests]`), split versions (#1616) | n/a | `[docs]` pass 2026.12.1 `cfc870f` (sync/deploy `--categories`, both stale remedies, rollback byte-exact); split-version stale remedy **fail #2343** (2023.12.1 / 2026.12.1) | split wiring pass 2026.12.1 `cfc870f` (only the patched category wired, revert byte-exact); reinstall remedy **fail #2343** |
18+
| Out-of-tree venv discovery (WORKON_HOME, IN_PROJECT, `.env`, `.venv` pointer, VIRTUAL_ENV) | pass 2026.12.1 `cfc870f` (`.env` IN_PROJECT, `.venv` + WORKON_HOME both patched/rolled back, WORKON_HOME only, path with a space); `.venv` pointer / VIRTUAL_ENV untested this release | stale warning pass `9c43dfc`; untested this release | n/a |
1919
| requirements.txt sibling / `pipenv requirements` export | n/a | pass `657fce2`; `--hash` hosted pass | #981 (`--hash` on 2023.7.9+) closed; pass `657fce2` |
2020
| `--prune` GC, interrupted runs (SIGKILL), concurrent scans | n/a | pass `e76cb9b` | pass `7d3086f` |
2121
| `-g` / `install --system` | pass 2018 / 2022 / 2023 / 2026.8 `61cfb9b` | refused exit 2 (documented) | n/a |
2222
| macOS / Windows | probes disabled by maintainers (Linux only) | | |
2323

2424
## Backlog
2525

26-
1. Pipenv 2026.10–2026.12 on the remaining common-path shapes: named categories (`develop` / `[docs]` / `[tests]`, #1616 split versions), `pylock_name`, `resolver_backend = "pure-python"`, out-of-tree venv discovery (WORKON_HOME, `PIPENV_VENV_IN_PROJECT`, `.env`). Check Pipenv's 2026.10–2026.12 changelog for lock-format or venv-location changes first.
27-
2. Release re-run of the oldest supported Pipenvs: 2018.11.26 (py3.8) and 11.10.4 (`path` form) hosted + vendored common path on `cfc870f` or later.
28-
3. Patch mirror edge cases: a user's own source on the mirror's host outside the base in the patch-server path shape (must be a conflict, not rotated), a mirror base with a trailing slash or a path prefix, a `pipenv requirements` export beside a mirrored lock, netrc credentials with Pipenv 2023 / 2026.
29-
4. `vendor_pypi_bazel_hub`: a Bazel `pip.parse` hub that reads `requirements_lock` exported from Pipfile.lock (must decline vendored), and `SOCKET_NO_BAZEL` with the same shape.
30-
5. #2272: re-verify for Pipfile.lock once fixed (list / remove / rollback / vex / vendored without the mirror setting should name the mirror host).
31-
6. #1572, #1608 and #1616 are closed (no open `pm:pipenv` bughunt issues on 2026-11-26): re-verify their fixes on Pipenv 2026.12.1 (ignore rules / LFS, drift warnings, split-version categories).
32-
7. #1050 GC on the #1122 pylock-wired shape; the #1142 named-category-with-packages-left variant.
33-
8. Agent mode with a stray `MODULE.bazel`; `report` command (new since v5.1.0) on a Pipenv project.
26+
1. Release re-run of Pipenv 11.10.4 (`path` form, py3.6) hosted, plus 2020.11.15 / 2024.4.1 / 2025.1.3 hosted + vendored common path on `cfc870f` or later.
27+
2. Patch mirror edge cases: a user's own source on the mirror's host outside the base in the patch-server path shape (must be a conflict, not rotated), a mirror base with a trailing slash or a path prefix, a `pipenv requirements` export beside a mirrored lock, netrc credentials with Pipenv 2023 / 2026.
28+
3. `vendor_pypi_bazel_hub`: a Bazel `pip.parse` hub that reads `requirements_lock` exported from Pipfile.lock (must decline vendored), and `SOCKET_NO_BAZEL` with the same shape.
29+
4. #2343: re-verify once fixed (split-version `develop`/named and named/named stale + reinstall-required remedies, the `--rm` form's ordering, and the base-site `pipenv requirements` remedy, which uses the same `lock_sections`).
30+
5. Split versions where Socket patches BOTH releases (PR #1617 follow-up: the second is refused as `already exists`); check whether that is tracked before filing.
31+
6. #2272: re-verify for Pipfile.lock once fixed (list / remove / rollback / vex / vendored without the mirror setting should name the mirror host).
32+
7. #1572 and #1608 are closed: re-verify on Pipenv 2026.12.1 (ignore rules / LFS, drift warnings).
33+
8. Hosted stale warning with out-of-tree venvs on 2026.12.1; the `.venv` pointer file and VIRTUAL_ENV in agent mode.
34+
9. #1050 GC on the #1122 pylock-wired shape; the #1142 named-category-with-packages-left variant; `report` command on a Pipenv project.
3435

3536
## Known non-bugs
3637

0 commit comments

Comments
 (0)