Commit 5dae1dc
fix: 10 prod bugs + 7 test-harness bugs surfaced by a no-fail-fast full-suite sweep
CI has been failing one binary per run (cargo fail-fast hides every later
binary), so a local `cargo test --workspace --all-features --no-fail-fast`
sweep (155 targets) was run to flush the whole backlog at once. Prod fixes:
- scan/hosted.rs: --silent swallowed the redirect-VEX failure ("errors
only", never "nothing" — exit 1 with no message is undiagnosable), and
human mode never printed the rewriter's own warnings (JSON already
carried them; e.g. the no-lockfile warning).
- lock_cli.rs: lock_held/lock_io errors were muted under --silent; the
error and its remediation hint now always print in human mode.
- get.rs: the selection_required error advised `--id <UUID>`, a
value-taking form the CLI rejects (--id is a boolean type-tag); it now
directs re-running with the chosen UUID as the identifier.
- repair_vendor.rs: rebuilds from an installed copy for RECONSTRUCTED
entries (ledger gone) were never verified against the rewired lockfile's
integrity — a drifted/tampered copy was blessed into a fresh ledger.
Register the wired integrity for those candidates (same trust anchor as
the unverified-registry rung), and snapshot/restore the wiring files so
a rejected rebuild can't leave the backend's integrity refresh behind.
- cargo_config.rs: wrote into .cargo/config.toml when a legacy
.cargo/config coexists — cargo reads the extensionless file and warns,
so the [patch] entry was silently inert; and the atomic write reset the
destination's permission bits (now mode-preserving, matching the other
lock writers).
- cargo.rs: re-vendoring a new patch uuid over live wiring failed on the
already-detached lock entry and unwound the live config entry (bricking
builds); a detach failure mid-re-vendor dropped the prior socket entry
instead of restoring it; and an artifact-only rebuild of a wholesale-
deleted uuid dir never restored the committed marker file.
- pypi.rs/pypi_requirements.rs: the requirements flavor had no in-sync or
stale-uuid pre-flight (unlike uv/poetry/pdm/pipenv) — every re-run
appended a duplicate wheel line and clobbered the ledger record. Same
uuid is now the in-sync/artifact-rebuild path; a different uuid refuses
(pypi_requirements_already_vendored) before any writes.
- pth_hook/detect.rs + setup.rs: the lockfile refresh ran bare
`poetry lock` / `pdm lock`, re-resolving the user's whole pinned set on
Poetry 1.x; the refresh now tries the pin-preserving spelling first
(`lock --no-update` / `lock --update-reuse`) with bare `lock` as the
fallback for versions that dropped the flag.
Test-harness fixes (hermeticity/scrub bugs that fail suites on their own):
- cli_parse_vendor/e2e_safety_unlock/remove_rollback_api_overrides: env
scrub lists were missing SOCKET_VENDOR_SOURCE / SOCKET_VENDOR_URL /
SOCKET_PATCH_SERVER_URL / SOCKET_STRICT (drift guards demanded them);
remove_rollback also gains the standard drift-guard test.
- setup_matrix_deno.rs: the roundtrip plants SOCKET_STRICT decoys its own
fixed-list scrub didn't strip; converted to the prefix scrub its pypi
sibling uses (with the telemetry force-off).
- e2e_golang.rs: hostile env seeds were added without the paired
env_remove lines, so SOCKET_ECOSYSTEMS=npm leaked and filtered the go
crawler out of every scan.
- e2e_vendor_yarn_classic_build.rs: corepack() scrubbed env AFTER applying
caller overrides, wiping its own YARN_CACHE_FOLDER (the fixture install
silently used the global cache); scrub-then-seed like the berry sibling.
- scan_vendor_e2e.rs: run_cli_env never scrubbed or disabled telemetry, so
runs phoned the configured endpoint (and the live API in ambient-env
shells); prefix scrub + SOCKET_TELEMETRY_DISABLED=1, caller env last.
Verified: full workspace sweep + targeted reruns of every affected binary
(all green), core lib 1895 tests, cli lib 318 tests, clippy -D warnings.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 8f4d150 commit 5dae1dc
17 files changed
Lines changed: 357 additions & 144 deletions
File tree
- crates
- socket-patch-cli
- src/commands
- scan
- tests
- socket-patch-core/src
- patch/vendor
- pth_hook
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
587 | 587 | | |
588 | 588 | | |
589 | 589 | | |
590 | | - | |
| 590 | + | |
591 | 591 | | |
592 | 592 | | |
593 | 593 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
| 206 | + | |
215 | 207 | | |
216 | 208 | | |
217 | 209 | | |
218 | 210 | | |
219 | 211 | | |
220 | | - | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
221 | 217 | | |
222 | 218 | | |
223 | 219 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
507 | | - | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
508 | 524 | | |
509 | 525 | | |
510 | 526 | | |
| |||
590 | 606 | | |
591 | 607 | | |
592 | 608 | | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
593 | 634 | | |
594 | 635 | | |
595 | 636 | | |
| |||
652 | 693 | | |
653 | 694 | | |
654 | 695 | | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
655 | 704 | | |
656 | 705 | | |
657 | 706 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
486 | 486 | | |
487 | 487 | | |
488 | 488 | | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
520 | 500 | | |
521 | | - | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
522 | 535 | | |
523 | | - | |
524 | | - | |
525 | 536 | | |
526 | 537 | | |
527 | 538 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
472 | 472 | | |
473 | 473 | | |
474 | 474 | | |
475 | | - | |
476 | | - | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
477 | 482 | | |
478 | 483 | | |
479 | 484 | | |
| |||
485 | 490 | | |
486 | 491 | | |
487 | 492 | | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
504 | 526 | | |
505 | 527 | | |
506 | 528 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
46 | 49 | | |
| 50 | + | |
47 | 51 | | |
48 | 52 | | |
49 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
91 | 96 | | |
92 | 97 | | |
93 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
43 | 46 | | |
| 47 | + | |
44 | 48 | | |
45 | 49 | | |
46 | 50 | | |
| |||
Lines changed: 7 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
70 | 73 | | |
71 | 74 | | |
72 | 75 | | |
73 | | - | |
74 | 76 | | |
75 | 77 | | |
76 | 78 | | |
| |||
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
43 | 46 | | |
| 47 | + | |
44 | 48 | | |
45 | 49 | | |
46 | 50 | | |
| |||
56 | 60 | | |
57 | 61 | | |
58 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
59 | 78 | | |
60 | 79 | | |
61 | 80 | | |
| |||
0 commit comments