You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Vendored PyPI revert drift warnings print the ledger key in Rust debug form: Pipfile.lock entry for Some("default:six") changed since vendoring #1608
[agent] Found by the scheduled Pipenv bug-hunt routine (ledger #313).
Summary
When a vendored Pipenv project's recorded wiring has drifted, vendor --revert, remove and rollback warn with the ledger key formatted through {:?} on an Option<String>. The warning, in both human output and --json warning text, shows a Rust Some("…") wrapper instead of the key:
Warning: Pipfile.lock entry for Some("default:six") changed since vendoring; left untouched
Warning: requirements.txt: the vendor line for Some("requirements.txt:1") changed since vendoring; left untouched
Impact
This is cosmetic only. The keep/restore behaviour is correct, nothing is unpatched silently, and VEX isn't affected. But the debug form leaks into user-facing text and into the --json warning messages that CI consumers read. When the key is missing (None, e.g. an older or hand-written ledger), the warning would print entry for None.
Repro (Linux, main 657fce2 / 5.0.1, real Pipenv 2026.9.1, local mock of the patch API serving a patched six-1.16.0 wheel)
cat > Pipfile <<'EOF'[[source]]url = "https://pypi.org/simple"verify_ssl = truename = "pypi"[packages]six = "==1.16.0"[requires]python_version = "3.11"EOF
pipenv lock
socket-patch scan --mode vendored --yes # Pipfile.lock six → ./.socket/vendor/pypi/<uuid>/six-…whl# drift the vendored entry (any field the ledger recorded, e.g. its markers)
sed -i "s/python_version >= '2.7' and/python_version >= '2.8' and/" Pipfile.lock
socket-patch vendor --revert --yes # Warning: Pipfile.lock entry for Some("default:six") changed since vendoring; left untouched
socket-patch rollback --yes --json | grep -o 'entry for Some[^;]*'# entry for Some(\"default:six\") changed since vendoring
The requirements.txt variant: vendor with a sibling requirements.txt holding six==1.16.0, then hand-restore that line (or interrupt a remove with SIGKILL after it restored requirements.txt but before it dropped the ledger) and re-run vendor --revert. It prints the vendor line for Some("requirements.txt:1") changed since vendoring.
Expected vs actual
Expected: the warning names the entry as the ledger records it (Pipfile.lock entry for default:six …, the vendor line for requirements.txt:1 …). Other warnings in the same code path print keys plainly, e.g. the vendor_revert_residual_reference text.
the same pattern at crates/socket-patch-core/src/vendor/pypi_uv.rs:991 and crates/socket-patch-core/src/vendor/common.rs:826 (not exercised here; they likely show the same leak for uv and the other common.rs users)
A fix along the lines of rec.key.as_deref().unwrap_or("<unknown>") with {} would cover all four.
[agent] Triaged as priority:p1 (Pipenv, PyPI family; cosmetic). Confirmed on main 657fce2: WiringRecord::key is Option<String> and is formatted with {:?} in vendor/pypi_pipenv.rs (lines 569, 607, 665), vendor/pypi_requirements.rs:601, and the same pattern in vendor/pypi_uv.rs and vendor/common.rs. Not a duplicate; no open or merged PR addresses it.
Activity
mikolalysenko commentedon Oct 16, 2026
[agent] Triaged as
priority:p1(Pipenv, PyPI family; cosmetic). Confirmed on main657fce2:WiringRecord::keyisOption<String>and is formatted with{:?}invendor/pypi_pipenv.rs(lines 569, 607, 665),vendor/pypi_requirements.rs:601, and the same pattern invendor/pypi_uv.rsandvendor/common.rs. Not a duplicate; no open or merged PR addresses it.Generated by Claude Code
mikolalysenko commentedon Oct 23, 2026
[agent] Claiming this issue (shared root cause: vendored revert warnings format the
Option<String>ledger key with{:?}). Branch: agent/fix-vendor-ledger-key-debug-format. Claim-ID: 2026-10-23T03:21:08Z-63f80eGenerated by Claude Code
mikolalysenko commentedon Oct 23, 2026
[agent] Draft PR: #1679
Generated by Claude Code
Show ledger keys plainly in revert warnings
Escape untrusted keys and flavors in warnings