Skip to content

feat(server): ad-hoc --vars, --load, --reload and load runs gated by run.vars and run.load - #1484

Merged
chio-labs-delivery[bot] merged 5 commits into
mainfrom
feat/adhoc-vars-load
Nov 14, 2026
Merged

chio-labs-delivery[bot] merged 5 commits into
mainfrom
feat/adhoc-vars-load

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Why

Ad-hoc runs on the server refused --vars, --load, --reload and sqb load, so loading a managed source or building with different variables meant using the CLI outside the server. Both change what reaches the warehouse, so each needs its own permission rather than riding on run.adhoc.

Changes

  • The ad-hoc planner accepts --vars (a JSON object; {} is ignored), --load, --reload and the load verb. load selects managed sources and runs as a build with loaders on and tests and audits off.
  • Two new actions: run.vars for a run with variables, and run.load over the loaded sources for load, --load and --reload. Only Admin grants them among built-in roles. A plain build still loads the managed sources it reads under run.adhoc. A plan preview with --vars also needs run.vars, because the location compiles with the variables.
  • A worker running an ad-hoc run with variables compiles the verified project again with them and records each node's compiled hash on the run (run_compiled) before any statement runs.
  • UI: the plan page offers the load verb and the new options with descriptions, and the role pages and mock data list both actions.
  • Docs: the server page covers the load verb, the new gates and how variables are compiled.

Verification

  • Planner, permission and plan-preview tests in sqlbuild-cli and sqlbuild-orchestration (SQLite and PostgreSQL).
  • Integration tests in test_adhoc.py launch real workers: a Developer is refused load, --reload and --vars; a Developer's plain build still loads; an Admin's load runs only the selected loader; an Admin's --vars build writes the variable's value and records a compiled hash that differs from the published one.
  • UI: svelte-check, 245 unit tests, the command-table check, and screenshots of the plan page (load verb, option menu, a Developer refused --load) and role pages.
  • make check-ci.

@kvlonge kvlonge added the full-verify Run the full Verify matrix on this pull request label Nov 14, 2026
@chio-labs-delivery
chio-labs-delivery Bot added this pull request to the merge queue Nov 14, 2026
Merged via the queue into main with commit b286141 Nov 14, 2026
50 of 75 checks passed
@chio-labs-delivery
chio-labs-delivery Bot deleted the feat/adhoc-vars-load branch November 14, 2026 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full-verify Run the full Verify matrix on this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant