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 artifact failure message (#1467) by mikolalysenko · Pull Request #1468 · SocketDev/socket-patch Conversation
|
| Issue row | Test |
|---|---|
#1467 member mirror deleted / changed (Bun bun.lockb workspace) |
vendor::verify::tests::binary_workspace_health_attests_every_installable_tarball (asserts the exact text, including the member path) |
#1467 root artifact deleted / changed (Missing / vendor_sha256_mismatch) |
CLI in_process_vendor::vendor_check_names_damaged_artifact_and_repair_remedy |
| every other health state, plus the no-sha256 fallback | vendor::verify::tests::describe_artifact_failure_names_path_and_remedy |
Without the fix (the CLI change reverted), the CLI test fails:
left: String("artifact verification failed: Corrupt { reason: \"vendor_sha256_mismatch\" }")
right: "committed artifact .socket/vendor/npm/<uuid>/left-pad-1.3.0.tgz does not match the sha256 in the vendor ledger (vendor_sha256_mismatch); run `socket-patch repair` to restore it, then commit it"
With the fix, it passes. Commands run locally:
cargo fmt --all -- --check: cleancargo clippy --workspace --all-features -- -D warnings: cleancargo test -p socket-patch-core --all-features --lib -- vendor::: everything passes except two chmod-based write-failure tests (pypi_poetry::wire_write_failure_*, pypi_requirements::wire_failure_rolls_back_*). Those tests can't make a write fail when run as root, which is how this sandbox runs. They are unrelated to this change, and CI runs as a non-root user.cargo test --workspace --all-features: this sandbox's disk allowance cannot hold every test binary (it fails with ENOSPC while linking), so I ran the suites this change touches instead. in_process_vendor: 133/133 pass. repair: 126 pass; the 2 failures are chmod-based tests (*_unremovable, repair_cleanup_failure_*). covgap_commands_vendor: 54 pass; the 3 failures are chmod-based *_state_write_failure_* tests. A root user ignores those permissions, which is why they fail here. CI runs the full workspace.Two findings on c8c77bf. Both were real, both are fixed in c8cec59, and
both threads are answered and resolved: repair advice where repair would
refuse, and the wrong cause given for vendor_workspace_artifact_invalid.
/code-review high)Fixed: the "intact" claim without a recorded sha256, the one-size remedy
for unverifiable entries, the StaleUuid wording, the JVM marker case, the
duplicated workspace-copy check, and the test doc.
Not fixed:
failing_mirror re-reads the mirrors to find the path, which costs I/Ovendor --check is a read-only audit. Carrying the path inArtifactHealth::Corrupt would change a public enum that about tenGenerated 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
When a committed vendored artifact was missing or changed, vendor
--check printed the Rust Debug form of an internal state, such as
`Corrupt { reason: "vendor_workspace_artifact_missing" }`, with no
path and no next step. CI logs gave users nothing to act on.
The reason now says what is wrong, names the committed file (for a
Bun bun.lockb workspace, the member copy that is off, and that the
root artifact is intact), and gives the fix that matches what repair
does: `socket-patch repair` then commit, `socket-patch vendor` for a
pending re-vendor, fix state.json for an entry that can't be
verified, or upgrade for an unknown npm flavor. The stable tag stays
in parentheses so logs remain searchable.
Fixes #1467
Assisted-by: Claude Code:claude-opus-5-5
Follow-up from review of the new vendor --check wording: - Only call the root artifact intact for a Bun member-copy failure when the ledger records its sha256; without one it was never checked. - An entry that can't be verified no longer always blames state.json: an unreadable bun.lockb says so, and other cases point at the ledger, the manifest or a re-vendor, and say repair won't rebuild. - A pending re-vendor says the ledger and manifest disagree. - A JVM entry also counts as missing when only its tree marker is gone, so the message names both. - vendor --check and repair now share one check for a Bun member copy failure. Assisted-by: Claude Code:claude-opus-5-5
|
BugBot review 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 a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Stale Bugbot comment from a previous run.
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.
vendor --check told users to run `socket-patch repair` for any missing or damaged artifact. When the ledger records no archive SHA-256 (file artifacts) or no file inventory (directory artifacts), repair has nothing to verify a download against and refuses, so that advice left the check red. The message now gives repair's own refusal and its remedy instead. When a Bun workspace's copies can't be listed, the message used to guess at an unreadable bun.lockb. It now carries the real cause (unreadable lock, unsafe path, symlinked member copy, ...). restore() and vendor --check share one check for when repair refuses. Assisted-by: Claude Code:claude-opus-5-5
|
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 c8cec59. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Labeled Ready for review by the burn-down agent.
Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Final review briefWhat it does: Risk: low. Only the text of failure messages changes; pass/fail decisions and exit codes don't. The one refactor on a live path ( Look here:
Verified:
Changes I made: none. Auto-merge is armed, so approving sends this straight to the merge queue. 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 reports a missing or corrupt vendored artifact as a raw Rust Debug value (Corrupt { reason: "vendor_workspace_artifact_missing" }) with no remedy, though socket-patch repair fixes it
There was an error while loading. Please reload this page.