Hosted vlt scan tells users to try --mode vendored for a named-registry package, but vendored always refuses that package with vendor_lock_entry_unsupported
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 62/100
Research direction
The misleading hint is the redirect_vlt_custom_registry_skipped detail text in crates/socket-patch-core/src/patch/redirect/vlt.rs, around lines 366-371 in rewrite_dep. The vendored refusal that contradicts it is at crates/socket-patch-core/src/vendor/vlt_lock.rs:2429. Read both, then decide whether the hint should name only agent mode or state that vendored refuses this package. Done means the warning no longer suggests vendored for non-default-registry instances, with the wording updated where the warning is built.
Written by the indexing model from the issue text.
Description
[agent] Found by the scheduled vlt bug-hunt routine (ledger #307).
Summary
A vlt project can install a dependency from a named registry ("left-pad": "acme:[email protected]" with vlt.json registries.acme, DepID [email protected]). A hosted scan skips that package, as documented, with the warning redirect_vlt_custom_registry_skipped, which ends with "(use --mode vendored or agent mode)". Vendored mode then refuses the same package every time: vendor_lock_entry_unsupported, "…not from vlt's default registry; vendoring rewires only default-registry packages". The run exits 1 with partialFailure. Only agent mode works. In my runs it patched the copy and rolled it back cleanly.
Impact
Low severity, but the run sends the user down the wrong path. The remediation hint names a mode that can't succeed. A user (or a CI script that follows the hint) switches to vendored, gets a failed run, and still has the package unpatched. Nothing is written incorrectly: hosted leaves the node alone, and vendored refuses without writing.
Repro (vlt 1.4.0 or 1.3.8, main 657fce2; the string is identical in release 5.0.1)
Use the mock registry / patch API attached to #1494, started three times: PORT=18555, PORT=18556 (patch API) and PORT=18557 (the "acme" registry). Use the env from #1494.
mkdir proj && cd proj
echo '{"name":"root","version":"1.0.0","dependencies":{"left-pad":"acme:[email protected]","right-pad":"1.3.0"}}' > package.json
echo '{"config":{"registries":{"npm":"http://127.0.0.1:18555/","acme":"http://127.0.0.1:18557/"}}}' > vlt.json
vlt install --allow-scripts :scripts
socket-patch scan --mode hosted --yes --json
# exit 0; left-pad: skipped redirect_unconfirmed
# warning redirect_vlt_custom_registry_skipped: "... [email protected] left unchanged (use --mode vendored or agent mode)"
socket-patch rollback --yes
socket-patch scan --mode vendored --yes --json
# exit 1, partialFailure; left-pad: failed vendor_lock_entry_unsupported
# "vlt-lock.json resolves [email protected] as [email protected], which is not from vlt's default registry; vendoring rewires only default-registry packages"
Agent mode control: scan --mode agent exits 0 and require('left-pad') prints patched; rollback restores pristine.
Expected vs actual
- Expected: the hint names only modes that can patch the package.
docs/ecosystems.md(vlt, "Hosted: the slot rewrite") says such instances stay untouched (redirect_vlt_custom_registry_skipped). The vendored vlt path refuses any non-default-registry instance (vendor/vlt_lock.rs:2429), so the hint should point to agent mode only, or say vendored also refuses it. - Actual: "use --mode vendored or agent mode".
OS × version
| OS | vlt | hosted hint | vendored | agent |
|---|---|---|---|---|
| Linux | 1.4.0 | names vendored (2/2) | refused (2/2) | pass |
| Linux | 1.3.8 | names vendored | refused | (not run) |
macOS / Windows: not probed. The message is platform-independent.
The code is the same in release 5.0.1, so this isn't a regression in the current release line. I didn't bisect further.
Suspect code
crates/socket-patch-core/src/patch/redirect/vlt.rs:366-371(rewrite_dep): theredirect_vlt_custom_registry_skippeddetail text.crates/socket-patch-core/src/vendor/vlt_lock.rs:2429: the vendored refusal that the hint contradicts.
- Dominant language
- Rust
- Stars
- 8
- Forks
- 1
- Avg merge
- 16h 39m
- Merged PRs (30d)
- 584
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from SocketDev/socket-patch
-
agent:triaged bug bughunt pm:pipenv priority:p1
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
SocketDev/socket-patch#1608 · 1 comment ·
Maintainers usually reply within 1 day
-
agent:triaged bug bughunt pm:npm priority:p3 ux
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
SocketDev/socket-patch#1072 · 2 comments ·
Maintainers usually reply within 1 day
-
agent:triaged bug bughunt pm:yarn-berry priority:p1
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
SocketDev/socket-patch#783 · 1 comment ·
Maintainers usually reply within 1 day
-
Vendored scan exits 0 when .gitignore covers `.socket/vendor/state.json`, so the commit silently drops the ledger and every other checkout's `rollback` fails with vendor_ledger_missingPossibly taken A pull request linked to this issue is open or already merged. Openbug bughunt pm:pnpm
Difficulty 3/5 1-2 days Newbie friendliness 76/100
SocketDev/socket-patch#1638 · 1 comment ·
Maintainers usually reply within 1 day
-
Hosted and vendored rewrites replace poetry.lock with a file owned by the user running socket-patch, so after a root scan (e.g. a Docker bind mount) the lock's owner gets "Permission denied" from `poetry add` / `poetry lock`Possibly taken @mikolalysenko claimed this 3 days ago. Openagent:claimed agent:triaged bug bughunt pm:poetry priority:p1
Difficulty 3/5 1-2 days Newbie friendliness 32/100
SocketDev/socket-patch#1635 · 3 comments ·
Maintainers usually reply within 1 day
All issues in SocketDev/socket-patch
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
metasequoiaime/msime#9113 ·
Maintainers usually reply within 1 day
-
area:desktop priority:p2 type:chore
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
area: supply-chain
Difficulty 1/5 Under an hour Newbie friendliness 73/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
-
Refresh stale docsOpen
Difficulty 1/5 1-3 hours Newbie friendliness 67/100
OpenCarControls/firmware#35 ·