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 — Hosted rollback and remove always refuse a `pip lock` pylock.toml ("no sibling registry package shows the registry and artifact fields"), because pip writes `[[packages.wheels]]` tables, not uv's inline `wheels = [...]` · Issue #804 · SocketDev/socket-patch Closed Labels agent:triagedbugSomething isn't workingSomething isn't workingbughuntFound by a scheduled package-manager bug-hunt agentFound by a scheduled package-manager bug-hunt agentpm:pippip / requirements.txtpip / requirements.txtpriority:p1 Description[agent] Found by the scheduled pip / requirements.txt bug-hunt routine (ledger #309). Summary
[[packages]] name = "idna" version = "3.7" [[packages.wheels]] name = "idna-3.7-py3-none-any.whl" url = "https://files.pythonhosted.org/packages/…/idna-3.7-py3-none-any.whl" [packages.wheels.hashes] sha256 = "82fe…"
They exit 1 ( ImpactOn any project that uses pip's own lock format, a hosted patch can be applied but never unpatched with Repro (Linux, main
|
| OS | pip that wrote the lock | hosted scan + pip install -r pylock.toml |
rollback / remove |
|---|---|---|---|
| Linux | 26.2.1 (py3.11) | pass (pip 26.2.1 installs the patched wheel) | fail |
| Linux | 25.1 (py3.11) | pass (scan; pip < 26.1 can't install a pylock) | fail |
| Linux | 25.3, 26.0 | same [[packages.wheels]] shape (not run end to end) |
expected fail |
| macOS / Windows | — | not probed (TOML parsing only, OS-independent) | not probed |
Not bisected. The array-of-tables shape has never been readable: the restore was written against uv's inline output, and the only [[packages.wheels]] fixture in the repo (tests/e2e_vex_lockfile/uv.rs:198) is a vex test.
crates/socket-patch-core/src/patch/redirect/upstream/uv.rs:328 artifact_tables: package.get("wheels").and_then(Item::as_array) (and sdist via as_value) returns nothing for an ArrayOfTables / standard table. So pylock_unindexed_registry (:353) returns None for every pip sibling.uv.rs:407-426, the shape probe: same as_array / as_inline_table assumption.uv.rs:442: the resulting refusal, worded for uv.[agent] Verified the hosted → vendored takeover too (main 045d7ec, a pip 26.2.1 lock). After scan --mode hosted, scan --mode vendored exits 1 (partial_failure, redirect_revert_failed: "cannot vendor over the live hosted pin: cannot restore pkg:pypi/[email protected] to its upstream registry entry: pylock.toml: no sibling registry package shows …"), and the hosted archive stays in place.
For contrast, plain vendored mode over the same pip lock file works. It writes archive = { path = ".socket/vendor/pypi/<uuid>/six-1.16.0-py2.py3-none-any.whl", hashes = … }, pip 26.2.1 installs the patched wheel from it (both from the project root and with -r /abs/path/pylock.toml from another directory), a rescan is idempotent, and vendor --revert restores the file byte-identically. So only the hosted upstream restore misreads pip's [[packages.wheels]] shape.
Generated by Claude Code
[agent] Triaged as priority:p1 (PyPI / pip). Confirmed on main 045d7ec: artifact_tables in crates/socket-patch-core/src/patch/redirect/upstream/uv.rs:328 reads wheels only through Item::as_array and keeps only inline tables, so pip's [[packages.wheels]] array-of-tables siblings yield no artifacts and pylock_unindexed_registry returns None for every one. Not a duplicate of #407 (fixed by #512, which handled the missing index but not this TOML spelling). No open PR covers it.
Generated by Claude Code
[agent] Claiming this issue (shared root cause: the hosted pylock upstream restore reads packages.wheels only as an inline array, so pip's [[packages.wheels]] array-of-tables shape is invisible). Branch: agent/fix-pylock-wheels-table-array. Claim-ID: 2026-10-04T21:20:35Z-73c495
Generated by Claude Code
[agent] Verified fixed on main 9c43dfc (PR #807) with real pip 26.2.1 on py3.11. I used a pip lock -r lock of six==1.16.0 + idna==3.7 (created-by = "pip", [[packages.wheels]] tables) and a local mock of the hosted API.
scan --mode hosted exits 0 and rewrites six to archive = { url = <hosted wheel>, hashes = … }. A fresh pip install -r pylock.toml imports the patched six.rollback exits 0 with hosted.reverted: ["pkg:pypi/[email protected]"], and pylock.toml is byte-identical to the original pip lock output. A fresh pip install -r pylock.toml then gets the unpatched six.remove pkg:pypi/[email protected] (after a fresh hosted scan) exits 0 with hosted_reverted, and the file is again byte-identical.Generated by Claude Code