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 — Hosted and vendored modes refuse vlt 1.3 locks whose nodes carry the new brotli flag (slot [0] = 4) · Issue #372 · SocketDev/socket-patch Closed Labels agent:triagedbugSomething isn't workingSomething isn't workingbughuntFound by a scheduled package-manager bug-hunt agentFound by a scheduled package-manager bug-hunt agentpm:vltvltvltpriority:p1 Description[agent] Found by the scheduled vlt bug-hunt routine (ledger #307). Summaryvlt 1.3.0 added socket-patch's strict node-line grammar only accepts slot [0] ∈ {0,1,2,3} (
ImpactA vlt ≥ 1.3.0 user on a registry that serves Brotli tarballs can't use hosted or vendored mode at all. The refusal is loud in Repro (Linux, vlt 1.3.2, Node 22.22.2, main
|
| slot [0] kept as | vlt ci installs |
lock after vlt ci |
|---|---|---|
4 |
patched | rewritten: vlt recomputes brotli from the URL and saves [0,…] |
0 (bit 4 cleared) |
patched | byte-identical; vlt install --frozen-lockfile is byte-stable too |
So the hosted rewrite should clear bit 4 when it points a node at the .tgz artifact, and the slot revert should restore it. Also, vlt_heal::reinstalls_after_removal (patch/redirect/vlt_heal.rs:199, matches!(flags, Some(0 | 2))) treats a prod or dev brotli node (4, 6) like an optional one and keeps the stale copy. It probably wants flags & 1 == 0 once bit 4 is known. VEX discovery goes through the same line parser (vex/discover), so it likely skips these nodes as well.
| OS | vlt | brotli alternates advertised | hosted | vendored | agent |
|---|---|---|---|---|---|
| Linux | 1.2.0 | yes (ignored, flag 0) | pass | untested | untested |
| Linux | 1.3.1 | yes | fail (refused) | fail | untested |
| Linux | 1.3.2 | yes | fail (refused) | fail | pass |
| Linux | 1.3.2 | no (control) | pass | untested | untested |
| macOS / Windows | 1.3.x | yes | untested (pure text-parser path, expected identical) | untested | untested |
vlt 1.3.0 itself fails vlt install with "Integrity check failure" against a registry advertising alternates (a vlt bug, fixed in 1.3.1), so 1.3.0 locks with bit 4 are unlikely in practice.
First bad: vlt 1.3.0 (first release with LockfileNodeFlagBrotli). Release 4.0.0 of socket-patch predates vlt hosted support (it reports redirect_npm_no_lockfile), so this isn't a socket-patch regression.
Suspect code: crates/socket-patch-core/src/vendor/vlt_lock_text.rs:673 (the "0" | "1" | "2" | "3" whitelist), crates/socket-patch-core/src/patch/redirect/vlt.rs:93-103, crates/socket-patch-core/src/patch/redirect/vlt_heal.rs:199.
[agent] Triaged: priority:p1 (vlt, npm family). Not a duplicate, and I found no existing fix PR.
The cause is the vlt node-line grammar in vendor/vlt_lock_text.rs, which only whitelists flag values 0–3. Hosted redirect, vendored, vlt_heal and VEX discovery all share that parser, so one fix at the parser has to cover all of them. It also needs to clear and restore bit 4 when pointing a node at a .tgz.
Generated by Claude Code
[agent] Re-triage: still reproduces on main 2463257 (after the v5 consolidation in #277). Linux, vlt 1.3.2, same mock as the original report, with dist.alternates tar.br advertised (node line [4,"left-pad",…,".tar.br"]):
socket-patch scan --yes --json: rc 0, redirected: 0, redirect_vlt_lock_unsupported "nodes section is not in vlt's canonical layout; re-save it with a current vlt (vlt install) or update socket-patch".socket-patch scan --mode vendored --yes --json: rc 1, partial_failure, per-patch vendor_lockfile_version_unsupported.In v5, a plain scan defaults to hosted mode, so this is now what a vlt ≥ 1.3 user on such a registry gets without passing any flags. The whitelist at crates/socket-patch-core/src/vendor/vlt_lock_text.rs:673 hasn't changed. The new v5 upstream restore (patch/redirect/upstream/vlt.rs) also goes through parse_node_line, so rollback/remove will need the same fix (and will need to put bit 4 back if the hosted rewrite clears it).
Generated by Claude Code
[agent] Re-triage on main 2463257: still reproduces on vlt 1.3.3 (published 2026-10-01T02:36Z, now latest). Against a registry that advertises tar.br alternates, vlt install still writes slot [0] = 4 ({'[email protected]': [4]}), and a bare scan exits 0 with redirected: 0 and redirect_vlt_lock_unsupported. That's 2/2 runs on Linux. So the brotli flag isn't specific to 1.3.1 / 1.3.2: every vlt 1.3.x from 1.3.1 on is affected.
Generated by Claude Code
[agent] This still reproduces on the two vlt releases published since the last check: 1.3.4 (2026-10-01) and 1.3.5 (2026-10-02). It's main 61cfb9b, Linux. Against a registry that advertises tar.br alternates, vlt 1.3.5 still writes [4,"left-pad",…,".../left-pad-1.3.0.tar.br"]. Hosted scan exits 0 with redirected: 0 and a warning, and vlt ci installs the pristine bytes. Without alternates (flag 0), 1.3.4 and 1.3.5 pass the full hosted / vendored / agent / workspace / CRLF matrix.
Generated by Claude Code
[agent] Re-checked on main b1f9818 (vlt bug-hunt, ledger #307) with vlt 1.3.5, twice, and it still reproduces. Against a registry that advertises tar.br alternates, the lock node is [4,"left-pad",…,".../left-pad-1.3.0.tar.br"]. A hosted scan then exits 0, leaves vlt-lock.json byte-identical, and redirects nothing.
Generated by Claude Code
[agent] Claiming this issue (shared root cause: the vlt node-line grammar whitelists slot [0] flags 0–3 and has no model of vlt 1.3's brotli bit 4). Branch: agent/fix-vlt-brotli-node-flag. Claim-ID: 2026-10-05T02:20:28Z-2dad7c
Generated by Claude Code
[agent] Verified fixed on main 9c43dfc (after #820), Linux, vlt 1.3.6 and 1.3.7, against the original mock (a registry that advertises tar.br alternates, node [4,…,".tar.br"], and a dev node [6,…]):
scan: rc 0, redirected 1, the node becomes [0,…,patched .tgz] (dev: [2,…]). A cold vlt ci and a warm vlt install install patched, --frozen-lockfile keeps the lock, vex rc 0, and a re-scan is a no-op.file~.socket+vendor… node, ci / frozen patched, vex rc 0, and rollback is byte-exact.wrapper + brotli left-pad): the wrapper line is untouched.One gap remains on the restore side: hosted rollback / remove / the hosted→vendored takeover write the gzip form back (flag 0, .tgz integrity and URL) instead of the original brotli node. I filed that as #941.
Generated by Claude Code
vlt bug-hunt run 13: verify #372, file #941 and #942, cover vlt 1.3.7