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 — Require server artifacts and exact redownload for vendoring by mikolalysenko · Pull Request #300 · SocketDev/socket-patch Conversation
|
|
Claude (@claude) review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
BugBot review |
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.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
Bugbot Autofix prepared a fix for the issue found in the latest run.
Or push these changes by commenting:
@cursor push cf4d89f6e2
diff --git a/crates/socket-patch-core/src/vendor/composer_lock.rs b/crates/socket-patch-core/src/vendor/composer_lock.rs --- a/crates/socket-patch-core/src/vendor/composer_lock.rs +++ b/crates/socket-patch-core/src/vendor/composer_lock.rs @@ -435,7 +435,16 @@ let marker = VendorMarker::new("composer", &base_purl, record, vendored_at); write_marker_or_warn(&uuid_dir, &marker, &mut warnings).await; - let entry = VendorEntry { + let file_inventory = match super::verify::compute_dir_inventory(©_dir).await { + Ok(inventory) => inventory, + Err(error) => { + let _ = remove_tree(&uuid_dir).await; + prune_empty_vendor_dirs(©_dir).await; + return refused("vendor_inventory_unavailable", error); + } + }; + + let mut entry = VendorEntry { ecosystem: "composer".to_string(), base_purl, uuid: record.uuid.clone(), @@ -466,6 +475,7 @@ pdm: None, pipenv: None, }; + entry.artifact.file_inventory = Some(file_inventory); done(result, Some(entry), warnings) }
You can send follow-ups to the cloud agent here.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 50af61b. Configure here.
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.
Exercise served artifacts across the package-manager fixtures while preserving cold-cache offline install and revert coverage. Repair keeps Bun lockfiles and artifact identities unchanged. Record complete Composer inventories after filter normalization, and use the shared service policy for archive and Go redownload failures. Assisted-by: Codex:gpt-6-astra
Check that restoring modified filter files preserves the complete artifact inventory, lockfile, and ledger without in-place healing. Assisted-by: Codex:gpt-6-astra
Composer vendors now compute and persist file_inventory at vendor time, matching the behavior of Cargo, Go, gem, and vlt. This enables directory repair and same-UUID vendor restore for Composer packages, preventing redownload::restore from failing on missing inventory data. Co-authored-by: Cursor Agent <[email protected]>
40957fb
into
release/v5-prerelease
There was an error while loading. Please reload this page.
The #300 squash kept both Composer file-inventory fixes: one before the lock rewrite and one after the marker write. The second rebound an already-moved value, so socket-patch-core failed to compile and every Rust CI job went red. Keep the pre-rewrite inventory. It runs after filter normalization, and a failure there refuses before composer.lock is touched. The marker lives in the uuid dir, outside the inventoried copy, so the result is the same. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01F3KCWT9B1MUVPrgerxxGpK Assisted-by: Claude Code:claude-opus-5-5
#300 made the ledger-less vendored `scan --vex` cell expect a `vendor_ledger_entry_missing` refusal. yarn < 1.7 installs nothing for a vendored `file:` entry, so that scan finds no package to vendor and attests from the lockfile instead, failing the yarn-classic 1.0.2 and 1.6.0 legs. Gate the expectation on installs_file_tarballs and pin the older releases' shape (zero scanned packages, attested). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NEUik3Qo9HQtYGVEAMs1Di
#300 added .zip to artifact_is_file_shaped for pypi sdists. A vlt package dir path ends in the npm package name, so a package such as lodash.zip stopped being recognized as a vlt dir: its health check took the generic dir branch, which refuses the dependency links under its node_modules, and restore took the file branch and refused for want of an archive SHA-256. is_vlt_dir_entry now also accepts a path in the vendored vlt dir layout (<name>-<version>/node_modules/<name>), whatever its suffix. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NEUik3Qo9HQtYGVEAMs1Di
Ledgers written before #300 record no file inventory for cargo, Go and composer copies, and a copy past the inventory cap records none either. Exact restore refuses such an entry, and vendor sent every same-uuid entry that was not healthy to that same restore, so the re-vendor the error suggested failed with vendor_redownload_failed on every run. A dir-shaped entry without an inventory now skips the exact restore and goes to the backend, which rebuilds the copy from a fresh verified download as vendor did before #300. The file-shaped entry without a SHA-256 still refuses. Both restore refusals now name the remedy that records a new fingerprint: vendor --revert and then vendor. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NEUik3Qo9HQtYGVEAMs1Di
#300 sent every same-uuid ledger entry that was not healthy to exact redownload before the backend ran. That includes a bun.lockb workspace whose member-relative mirror tarball is missing or stale while the canonical tarball still matches its ledger SHA-256. Offline, the redownload failed with vendor_redownload_failed and skipped the backend, which would have rewritten the mirror from the committed tarball; online it downloaded an artifact the project already held. A workspace mirror issue over a canonical tarball with a recorded SHA-256 now goes straight to the backend, as repair also handles it locally. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NEUik3Qo9HQtYGVEAMs1Di
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.