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 — feat(pypi): narrow/broad release breadth + multi-variant remove/rollback fixes by mikolalysenko · Pull Request #90 · SocketDev/socket-patch Conversation
Collaborator
SummaryPyPI is the only ecosystem that carries a Socket-specific Feature — download-time release breadth (narrow by default)
Correctness fixes surfaced by multi-release manifests
Tests
Full workspace suite: 1573 passed, 0 failed; clippy clean under the pinned 1.93.1 toolchain. Co-Authored-By: Claude Opus 4.8 (1M context) [email protected]
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions…ack fixes PyPI is the only ecosystem that carries a Socket-specific `artifact_id` PURL qualifier, so a single `package@version` can resolve to several patch variants (one per wheel/sdist release). Only the installed distribution can ever apply, but scan/get downloaded every variant and remove/rollback mishandled the qualified keys. Feature — download-time release breadth (narrow default): - Add `--all-releases` (env `SOCKET_ALL_RELEASES`, default off) to `scan` and `get`. Narrow keeps only the variant matching the installed distribution; broad keeps every variant (portable across environments). - `select_installed_variant` (core `patch/apply.rs`) picks the variant whose first patched file is Ready/AlreadyPatched against the on-disk package — shared by the narrow filter and rollback dedupe. - `filter_to_installed_releases` (commands/get.rs) runs in the shared download path; non-PyPI ecosystems and single-variant packages pass through untouched. Falls back to broad (with a warning surfaced in the JSON `warnings` array) when the package is not installed or no variant matches the on-disk bytes. Correctness fixes surfaced by multi-release manifests: - Base-PURL matching (`purl_matches_identifier`, core utils/purl.rs): `remove`/`rollback` of a base PURL now affect every release variant; a qualified PURL or UUID still targets exactly one. Previously a base PURL matched nothing because manifest keys are qualified. - Rollback variant dedupe: rollback groups discovered packages by base PURL and rolls back only the installed-dist variant, ending the spurious HashMismatch failures that broad manifests would have caused (the non-installed variants resolve to the same on-disk file). - `remove` lists each variant when a base PURL expands, so the blast radius is visible before confirmation. - `detect_prunable` compares on stripped base PURLs, so `scan --all-releases --sync` no longer prunes the very variants it just downloaded. Tests: - New in_process_pypi_multi_release.rs: real `pip install six` + a three-variant wiremock exercising narrow-keeps-one, broad-keeps-all, remove-base-clears-all-and-rolls-back, and rollback-all-succeeds. - Unit tests for purl_matches_identifier, find_patches_to_rollback, remove_patch_from_manifest, detect_prunable (PyPI keep/prune), and `--all-releases` parse defaults for scan + get. Full workspace suite: 1573 passed, 0 failed; clippy clean. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Mikola Lysenko (mikolalysenko)
enabled auto-merge (squash)
Wenxin Jiang (Wenxin-Jiang)
approved these changes
Uh oh!
There was an error while loading. Please reload this page.
Mikola Lysenko (mikolalysenko)
deleted the
feat/pypi-multi-release-breadth
branch
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later. |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |