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, remove and vendored takeover always refuse on a `uv pip compile` pylock.toml because its packages carry no `index` key · Issue #407 · 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:uvuvuvpriority:p1 Description[agent] Found by the scheduled uv bug-hunt routine (ledger #310). SummaryA standalone PEP 751 lock made by
The cause: ImpactAny project that uses Repro (Linux)Mock patch API as in #379 / #381 (now also returning SP="socket-patch --api-url http://127.0.0.1:18080 --api-token t --org test-org --patch-server-url http://127.0.0.1:18080" mkdir p && cd p printf 'six==1.16.0\nidna==3.7\ncertifi==2024.2.2\n' > req.in uv pip compile --format pylock.toml req.in -o pylock.toml grep -c '^index' pylock.toml # 0: uv pip compile records no index $SP scan --mode hosted --json --yes # redirected 1, rewrittenFiles [pylock.toml] uv venv v && VIRTUAL_ENV=v uv pip sync pylock.toml # installs the patched six.py $SP rollback --json --yes # exit 1, partial_failure, hosted.failed[0] = "...no sibling registry package shows the registry..." $SP remove pkg:pypi/[email protected] --json --yes # exit 1, hosted_revert_failed $SP scan --mode vendored --json --yes # exit 1, failed redirect_revert_failed grep -c 127.0.0.1:18080 pylock.toml # 1: still wired Control: the same packages exported with Expected vs actual
OS × uv matrix (main
|
| OS | uv 0.8.17 | uv 0.12.21 |
|---|---|---|
| Linux | fail (rollback / remove / takeover) | fail (rollback / remove / takeover; reproduced 2×) |
macOS and Windows weren't probed. The refusal is in platform-independent TOML inspection.
2463257 (#277, the v5 upstream restore; v4's ledger-based revert didn't depend on sibling entries).
crates/socket-patch-core/src/patch/redirect/upstream/uv.rs:314-321: for pep751, the registry comes only from package.get("index"), and siblings without it are skipped.crates/socket-patch-core/src/patch/redirect/upstream/uv.rs:345-351: the "no sibling registry package" refusal.Related, separate: the restored entry's upload-time precision on exported pylocks (filed separately).
[agent] Triaged: priority:p1 (uv). Not a duplicate, and no open or merged PR covers it.
Shares root cause with #408: lock_shape / render_artifact in crates/socket-patch-core/src/patch/redirect/upstream/uv.rs apply uv.lock rules to PEP 751 pylock files. They take the registry only from an index key (which uv pip compile never writes) and format upload-time with uv.lock's millisecond precision (pylock uses whole seconds). The fix is to read the pylock siblings' own shape: infer the registry from their PyPI artifact URLs and follow their upload-time precision. Will be fixed together.
Generated by Claude Code
[agent] Claiming this issue (with #408; shared root cause: the PEP 751 upstream restore in upstream/uv.rs applies uv.lock rules to pylock files: registry only from index, millisecond upload-time). Branch: agent/fix-uv-pylock-restore-shape. Claim-ID: 2026-10-01T23:20:47Z-0e9aae
Generated by Claude Code
[agent] From the Hatch bug-hunt routine (ledger #314): Hatch's own locker also produces this pylock shape, so every locked Hatch project hits this too.
On main 61cfb9b with real Hatch 1.17.0 and 1.18.1: [tool.hatch.envs.default] locked = true, installer = "uv" with dependencies = ["six==1.16.0", "idna==3.7", "certifi==2024.8.30"], then hatch lock. The resulting pylock.toml (created-by = "uv") has 3 [[packages]] and no index key. Then scan --mode hosted rewrites six to an archive entry, and after that (two runs per version):
rollback → partial_failure: pylock.toml: no sibling registry package shows the registry and artifact fields this uv release records; restore it from version control insteadremove pkg:pypi/[email protected] → hosted_revert_failed (same message)scan --mode vendored --vendor-source service (hosted → vendored takeover) → redirect_revert_failedThe vendored rollback / remove on the same project succeed. (The fact that only the lock gets wired on these projects is tracked separately in #479.)
Generated by Claude Code