CI/CD Workflow Reference
Technical reference for GitHub Actions workflows, branch protection, and the Benevolent Dictator governance model.
Governance Model
Babylon uses the Benevolent Dictator (BD) governance model:
Benevolent Dictator: Persephone Raskova (@percy-raskova)
Authority: Final decision on all merges to
mainContributors: Branch from
dev, PR todev
Branch Structure
main ────► stable releases (BD merges only)
│ ▲
▼ │
dev ─────► integration (PRs welcome here)
│ ▲
▼ │
feature/*, fix/*, docs/*, refactor/*, test/*
Branch |
Who Merges |
Purpose |
|---|---|---|
|
BD only |
Stable releases, protected history |
|
BD |
Integration branch, accepts contributor PRs |
|
Author |
New functionality (branch from dev) |
|
Author |
Bug fixes (branch from dev, or main for hotfixes) |
|
Author |
Documentation changes |
|
Author |
Code improvements |
|
Author |
Test additions/changes |
Workflow Files
All workflow files are in .github/workflows/:
ci.yml
File: .github/workflows/ci.yml
Triggers:
Push to
mainordevPull request to
mainordev
Jobs:
Job |
Blocks |
Steps |
|---|---|---|
|
Yes |
|
|
Yes |
|
|
No |
|
Concurrency: Cancels in-progress runs on same branch.
docs.yml
File: .github/workflows/docs.yml
Triggers:
Push to
main(paths:docs/**,src/**)Manual dispatch
Purpose: Build and deploy documentation to GitHub Pages.
Jobs:
build- Build HTML documentationdeploy- Deploy to GitHub Pages
Note: Only runs on main—development docs are not deployed.
extended-analysis.yml
File: .github/workflows/extended-analysis.yml
Triggers:
Release published
Weekly schedule (Sunday midnight)
Manual dispatch
Jobs:
Job |
Purpose |
|---|---|
|
Python 3.12/3.13 matrix testing |
|
Run |
|
Run AI tests (release only): |
release.yml
File: .github/workflows/release.yml
Triggers: Push tag matching v*
Purpose: Create GitHub Release with changelog and artifacts.
dependabot-automerge.yml
File: .github/workflows/dependabot-automerge.yml
Triggers: Pull request from Dependabot
Purpose: Auto-merge minor/patch dependency updates after CI passes.
Branch Protection Rules
Configured in GitHub Settings → Branches → Branch protection rules.
dev Branch
Setting |
Value |
Rationale |
|---|---|---|
Require PR before merging |
ON |
No direct pushes |
Require status checks: |
ON |
Quality gate |
Require branches up to date |
OFF |
Avoid rebase churn |
Require review |
OFF |
BD can self-merge |
Allow force push |
OFF |
Protect history |
Allow deletions |
OFF |
Prevent accidents |
main Branch
Setting |
Value |
Rationale |
|---|---|---|
Require PR before merging |
ON |
Even BD uses PRs |
Require status checks: |
ON |
Release quality |
Require branches up to date |
ON |
No stale releases |
Require review (Code Owners) |
ON |
BD self-review as pause |
Allow force push |
OFF |
Immutable releases |
Allow deletions |
OFF |
Protect history |
CODEOWNERS
File: .github/CODEOWNERS
# Default owner for everything
* @percy-raskova
Makes the BD required reviewer for all PRs to main.
PR Template
File: .github/PULL_REQUEST_TEMPLATE.md
Sections:
What does this PR do? - Brief description
Related Issue - Link or “N/A”
Checklist - Guide (not strict requirements)
Questions for Reviewers - Encourages asking
Philosophy: Welcoming to beginners. Checklist is guidance, not gatekeeping.
Required vs Advisory Checks
PRs to dev:
Required:
ci(lint, types, tests)Advisory:
docs,style
PRs to main:
Required:
ci,docsAdvisory:
style
The style job always has continue-on-error: true—it shows warnings
but never blocks merge.
Merge Strategies
Feature → Dev: Squash merge
Each PR becomes one atomic commit
Easy to revert
Clean history
Dev → Main: Merge commit (no squash)
Preserves individual commits
Creates release boundary
Easy to diff between releases
Hotfix Workflow
Hotfixes bypass dev for critical issues:
Branch from
main:git checkout -b fix/critical-bug mainFix the issue
PR to
main(BD only)After merge, backport to
dev(create separate PR)
Warning
Always backport hotfixes to dev. Otherwise the next dev→main merge
may re-introduce the bug or create conflicts.
Environment Variables
CI workflows may use these variables:
Variable |
Purpose |
|---|---|
|
Python version for setup-python (default: 3.12) |
|
Poetry version for install-poetry (default: 1.8.4) |
Secrets (not used in current config):
GITHUB_TOKEN- Auto-provided for GitHub API callsCODECOV_TOKEN- If coverage reporting enabled (not currently used)
Local Testing
Direct commands:
poetry run ruff check .
poetry run mypy src
poetry run pytest -m "not ai"
Mise tasks:
mise run ci # lint + format + typecheck + test-fast
mise run test # all non-AI tests
mise run docs # build documentation
gh act (full simulation):
gh act --dryrun # validate workflow
gh act -j ci # run ci job
gh act push # simulate push event
See Run CI Locally for detailed instructions.
Troubleshooting
- CI not running on PR to dev
Verify
.github/workflows/ci.ymlhasdevin the triggers:on: pull_request: branches: [main, dev]
- Style check blocking merge
Style should have
continue-on-error: true. Check the workflow.- Sphinx warnings causing failures
Warnings are allowed in CI (no
-Wflag). For strict local builds:mise run docs-strict
- Duplicate object warnings (autodoc)
Expected with Pydantic model re-exports. Suppressed via
suppress_warningsindocs/conf.py.
See Also
Submit a Pull Request - Contribution workflow
Run CI Locally - Local CI testing
ai-docs/ci-workflow.yaml- Machine-readable CI documentation