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 — Fix vendor --check unwired cause and remedy (#900) by mikolalysenko · Pull Request #970 · SocketDev/socket-patch Conversation
|
| Issue / trigger | Test | Without fix | With fix |
|---|---|---|---|
| #900 contested lock (issue body) | in_process_vendor::vendor_check_names_contesting_lock |
FAILED (wiring missing: no lockfile or config references …) |
ok |
#900 npm uninstall (follow-up comment) |
in_process_vendor::vendor_check_names_removed_dependency_and_prune_remedy |
FAILED (same false message) | ok |
| core contest record | vex::discover::tests::a_ref_another_lock_resolves_elsewhere_is_contested (extended) |
does not compile (no API) | ok |
The existing vendor_check_fails_when_lock_no_longer_wires_artifact test (#725, case 3) still passes, with its message unchanged.
Local runs:
cargo clippy --workspace --all-features -- -D warnings: clean.cargo test --workspace --all-features --no-fail-fast: everything passes except 12 permission-denial / unwritable-file tests, all in files this PR doesn't touch. They fail because this sandbox runs as root, where chmod 0o555 doesn't block writes. The same 12 fail identically on unmodified main 9c43dfc in the same container: 4 in core --lib, 3 each in covgap_commands_vendor and in_process_redirect, and 2 in repair. CI runs as a non-root user.cargo fmt: only the hunks this PR touches are formatted. main isn't rustfmt-clean under the pinned 1.93.1 toolchain (123 files differ), and CI has no fmt gate, so unrelated files are left alone.CI: every check on c831b63 is green, including gradle 8.14.3 / jdk 21 / vendor / windows-latest. That job failed the first time on a Maven Central HTTP 403 and passed when re-run once. Bugbot's review of c831b63 found no issues.
resolved from the legacy mirror. That's Vendored npm vex and vendor --check fail after any npm 7–10 npm install on a lockfileVersion 2 lock, because npm drops resolved from the legacy mirror and #813 treats that as an unpatched npm 6 install (regression) #879's root cause and out of scope here.🤖 Generated with Claude Code
https://claude.ai/code/session_01U5HBJbvvfmhkxErLkvp4rP
Note
Medium Risk
Changes discovery contest bookkeeping and vendor-check failure text that CI gates rely on; behavior is corrective but alters when users see which remedy applies.
Overview
Fixes #900 by making vendor --check and related messaging distinguish three “unwired” vendored-ledger cases instead of always blaming dropped wiring and suggesting socket-patch vendor.
Discovery now keeps cross-lock contests as ContestedRef entries (with vendored_contest and resolves_package) when a ref is dropped because another lock resolves the same version elsewhere.
vendor --check routes dead entries through unwired_check_failure, which emits wiring contested (names both locks; delete the stale one), dependency removed for npm/PyPI when nothing resolves the package (points to scan --mode vendored --prune), or the existing wiring missing / re-vendor text. vex’s vendor_unwired copy is aligned so it no longer contradicts contest diagnostics. CLI contract documents the new reasons; regression tests cover contested locks and post-npm uninstall.
A small digest helper refactor in JVM/Gradle paths (sha1_hex_of / sha256_hex_of) rides along with the fix.
Reviewed by Cursor Bugbot for commit c831b63. Configure here.
Generated by Claude Code
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Assisted-by: Claude Code:claude-opus-5-5
`vendor --check` reported every dead vendored entry as "no lockfile or config references .socket/vendor/... any more; re-run `socket-patch vendor`". In two common cases that was false and the remedy did nothing, so the CI gate stayed red for good: - Another lock (e.g. package-lock.json beside a wired yarn.lock or bun.lock) resolves the same version from the registry. The check now says the wiring is contested, names both locks, and says to delete the lock the project does not install from. - The dependency left the lock (`npm uninstall` or an upgrade). The check now says the dependency was removed and points at `socket-patch scan --mode vendored --prune`, the command that reverts the entry. This matches scan's own hint. Discovery now keeps the refs it drops as contested, so callers can name the contesting lock. `vex`'s vendor_unwired phrase no longer claims nothing wires the artifact when the cause is a contest or a removed dependency. Fixes #900 Assisted-by: Claude Code:claude-opus-5-5
Assisted-by: Claude Code:claude-opus-5-5
main has failed socket-patch-core's lib tests since Gradle support (#646) and the digest helpers (#865) both landed. The guard test production_digests_go_through_the_helpers flags three files #646 added that still hash inline: crawlers/gradle_cache.rs, patch/jvm_jar.rs and patch/sidecars/maven.rs. That breaks test, test-release and coverage on every open PR. Each inline sha1/sha256 call now goes through sha1_hex_of or sha256_hex_of, which compute the same lowercase hex. Behaviour is unchanged. Assisted-by: Claude Code:claude-opus-5-5 (cherry picked from commit 659ac2c)
|
[agent] I ported that fix here as Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
[agent]
This PR doesn't change Gradle, Maven or network code, and the vendored-Gradle runs on the other OSes pass. There's no fix to port, since this is an outage in an external registry. I'll re-run the failed jobs once when the workflow run finishes. It's still running, so GitHub refuses the re-run for now. Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
BugBot review Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit c831b63. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
[burn-down agent] Ready for review at head
Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
vendor --check fails a vendored package whose lock is contested by a sibling package-lock.json with "no lockfile or config references .socket/vendor/… any more", which is false, and its remedy ("re-run socket-patch vendor") is a no-op, so the check stays red forever
There was an error while loading. Please reload this page.