Repository navigation
Stop downloading vlt artifacts during hosted scans - #2013
Mikola Lysenko (mikolalysenko) wants to merge 1 commit into
Conversation
A hosted scan of a vlt project downloaded every granted patch archive the way vlt fetches it, and withheld the dependency (`redirect_vlt_artifact_unverifiable`) when the server re-gzipped it. That guarded against patch.socket.dev's CDN re-encoding archives, which vlt rejects with EINTEGRITY. The patch server has sent archives with `Cache-Control: no-transform` since depscan #26856 and #26867, and production serves them unencoded today. On any mirror that still re-encodes, `vlt ci` fails closed with EINTEGRITY, so nothing installs unpatched bytes. So the scan no longer fetches the archives. It pins vlt dependencies directly, without a full download of every patched package per run. The in-memory hosted engine (the Node addon and `hosted-bundle`) has no network, so it used to withhold every vlt dependency as "offline"; it now pins them the way the disk flow does. The warm-tree heal now checks the Socket-owned lock instances this run confirmed in `vlt-lock.json`. With no patch record and no hidden lock it reports the copy as undeterminable (asking for `vlt ci`) instead of comparing it against downloaded archive bytes. The vlt backtest still probes the live artifact itself: a must-patch hosted cell records `blocked-by-server-encoding` when its probe sees a content-encoded response, without running the CLI. Assisted-by: Claude Code:claude-opus-5-5
|
Labeled Ready for review by the burn-down agent.
Generated by Claude Code |
Final review briefWhat it does. Hosted scans no longer download each vlt artifact before pinning it. That download was a scan-time check for CDN re-encoding, and this PR deletes it along with the Risk: medium. The rewriter edits are mechanical, but a fail-closed gate at scan time is gone. If a mirror re-encodes archives, users now find out as Look here
Verified
Changes I made. None. Open questions (non-blocking)
Auto-merge is armed, so approving sends this straight to the merge queue. #2015 and #2021 are stacked on this PR. Generated by Claude Code |
LLM Description written by Claude Code:claude-opus-5-5
Summary
A hosted scan of a vlt project no longer downloads every granted patch archive just to hash it. That probe guarded against the patch server's CDN re-gzipping archives, which vlt rejects with
EINTEGRITYbecause it hashes the raw response. The server side of that is fixed: depscan #26856 and #26867 sendCache-Control: no-transformon every archive response and 304, and production serves archives unencoded today. On a third-party mirror that still re-encodes,vlt cifails closed withEINTEGRITY, so nothing installs unpatched bytes.This is PR 1 of a stack that moves vendored and hosted logic back into core and drops
/patches/viewfrom hosted scans.User-visible changes
redirect_vlt_artifact_unverifiablewarning and skip reason no longer exist (contract, docs andvlt-coverage.jsonupdated).hosted-bundle) used to judge every vlt dependency "offline" and withhold it, because it has no network. It now pins vlt dependencies the way the disk flow does.vlt ci, instead of comparing it against downloaded archive bytes; that advisory's wording changed.scripts/backtest-vlt.pystill probes the live artifact itself and recordsblocked-by-server-encodingfor a cell whose probe sees an encoded response, without running the CLI.Changes
core/patch/redirect/vlt_preflight.rs(probe,ArtifactProbe,VLT_ACCEPT_ENCODING, scope planning).core/hosted/vlt.rskeeps onlyinstall_state_presentandbun_lockb_present. Thewithheld_everywhereandwithheld_from_vltplumbing is gone fromhosted/engine.rsandhosted/memory/stages.rs.rewrite_registry_redirect_withholding_vltis renamed torewrite_registry_redirect_with_host, and helpers that only the probe used are removed.scan/hosted.rsandvlt_heal.rsdropartifact_preflightand the heal's artifact-bytes fallback.Validation
All of these ran locally:
cargo fmt --checkcargo clippy --workspace --all-features -- -D warnings--lib--lib --binsin_process_redirectscane2e_vex_lockfilehosted_memory_enginea_vlt_project_is_pinnedreplaces the withholding test)in_process_vendor_bun_takeoverin_process_rollback_hostedin_process_get_modesin_process_get_hosted_ecosystemse2e_hosted_productione2e_vendored_productione2e_redirect_vlt_buildscripts/testsNot run locally: the ignored cases that need a real vlt toolchain or the live service, including the rewritten heal test and the production install proof (its "encoded" branch is removed). A manual probe against production served identity with
no-transformand a matching sha512.vlt-serve-watchdog.ymlstayscontinue-on-error.🤖 Generated with Claude Code
Note
Medium Risk
Changes hosted vlt behavior and removes a safety gate that refused pins when artifacts were content-encoded; misconfigured CDNs would surface as install-time EINTEGRITY instead of scan-time refusal.
Overview
Hosted vlt pinning no longer runs an artifact preflight that downloaded each granted tarball (vlt-style
Accept-Encoding, sha512 check) before rewritingvlt-lock.json. The scan pins hosted URLs without any artifact GETs; verification is deferred tovlt ci/ install, relying on the patch server serving unencoded archives viaCache-Control: no-transform.The
redirect_vlt_artifact_unverifiablewarning/skip path andsocket-patch-corevlt_preflightare removed, along withwithhold_everywhere/withheld_from_vltplumbing in the hosted engine and in-memory addon (which previously treated every vlt dep as offline). Warm-tree heal keys off confirmed vlt uuids instead of preflight-downloaded bytes; missing records now yield an undeterminable reinstall advisory rather than byte comparison.Docs, CLI_CONTRACT, CI comments, production e2e, and tests drop encoding-refusal branches and assert zero artifact hits on hosted scan/get; backtest still records
blocked-by-server-encodingat the probe layer when needed.Reviewed by Cursor Bugbot for commit e9d8e31. Configure here.
Generated by Claude Code