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

Testing and Quality Gates

Status: Current Last modified: 2026-06-01 01:05 PDT

This page describes the current relationship between local verification and CI. The local canonical gate is bazel build //... && bazel test //.... CI is a collection of scoped bazel-*.yml workflows that mirror parts of that gate on the paths each workflow watches, plus a nightly that runs the whole thing.

See Testing for the canonical local gate definitions.

Local pre-merge contract

bazel build //... && bazel test //... is the maintainer-facing local contract. Run it before pushing any change that touches Rust, Python, grammar, specs, or the book. The pre-push hook (scripts/pre-push.sh, installed via ln -sf ../../scripts/pre-push.sh .git/hooks/pre-push) runs the fast subset (fmt, affected compile, parser guardrail, generated-check, fuzz-check) on every git push.

CI workflow surface

Workflow fileJobsWhen
bazel-rust.ymlbuild-and-test (ubuntu + macos-14)push/PR on Rust paths
bazel-python.ymlbuild-and-test (ubuntu + macos-14)push/PR on Python / engine paths
bazel-grammar.ymlrust-binding, generated-artifacts-freshpush/PR on grammar / symbol paths
bazel-typescript.ymlvscode-extension (ubuntu)push/PR on apps/vscode-extension/**, schemas/**
bazel-docs.ymlbuild-and-linkcheck (ubuntu)push/PR on book/**, bazel/book/**
bazel-tauri-batchalign.ymlsmoke (every PR), bundle (main + dispatch only, macOS arm64 / macOS x86_64 / Linux x86_64)push/PR/dispatch on Batchalign GUI paths
bazel-wheels.ymlbuild (macos-14, macos-13, ubuntu, ubuntu-arm)push/PR on wheel-affecting paths
bazel-build-all.ymlbuild-all (ubuntu + macos-14, full //...)nightly cron 0 6 * * * + manual dispatch
publish-pypi.ymlverify-version, build, publishworkflow_dispatch only

CI is not a byte-for-byte mirror of the local gate sequence. Each workflow runs the Bazel build + test targets relevant to its path filter; the nightly bazel-build-all.yml covers everything that per-path workflows skip.

Gate-to-job mapping

ConcernLocal commandCI job(s) that cover it
Rust workspace compile + testbazel build //crates/... && bazel test //crates/...bazel-rust.yml build-and-test; nightly bazel-build-all.yml build-all
Grammar binding buildsbazel build //grammar:tree_sitter_talkbankbazel-grammar.yml rust-binding
Generated parser.c / grammar.json / node-types.json freshcd grammar && tree-sitter generate && git diff --exit-codebazel-grammar.yml generated-artifacts-fresh
Python wheel + engine cdylib + py_testbazel build //python/batchalign:wheel && bazel test //python/batchalign:pytestbazel-python.yml build-and-test
Wheel platform-matrix smoke (cp310-abi3)bazel run -c opt //python/batchalign:wheelbazel-wheels.yml build
VS Code extension build / test / packagejust vscode build, just vscode test, just vscode packagebazel-typescript.yml vscode-extension
mdBook builds, internal links resolvebazel run //book:html && bazel run //book:linkcheckbazel-docs.yml build-and-linkcheck
Batchalign desktop generated protocol artifacts buildbazel build //apps/batchalign/batchalign-gui:protocol_artifactsbazel-tauri-batchalign.yml smoke
Batchalign desktop bundle builds end-to-endbazel run //apps/batchalign/batchalign-gui/src-tauri:bundle -- --target <triple>bazel-tauri-batchalign.yml bundle (main + dispatch only)
Exhaustive //... build + testbazel build //... && bazel test //...bazel-build-all.yml build-all (nightly)

What’s intentionally not enforced in CI

  • Python lockfile drift (//python:requirements_test). The target exists but is tagged manual because uv 0.5.18 --universal is host-OS-dependent. Contributors regenerate the lockfile via bazel run //python:requirements; CI does not assert no drift. See the comment in bazel-python.yml.
  • Windows builds (any surface). tools/bazel is a bash wrapper incompatible with PowerShell; multitool.lock.json has a uv.exe layout issue. Windows rows are commented out in bazel-tauri-batchalign.yml and bazel-wheels.yml. See Code Signing and Distribution.
  • Code signing / notarization. Nothing is signed today.
  • Chatter desktop GUI bundle. No dedicated workflow; only the nightly bazel-build-all.yml exercises it.

Old job names that no longer exist

For anyone hunting through the git history: rust-check-and-test, spec-tools, chat-manual-anchor-check, generated-artifacts, fuzz-smoke, vscode-vsix-smoke, cross-platform-smoke, dependency-audit, semver-checks, ci-report are all from the old ci.yml. That workflow has been retired in favor of the scoped bazel-*.yml set described above. The current job names live inside those workflows (e.g. build-and-test, rust-binding, generated-artifacts-fresh, smoke, bundle).