Commit 1e3ace6
v5: remove dead code and v3 compatibility shims (#296)
* Share one hosted-URL check for pdm and poetry
The pdm and poetry lockfile rewriters each carried an identical copy of
the rule that decides whether an existing pin is an earlier hosted
redirect of the same artifact. They now use one copy in python_lock, so
the two rewriters cannot drift apart. No behavior change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018JsczaHn8e6YrCpxs1NznQ
* Remove the never-implemented --one-off flag
`get --one-off` and `rollback --one-off` (and SOCKET_ONE_OFF) never
did anything: they only failed with a "not yet implemented" usage
error. v5.0 drops them. Passing `--one-off` is now an ordinary
unknown-flag error (still exit 2), and SOCKET_ONE_OFF is ignored.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Drop blanket dead-code allow on vlt lock parser
The whole vlt lockfile text module was exempt from dead-code checks,
which hid an unused edge-rendering method. The exemption is gone, the
unused method is deleted, and the macOS-only global node_modules
helper now opts out of the lint only on builds where it is truly
unused. No behavior change for vlt users.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Stop reading never-written package archives
Nothing has written `.socket/packages/<uuid>.tar.gz` for several
releases, yet apply, vendor and repair still probed and overlaid that
directory and the patch pipeline tried it before the diff archive.
v5.0 drops the read path and the `appliedVia: "package"` JSON value.
The GC sweeps (scan --prune, rollback, remove, repair) now remove
any leftover `.socket/packages/` files whole, so old projects are
cleaned up; the `removedPackageArchives` counter keeps reporting them.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Drop v3 env names and legacy scan spellings
v5.0 removes compatibility surface kept since v3/v4:
- The legacy env names SOCKET_PATCH_PROXY_URL, SOCKET_PATCH_DEBUG and
SOCKET_PATCH_TELEMETRY_DISABLED are no longer read (use SOCKET_*).
- The hidden `scan --redirect` flag (use `--mode hosted`) and the
hidden no-op `scan --detached` flag are gone; both are now unknown
flags (exit 2).
- The hidden `--mode` values `host`, `redirect` and `vendor` (scan
and get) are rejected; only hosted, vendored and agent remain.
The hidden `scan --apply` and `scan --vendor` spellings stay.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Delete uncalled public helpers in core vendor code
Several public functions in the core crate had no callers anywhere in
the workspace: the bun workspace artifact snapshot, the vlt lock sniff
wrapper, the in-memory project's binary/symlink/path helpers, and the
disk snapshot's invalidate, sync text read and disk-root accessors.
They are removed. The in-memory project's text/present/entries helpers
that only tests use are now test-only. No user-visible behavior change.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Drop the never-read berry zip URL from hosted
The hosted engine copied the yarn-berry cache-zip URL into every
redirect entry, but no rewriter ever read it: berry pins only the
zip's checksum, which is still taken from the patch reference. The
field is gone from DepOverride; references that still send it parse
as before.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Note the v5 dead-code removals in the changelog
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Share one service fallback policy across backends
Every service-backed vendor backend (npm tarball and directory, pypi,
cargo, composer, golang, gem, and the frozen maven/nuget path) decided
on its own when a patch-service miss falls back to a local build, when
`--vendor-source=service` refuses, and when tampered bytes are fatal.
Seven hand-copied versions of that policy could drift apart.
The policy now lives once in service_fetch.rs: ServicePolicy maps the
Pending, Unavailable, Failed and IntegrityMismatch outcomes, and each
backend keeps only its own handling of a ready artifact. Warnings,
refusal codes, messages and check order are unchanged, including the
npm tarball backend's wording for a failed request in service mode.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Align tests and docs with package-archive removal
Three integration tests still expected a leftover package archive to
be a patch source or to survive GC; they now pin the v5.0 rule (not a
source, always swept). Also: a rollback --one-off rejection test, test
names that no longer mention the removed --detached flag, a dead
berryZipUrl branch in the hosted memory harness, and contract rows
that still listed `--download-mode package`.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent a7b0d00 commit 1e3ace6
153 files changed
Lines changed: 1510 additions & 3519 deletions
File tree
- crates
- socket-patch-cli
- src
- commands
- scan
- hosted
- vendored_backend
- tests
- e2e_vex_build
- e2e_vex_lockfile
- hosted_memory_common
- vex_e2e_common
- vex_pdm_hatch_common
- vex_pipenv_pip_common
- vex_pipenv_pip_real
- socket-patch-core
- src
- api
- crawlers
- hosted
- patch
- redirect
- upstream
- utils
- vendor
- lock_inventory
- vex/discover
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
82 | 109 | | |
83 | 110 | | |
84 | 111 | | |
| |||
96 | 123 | | |
97 | 124 | | |
98 | 125 | | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
103 | 130 | | |
104 | 131 | | |
105 | 132 | | |
| |||
502 | 529 | | |
503 | 530 | | |
504 | 531 | | |
505 | | - | |
506 | | - | |
507 | | - | |
| 532 | + | |
| 533 | + | |
508 | 534 | | |
509 | 535 | | |
510 | 536 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
644 | 644 | | |
645 | 645 | | |
646 | 646 | | |
647 | | - | |
| 647 | + | |
648 | 648 | | |
649 | 649 | | |
650 | 650 | | |
651 | 651 | | |
652 | 652 | | |
653 | 653 | | |
654 | 654 | | |
655 | | - | |
656 | | - | |
| 655 | + | |
657 | 656 | | |
658 | 657 | | |
659 | 658 | | |
| |||
901 | 900 | | |
902 | 901 | | |
903 | 902 | | |
904 | | - | |
905 | 903 | | |
906 | 904 | | |
907 | 905 | | |
| |||
1020 | 1018 | | |
1021 | 1019 | | |
1022 | 1020 | | |
1023 | | - | |
1024 | 1021 | | |
1025 | 1022 | | |
1026 | 1023 | | |
| |||
0 commit comments