Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Local Validation

Moltis provides a local validation script that runs the same checks as CI (format, lint, test, e2e), plus a native macOS app build check on macOS hosts.

Why this exists

  • Faster feedback for Rust-heavy branches (no long runner queues for every push)
  • Better parity with a developer’s local environment while iterating
  • Clear visibility in the PR UI (fmt, biome, zizmor, clippy, test, macos-app, e2e)

Run local validation

Run all checks on your current checkout:

./scripts/local-validate.sh

When working on a pull request, pass the PR number to also publish commit statuses to GitHub:

./scripts/local-validate.sh 63

The script runs these checks:

  • local/fmt
  • local/biome
  • local/zizmor
  • local/lockfile — verifies Cargo.lock is in sync (cargo fetch --locked)
  • local/lint
  • local/test
  • local/macos-app — validates the native Swift macOS app build (Darwin only)
  • local/e2e — runs gateway UI Playwright coverage

In PR mode, the PR workflow verifies these contexts and surfaces them as checks in the PR.

Notes

  • The script requires a clean working tree (no uncommitted or untracked changes). Commit or stash local changes before running.
  • On macOS without CUDA (nvcc), the script automatically falls back to non-CUDA test/coverage defaults for local runs.
  • On Linux, local/lint and local/test use --all-features. If you want the opt-in Vulkan path covered locally, install the Vulkan development packages first, for example libvulkan-dev and glslang-tools on Debian/Ubuntu (on Ubuntu 22.04, install glslc from the LunarG Vulkan SDK).
  • local/lint uses the same clippy flags as CI and release: cargo +nightly-2025-11-30 clippy -Z unstable-options --workspace --all-features --all-targets --timings -- -D warnings.
  • zizmor is installed automatically (Homebrew on macOS, apt on Linux) when not already available.
  • zizmor is advisory in local runs and does not block lint/test execution.
  • Test output is suppressed unless tests fail.
  • local/macos-app runs only on macOS; on Linux it is marked skipped.
  • Override or disable macOS app validation with: LOCAL_VALIDATE_MACOS_APP_CMD and LOCAL_VALIDATE_SKIP_MACOS_APP=1.
  • local/e2e auto-runs npm ci only when crates/web/ui/node_modules is missing, then runs npm run e2e:install and npm run e2e. Override with LOCAL_VALIDATE_E2E_CMD.

Merge and release safety

This local-first flow is for pull requests. Full CI still runs on GitHub runners for non-PR events (for example push to main, scheduled runs, and release paths).