Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta Adatta ai principianti
#1,601 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
62/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
cli

Direzione di ricerca

L'indizio fuorviante è il testo di dettaglio redirect_vlt_custom_registry_skipped in crates/socket-patch-core/src/patch/redirect/vlt.rs, intorno alle righe 366-371 in rewrite_dep. Il rifiuto di vendored che lo contraddice si trova in crates/socket-patch-core/src/vendor/vlt_lock.rs:2429. Leggi entrambi e decidi se l'indizio debba nominare solo la modalità agent o indicare che vendored rifiuta questo pacchetto. Il lavoro è completato quando l'avviso non suggerisce più vendored per le istanze con un registry non predefinito, con la formulazione aggiornata dove l'avviso viene costruito.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

agent:triaged bug bughunt pm:vlt priority:p1

[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): the redirect_vlt_custom_registry_skipped detail text.
  • crates/socket-patch-core/src/vendor/vlt_lock.rs:2429: the vendored refusal that the hint contradicts.
Lingua principale
Rust
Stelle
8
Fork
1
Merge medio
16h 19m
PR unite (30g)
586

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di SocketDev/socket-patch

Tutte le issue di SocketDev/socket-patch

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.