Commit ad8d067
committed
Stop hosted Go redirects claiming unpatched deps
Hosted mode counted a Go module as redirected whenever any project
file held the patch-server origin (an already hosted package-lock.json)
or leftover gopatch go.sum lines, even when the go.mod rewrite was
refused, so VEX attested modules that still built unpatched. Go deps
now count only when the rewriter reports the replace and both go.sum
lines in place. A module that go.mod does not require and go.sum does
not list (another project's module in the shared module cache) is
refused instead of getting an inert replace.
Switching a vendored Go module to hosted mode now reverts its vendored
copy and ledger entry first, as cargo and npm already did, so the next
vendor run no longer switches it back.
Replaces the CLI did not write are left alone: only ./.socket/... paths
and exactly patch.socket.dev/gopatch/<uuid> are socket-owned, not a
sibling checkout's .socket/vendor copy or a deeper gopatch path.
Duplicate socket replaces for one module collapse to one, a refreshed
directive keeps its trailing comment, quoted module paths are
recognized, and %2B-encoded +incompatible versions resolve in vendor
and apply.
Assisted-by: Claude Code:claude-opus-5-51 parent e024629 commit ad8d067
12 files changed
Lines changed: 757 additions & 67 deletions
File tree
- crates
- socket-patch-cli
- src/commands
- scan
- tests
- socket-patch-core/src
- crawlers
- patch/redirect
- utils
- vendor
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
348 | 383 | | |
349 | 384 | | |
350 | 385 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
| 417 | + | |
417 | 418 | | |
418 | 419 | | |
419 | 420 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
947 | 947 | | |
948 | 948 | | |
949 | 949 | | |
950 | | - | |
951 | | - | |
952 | | - | |
953 | | - | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
954 | 953 | | |
955 | 954 | | |
956 | 955 | | |
| |||
1176 | 1175 | | |
1177 | 1176 | | |
1178 | 1177 | | |
1179 | | - | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
1180 | 1182 | | |
1181 | 1183 | | |
1182 | 1184 | | |
| |||
1192 | 1194 | | |
1193 | 1195 | | |
1194 | 1196 | | |
1195 | | - | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
1196 | 1200 | | |
1197 | 1201 | | |
1198 | 1202 | | |
| |||
2010 | 2014 | | |
2011 | 2015 | | |
2012 | 2016 | | |
| 2017 | + | |
| 2018 | + | |
| 2019 | + | |
| 2020 | + | |
| 2021 | + | |
| 2022 | + | |
2013 | 2023 | | |
2014 | 2024 | | |
2015 | | - | |
2016 | | - | |
2017 | | - | |
| 2025 | + | |
2018 | 2026 | | |
2019 | 2027 | | |
2020 | 2028 | | |
2021 | 2029 | | |
2022 | 2030 | | |
2023 | | - | |
2024 | 2031 | | |
2025 | 2032 | | |
2026 | 2033 | | |
| |||
2036 | 2043 | | |
2037 | 2044 | | |
2038 | 2045 | | |
2039 | | - | |
2040 | 2046 | | |
2041 | 2047 | | |
2042 | 2048 | | |
| |||
0 commit comments