Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン 初心者向け
#1,601 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
62/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
rust
領域
cli

調査の方向性

誤解を招くヒントは、crates/socket-patch-core/src/patch/redirect/vlt.rs の366〜371行目付近にある rewrite_dep 内の詳細テキスト redirect_vlt_custom_registry_skipped です。これと矛盾する vendored の拒否は crates/socket-patch-core/src/vendor/vlt_lock.rs:2429 にあります。両方を読み、ヒントにはagentモードのみを挙げるべきか、vendored がこのパッケージを拒否することを明記すべきかを決めてください。デフォルト以外のレジストリを持つインスタンスに対して警告が vendored を示唆しなくなり、警告を生成している箇所で文言が更新されていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.
主要言語
Rust
スター
8
フォーク
1
平均マージ
16時間 18分
マージ済み PR(30日)
587

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

SocketDev/socket-patch のほかの issue

SocketDev/socket-patch の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。