cli-sdk: vlt build sets, saves and prompts for allow-scripts by ruy-bot[bot] · Pull Request #2034 · vltpkg/vltpkg · GitHub
Skip to content

cli-sdk: vlt build sets, saves and prompts for allow-scripts - #2034

Open
ruy-bot[bot] wants to merge 3 commits into
mainfrom
ruyadorno/build-allow
Open

ruy-bot[bot] wants to merge 3 commits into
mainfrom
ruyadorno/build-allow

Conversation

@ruy-bot

@ruy-bot ruy-bot Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

vlt build ignored allow-scripts and saved nothing: a project needed command.build.target for builds plus allow-scripts for installs. Now vlt build [<query>] sets, saves and applies allow-scripts, prompting like vlt skills link; install/update save --allow-scripts.

Fixes #2031

Changes

  • shared allow query helpers (stored/save/saved/kept lines, pickQuery, editor) keyed by allow-skills | allow-scripts; vlt skills output unchanged
  • vlt build [<query>]: query = positional, --allow-scripts or VLT_ALLOW_SCRIPTS; issue's prompt table; default :scripts:not(:built):not(:malware); saved after a successful build to project vlt.json (--config=user → user one)
  • no query, nothing stored, no TTY, no -y: default built, not saved
  • --target / command.build.target: wins, built as is, never prompts or saves
  • editor: no-unbuild warning; with nothing stored, warns the answer is saved and installs run its scripts
  • output: human Saved allow-scripts="<q>" to vlt.json; json query, saved
  • vlt install / vlt update: explicit --allow-scripts validated before installing, saved after success; another stored query kept w/ hint; ci and --lockfile-only never save
  • docs: build (table + walkthrough), install, ci, configuring, security, migration pages

Tests

  • build: every table row, equal query, query stored in user file, --config=user, invalid query, failed build, --target precedence, env/flag as given
  • install/update: saved, same, kept, :not(*), failed, lockfile-only, invalid
  • pickQuery: every branch, both keys; skills command tests unchanged (editor calls gain key)

Follow-ups

  • TTY, nothing stored: Enter on the prefilled default saves :scripts:not(:built):not(:malware), so later installs run scripts of every unflagged pkg. Now warned; skip saving an unchanged default instead?
  • legacy command.build.target in vlt.json silently wins over vlt build "<q>": <q> neither built nor saved. Warn?
  • positional and --allow-scripts/env both given: positional wins; confirm
  • N/ctrl+C on Replace it?, or empty editor: nothing built
  • install/update always save to project vlt.json (no --config=user), as --allow-skills
  • stored allow-scripts not validated by vlt build (build errors on it, as today)
  • command.<cmd>.allow-scripts blocks not treated as stored
  • exec/create/init/uninstall --allow-scripts never saved
  • prompts write to stdout even with --view=json (shared w/ vlt skills link)
  • install reporter's "Run vlt build" hint could mention saving

Co-authored-by: Ruy Adorno ruy@vlt.sh

ruy-bot Bot and others added 2 commits October 20, 2026 05:07
## Changes
- move stored/save/saved/kept helpers into `allow-query.ts` and
  `pickQuery` into `allow-prompt.ts`, keyed by `allow-skills` |
  `allow-scripts`
- `editQuery` takes the key; per-key warning text
- `vlt skills link`, install, update use them; output unchanged

## Tests
- both keys; every `pickQuery` branch

Co-authored-by: Ruy Adorno <ruy@vlt.sh>
## Changes
- `vlt build [<query>]` builds and saves `allow-scripts` (positional,
  `--allow-scripts` or `VLT_ALLOW_SCRIPTS`); asks before replacing or
  editing a stored one, `-y` skips; `--config=user` saves to the user
  vlt.json
- no query: stored `allow-scripts`, else
  `:scripts:not(:built):not(:malware)`; nothing stored, no TTY, no `-y`:
  built, not saved
- `--target` / `command.build.target`: built as is, no prompt, never
  saved
- saved only after a successful build; human/json output show it
- docs: build page table + walkthrough, ci, configuring, migration

## Tests
- every prompt table row, `--target`, env/flag query, failed build

Co-authored-by: Ruy Adorno <ruy@vlt.sh>
@vercel

vercel Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d868965c-c5ad-4289-9bd3-0ce3589095bf

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

🐰 Bencher Report

Projectvltpkg
Branchruyadorno/build-allow
Testbedubuntu-latest
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
milliseconds (ms)
(Result Δ%)
Upper Boundary
milliseconds (ms)
(Limit %)
vlt install: vue & cache-lockfile📈 view plot
🚷 view threshold
807.19 ms
(+9.26%)Baseline: 738.78 ms
923.47 ms
(87.41%)
vlt install: vue & cache-lockfile-node-modules📈 view plot
🚷 view threshold
370.51 ms
(+8.44%)Baseline: 341.69 ms
427.11 ms
(86.75%)
vlt install: vue & clean📈 view plot
🚷 view threshold
7,049.59 ms
(-42.62%)Baseline: 12,285.78 ms
15,357.22 ms
(45.90%)
vlt install: vue & lockfile📈 view plot
🚷 view threshold
2,575.52 ms
(-46.03%)Baseline: 4,771.86 ms
5,964.82 ms
(43.18%)
🐰 View full continuous benchmarking report in Bencher

## Changes
- `vlt install` / `vlt update` save an explicit `--allow-scripts` (or
  `VLT_ALLOW_SCRIPTS`) to the project vlt.json after success; another
  stored query is kept with a hint; `--lockfile-only` saves nothing
- explicit query validated before installing
- reporter + json show saved/kept allow-scripts
- docs: install, configuring, build, migration from npm

## Tests
- saved, same, kept, `:not(*)`, failed, lockfile-only, invalid query

Co-authored-by: Ruy Adorno <ruy@vlt.sh>

This branch was successfully deployed

1 active deployment
Preview — 26e68a66 Deployed Oct 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] vlt build: save allow-scripts to vlt.json and prompt for it like vlt skills link

1 participant