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
Commit dc0dc75
Browse filesBrowse the repository at this point in the historyBrowse files
* Start fix for #1569
Assisted-by: Claude Code:claude-opus-5-5
* Warn hosted uv users when old uv drops the patch
A hosted uv scan wires a transitive patched package through a marked
override-dependencies entry, and repoints [manifest] constraints in
uv.lock. uv before 0.5.5 honours neither: a plain uv sync silently
reinstalls the unpatched wheel, or uv sync --locked fails. Vendored
mode already warns about both; hosted printed nothing and exited 0.
Hosted scans now emit redirect_uv_override_requires_uv_0_5_6 and
redirect_uv_constraints_require_uv_0_5_6 on the run that wires those
shapes (project and script locks). They advise only: the redirect
still counts and the exit code is unchanged.
Fixes#1569
Assisted-by: Claude Code:claude-opus-5-5
* Test the hosted uv advisories end to end
Re-bless the uv rewrite golden: the only change in its 1500 seeded
cases is the new advisory (verified by filtering those two codes and
matching the previous golden exactly), and require that the sweep
reaches both codes. The real-uv hosted transitive and constraints
lanes now assert the advisory, and the uv_hosted transitive case
expects it.
Refs #1569
Assisted-by: Claude Code:claude-opus-5-5
* Cover user-written uv overrides in the advisory
Review fixes for the hosted uv advisories:
- A user's own override-dependencies entry, which the hosted rewrite
reuses for its source, now gets the advisory too: old uv ignores the
source there just the same.
- Read the [manifest] constraints from the lock session's document
instead of parsing the lock again per package.
- Hosted and vendored now share one advisory text, which names the
real affected range (uv before 0.5.5) and the canonical name.
- Vendored-to-hosted takeover no longer names a uv advisory as the
reason another package stayed vendored.
Refs #1569
Assisted-by: Claude Code:claude-opus-5-5
* Keep uv advisories out of takeover skip names
The takeover's skip explanation matched a warning that names the
package before it filtered out landed-pin advisories, so a package
named like a word in the uv advisory (wheel, uv, sync) could inherit
another pin's advisory as its reason for staying vendored. Filter the
uv advisories out of both passes.
Refs #1569
Assisted-by: Claude Code:claude-opus-5-5
---------
Co-authored-by: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: crates/socket-patch-cli/CLI_CONTRACT.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1547,6 +1547,7 @@ command's integration tests check its output.
1547
1547
| `redirect_poetry_stale_install_risk` | `warnings[]` (warning) | scan `--mode hosted` (poetry): same writer test as above — a warm virtualenv keeps the upstream package after the redirect on Poetry < 1.4 (1.4+ re-installs from the new source); fresh installs pick up the patched wheel. Emitted once per rewritten lock, only on the run that rewrites it. |
1548
1548
| `redirect_poetry_source_constraint` | `warnings[]` (warning) | scan `--mode hosted` (poetry): the pyproject pins the redirected package to a named source (`source = "pypi"`) and the lock is in format 2.1+ and was not written by Poetry 1.3 – 2.2 (those writers, and any `lock-version` 1.0 / 1.1 lock, which every Poetry 1.3+ re-solves and refuses (#1503), are refused with `redirect_poetry_lock_unsupported`, also when the lock is already redirected and before a vendored → hosted takeover reverts anything). The rewrite stands, and an already-redirected lock is still confirmed; the detail says a Poetry 1.3 – 2.2 installer would refuse the lock and to drop the `source` key if the project is installed with one. Exit code and `status` unchanged. |
1549
1549
| `redirect_poetry_entry_not_found` / `redirect_poetry_missing_sha256` / `redirect_poetry_lock_unsupported` | `warnings[]` (warning) | scan `--mode hosted` (poetry): the lock has no `[[package]]` at the granted version (uv-parity twin of `redirect_uv_entry_not_found`); the grant carries no SHA-256 (gated once per dep, not per lock); the lock is refused — Poetry 0.12 layout (URL sources ignored), an unsupported `lock-version`, a forked package listed at several versions, a user-authored `[package.source]` on another origin (an earlier Socket URL for the same wheel is superseded in place), a package the pyproject pins to a named source (`source = "pypi"`) over a lock written by Poetry 1.3 – 2.2, whose installer refuses that constraint on a URL-sourced package, or over a `lock-version` 1.0 / 1.1 lock, which every Poetry 1.3+ re-solves and refuses the same way (#1503), a malformed `[metadata.files]`/`[metadata.hashes]`, or a wheel whose filename does not match the locked package. Exit code and `status` unchanged (hosted-refusal posture). A vendored → hosted takeover over a Poetry 0.x lock is retracted with this code (wet and `--dry-run`, see **Staged takeover**): the purl stays vendored and patched and is skipped with this code as `skipped` (hosted event). The detail names the remedy and its reach: run `socket-patch vendor --revert` (it reverts EVERY vendored package in the project, not just this one), upgrade to Poetry >= 1.0 and re-lock, then re-run `scan --mode hosted`. |
1550
+
| `redirect_uv_override_requires_uv_0_5_6` / `redirect_uv_constraints_require_uv_0_5_6` | `warnings[]` (warning) | scan/get `--mode hosted` (uv project and script locks, #1569): the hosted twins of vendored's `pypi_uv_override_requires_uv_0_5_6` / `pypi_uv_constraints_require_uv_0_5_6`. The run wired a transitive package through a `[tool.uv] override-dependencies` entry, its own marked one or the user's (uv before 0.5.5 re-resolves it and a plain `uv sync` reinstalls the upstream wheel), or repointed a `[manifest]` `constraints` / `build-constraints` entry (uv before 0.5.5 rejects it under `uv sync --locked`). The CLI cannot tell those uv releases apart from the lock, so these advise and the redirect still counts. Emitted on a run that writes the package's wiring (a first pin or a re-pin to a superseding patch); a settled re-run is silent. Exit 0. |
1550
1551
| `redirect_pdm_refused` / `redirect_pdm_legacy_sync_required` | `warnings[]` (warning) | scan `--mode hosted` (pdm): the `pdm.lock` rewrite was refused — an unsupported `[metadata] lock_version` (the identity-losing `3.1` / `4.0`–`4.2` formats or an untested future format), an unsupported `strategy`, a package listed at several versions (fork) or absent, a user-authored `url`/`path`/VCS/`editable` source, hash-less or malformed `files`, or a wheel whose filename does not match the locked package (`redirect_pdm_refused`); or the lock was written in format `2` (PDM 0.12–1.4), whose upstream freshness bug lets `pdm install` regenerate the lock — use `pdm sync` (`redirect_pdm_legacy_sync_required`). A refused uuid is withheld from every other PyPI rewriter when `pdm.lock` is the install driver, and its patch is not confirmed. Exit code and `status` unchanged (hosted-refusal posture). |
1551
1552
| `redirect_bun_lock_unsupported` | `warnings[]` (warning) | scan/get `--mode hosted` (bun): the text lock's `lockfileVersion` is not 0, 1 or 2 (a newer version: update socket-patch, re-locking would reproduce it; no integer: re-lock with Bun ≥ 1.2 — the shared gate's text, identical to vendored's `vendor_lockfile_version_unsupported`), or its `packages` section is not bun's single-line grammar. Nothing rewritten; exit 0 (hosted-refusal posture). |
1552
1553
| `redirect_bun_workspace_unsupported` | `warnings[]` (warning) | scan/get `--mode hosted` (bun): a lockfileVersion-0 lock (Bun 1.1.39–1.1.45 `--save-text-lockfile`) holds `workspace:` packages; frozen installs of that grammar cannot keep the hosted tuple. Detail: "Bun version-0 workspace locks cannot preserve hosted tarballs on frozen installs; delete bun.lock and re-run `bun install` with Bun >= 1.2 (which writes lockfileVersion 1, accepted by hosted mode) — a plain in-place `bun install` bumps the version only when a workspace depends on another workspace (e.g. root -> member); otherwise it keeps version 0 or fails to resolve" (measured: Bun 1.2.0 keeps 0, 1.2.23–1.4.2 exit 1 "failed to resolve" on a root that does not depend on its members). Version-1/2 workspace locks are rewritten. Exit 0. |
0 commit comments