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
Agent-mode PyPI apply leaves .dist-info/RECORD stale (advisory only): rewrite the rows of patched files #2201
After agent mode patches files of a PyPI distribution, the hashes in *.dist-info/RECORD are left stale and the tool emits the PypiRecordStale advisory (crates/socket-patch-core/src/patch/sidecars/types.rs:104: "we didn't rewrite .dist-info/RECORD"; dispatched from patch/sidecars/mod.rs:191). Vendored mode does not have the problem because the wheel it installs carries a regenerated RECORD.
Why this matters
RECORD is what pip and other installers use to verify and to uninstall a distribution, and integrity tools compare it with the files on disk. After a patch they report the patched files as modified. For a text patch that is one line per file; for a patch that replaces a compiled extension it is the same single line. Rewriting it is mechanical: I rewrote the RECORD line for one changed file in a 145-entry pillow wheel and re-validated all 139 hashed entries.
Suggested direction
Rewrite the RECORD rows of the files a patch wrote (sha256 urlsafe-base64 and size, preserving the file's line endings), as the cargo sidecar already does for .cargo-checksum.json, and restore them on rollback. Keep the advisory for the cases that cannot be rewritten (no RECORD, RECORD not writable, a row that did not match the pre-patch file).
Activity