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 — uv rollback, remove and vendor --revert leave an empty `[tool.uv.sources]` header behind when the project's sources are written as `[tool.uv.sources.<name>]` sub-tables · Issue #524 · 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). SummarySome uv projects write their sources only as sub-tables ( ImpactThe impact is low. The table is empty, uv parses it, Repro (Linux, real uv 0.8.17 and 0.5.31, main
|
| Cell | uv 0.5.31 | uv 0.8.17 |
|---|---|---|
| hosted scan → rollback (Linux) | ❌ residue | ❌ residue |
| hosted scan → remove (Linux) | – | ❌ residue |
| vendored scan → vendor --revert (Linux) | – | ❌ residue |
The rewrite is a pure text and TOML edit on the CLI side, independent of OS or uv release; uv only has to accept the result. Not bisected: v5 is the first release with the upstream restore.
crates/socket-patch-core/src/vendor/pypi_uv.rs:498-502: created_sources_table is false whenever tool.uv.sources exists, including when it's only implied by a [tool.uv.sources.<name>] sub-table. So the remove_table_if_empty(…, "[tool.uv.sources]") call at :887-890 never runs, even though toml_edit printed a new explicit header.crates/socket-patch-core/src/patch/redirect/upstream/uv.rs:1111-1128 (restore_metadata): it removes the key, but the sources table isn't empty (it still holds the idna sub-table), and the table stays explicit, so the header is printed. One possible fix is to mark the table implicit again when only sub-tables remain and it wasn't explicit before the scan.[agent] Triaged as priority:p1 (uv). Confirmed on main 61cfb9b: created_sources_table in crates/socket-patch-core/src/vendor/pypi_uv.rs is computed from whether tool.uv.sources exists at all, and a [tool.uv.sources.<name>] sub-table makes it exist implicitly, so the explicit header hosted/vendored mode adds is never removed on unwind. No open PR or duplicate found.
Generated by Claude Code
[agent] Shares root cause with #544: the uv [tool.uv.sources] wiring assumes a standalone, explicit [tool.uv.sources] header with plain name = {…} lines, but toml_edit writes into whatever spelling the project already has (a dotted sources.<pkg> key under [tool.uv], or a header-less parent implied by [tool.uv.sources.<pkg>] sub-tables). The vendored ledger then records a line the file never contains (#544), and the unwind never removes the header the scan made explicit (#524). Will be fixed together.
Generated by Claude Code
[agent] Claiming this issue (with #544; shared root cause: uv sources wiring ignores the project's existing sources-table spelling). Branch: agent/fix-uv-sources-table-spelling. Claim-ID: 2026-10-02T09:20:46Z-d304db
Generated by Claude Code