CI/CD automation
The repository-grounded automation path for CALIBER development: docs generation, focused contract tests, and the human-review boundaries that remain deliberate.
Use this page when you need the practical automation path for CALIBER-related development: local quality gates, docs generation, SDK examples, and the points where human review is still deliberate rather than accidental.
At a glance
| Task | Current repo path |
|---|---|
| backend and UI quality gate | make test, make test-all |
| strict docs rebuild + sync | CALIBER_DOCS_PYTHON=caliber/.venv/bin/python CALIBER_DOCS_STRICT=1 node caliber/caliber-ui/scripts/sync-docs.mjs |
| focused docs validation | caliber/.venv/bin/python -m pytest caliber/tests/test_docs_generation_contract.py caliber/tests/test_docs_mermaid_contract.py caliber/tests/test_sdk_docs_contract.py caliber/tests/test_cookbook_doc_contract.py caliber/tests/test_cookbook_steps_contract.py caliber/tests/test_design_principles_contract.py caliber/tests/test_ci_published_site_gate_contract.py caliber/tests/test_docs_executable_spec_contract.py --no-cov |
| CI docs gate | .github/workflows/ci.yml → docs-validation job (uploads docs-validation-junit.xml) |
| package checks | make sdk, make plugin-sdk, make cli (each in its own venv, no server dependencies) |
| CI gates on your machine | scripts/ci-local.sh (every ci.yml job that runs code), scripts/ci-local.sh --fast, or scripts/ci-local.sh lint docs-validation for named jobs |
| built-artifact checks | scripts/verify-wheel-boot.sh, scripts/verify-alpha-install.sh, scripts/verify-compose-stack.sh |
1. Keep docs and code in the same automation loop
The current repository already treats documentation as a tested build artifact. Do not separate docs generation from normal development validation.
2. Recommended local sequence
For docs and integration changes in this repository:
- run the strict docs sync command
- run the focused docs contracts
- run the broader quality gate that matches the change surface
The current CI pipeline keeps this explicit:
uitype-checks, lints, tests and builds the SPA (itsprebuildstep runs the docs sync without strict mode, so a missing generator keeps the committed copies)docs-validationis the place that regenerates docs, checks generated-copy parity (docs-site,caliber/caliber-ui/public/docs,caliber/src/caliber/ui/docs), and fails on invalid snippets, stale routes, or hallucinated config namessdk,plugin-sdkandclirun only when their package (or a workflow file) changed. The SDK job fails ifmlflow,sqlalchemyorstarletteappears in the wheel's runtime requirements, and the CLI job installscaliber-cliagainst the SDK in the same commit, whichcaliber-clipins ascaliber-sdk>=0.1.0a1,<0.2backend-core,backend-core-api, andbackend-core-sdkrun the alpha journey's contract tests as three parallel slices on every pull request; the gate ledger requires all three slicespackagebuilds the server wheel with the bundled SPA and then installs it alone into a fresh venv, migrates, boots it and fetches/healthand the SPA (scripts/verify-wheel-boot.sh)alpha-installbuilds the three wheels and follows the Alpha install page in a venv away from the checkout (scripts/verify-alpha-install.sh), andalpha-journeydrives the browser journeyscomposevalidates the merged Compose model, and builds the MLflow image when the stack files (deploy/**,.env.example) changedgate-ledgerrecords which of the required gates actually ran- the full backend suite, the Python 3.10 and 3.12 compatibility legs, the MLflow integration slice and the browser cookbook journeys run on pushes to
main, not on pull requests. The cookbook journeys start the server withCALIBER_FEATURE_COOKBOOKS=true; the alpha journey starts it with noCALIBER_FEATURE_*variable set, so every flag is at its shipped default (Aria on, the other three off), to prove the clean release - Pages publishes only after CI succeeds on
main, so the public HTML comes from a commit that already passed the docs gate .github/workflows/stack-smoke.ymlbuilds the CALIBER and MLflow images and probes the documented compose stack weekly (Mondays 05:17 UTC), on manual dispatch, and on pull requests that touch the stack; a second job runs the knowledge-base journey against real MinIO and PostgreSQL (scripts/verify-knowledge-stack.sh). It is deliberately not a required check andscripts/ci-local.shdoes not mirror it; runscripts/verify-compose-stack.shby hand to do the same locally.github/workflows/cookbook-labs.ymlruns every cookbook lab for real (scripts/cookbook-run-all.sh): a fresh stack per lab, the lab's SDK example script and its Playwright spec, then a cross-lab journey on one shared stack. It runs weekly (Wednesdays 06:23 UTC), on manual dispatch (optionally a comma list of labs), and on pull requests and pushes tomainthat change a lab, its script or spec, or the runner, or the code the labs execute (the workflow runtime, effect dispatcher, integrations, policy, run worker and routes,profile.pyandconfig.py), with the simulated providers and no model key. It is not a required check (a full pass takes about fifty minutes on a hosted runner); themainrun is what stops a merge that breaks a lab from staying unnoticed (#1068). The SDK example tests, which replay each script against a stateful stand-in server, run on every pull request in the backend-core SDK slice
3. Preserve human review where the product expects it
CI/CD should automate build, verification, and publication. It should not silently bypass review, approval, or release boundaries that CALIBER exposes as intentional product controls.