CI/CD & GitHub Actions Automation
Relevant source files
The following files were used as context for generating this wiki page:
The CI/CD and automation infrastructure in the FLEXT workspace is designed to ensure a "Continuous Green" state across a multi-package Python ecosystem. It combines rigid engineering laws, automated dependency management, and a registry-driven command surface to validate data integration primitives and enterprise connectors. The system enforces strict typing, linting, and testing gates before any code is integrated into the integration branch.
Sources: AGENTS.md:1-55, README.md:1-35
Core Governance and Engineering Law
The automation is governed by the "Universal Agent Engineering Core," which dictates that tests must validate configuration changes by construction. A "Continuous Green" policy is strictly enforced, requiring that no completion occurs while the environment is broken or missing real-use QA. Python-specific gates include Ruff, Pyrefly, Pyright, Mypy, and Pytest coverage.
Sources: AGENTS.md:10-50, AGENTS.md:144-160
Inviolable Governance Chain
- Truth with Evidence: Claims require exact commands and decisive output.
- Continuous Green: All builds and tests must pass, covering
examples/,scripts/, andtests/with production-level rigor. - Beads as Execution Truth: The "Bead" system owns work status and evidence, while GitHub serves as the external coordination and CI mirror.
- Short Validated Slices: Delivery occurs in small units (one Bead, one PR) that merge quickly.
Sources: AGENTS.md:18-80
Automated Dependency Management
FLEXT utilizes a specialized orchestrator to manage Dependabot Pull Requests across the workspace. This system ensures that dependency updates follow a standard conventional commit schema and handles merge conflicts through automated branch updates or closure of stale PRs.
Sources: scripts/workspace/dependabot_merge.py:1-40
Dependabot Merge Logic
The dependabot_merge.py script automates the following flow:
- Discovery: Identifies submodules via
.gitmodules. - PR Listing: Uses the GitHub CLI (
gh) to find open PRs authored bydependabot[bot]. - Standardization: Formats commit messages as
chore(deps): bump <package> <old> → <new> [<ecosystem>]. - Conflict Resolution: Attempts to update branches to resolve conflicts before merging.
The following sequence diagram illustrates the automated merging process:
This diagram shows the automated lifecycle of a dependency PR from discovery to squash-merge.
Sources: scripts/workspace/dependabot_merge.py:44-190
Canonical Command Surface
Automation tasks are triggered through a unified make surface that routes requests to specific handlers via a registry-driven dispatcher. This ensures that all validation, building, and releasing actions run through governed locks and dry-run semantics.
Common Execution Commands
| Command | Purpose | Relevant Gates |
|---|---|---|
make check | Quality validation | lint, format, mypy, pyright |
make test | Execute test suites | unit, integration, e2e |
make build WHAT=docs | Documentation pipeline | generate, audit, validate |
make ship WHAT=pr | CI/CD Promotion | save, tag, push, pr |
Sources: AGENTS.md:200-220, scripts/maintenance/README.md:10-30
Registry Contract Validation
The command framework is validated by contract tests to ensure every verb has a default command and that mutating commands (like clean or ship) require an explicit APPLY=1 or Y parameter to prevent accidental workspace mutation.
Sources: scripts/tests/test_registry_contract.py:35-80
Maintenance and Quality Gates
Maintenance is handled by flext-infra, which orchestrates documentation and project-specific metadata. The CI/CD pipeline enforces specific tool configurations defined in pyproject.toml.
Sources: scripts/maintenance/README.md:1-5, pyproject.toml:1-100
Tooling Configuration
The project standardizes the following tools for CI automation:
- Ruff: Enforces linting and formatting across
src,examples, andscripts. - Pyrefly: Advanced type and boundary checking.
- Pytest: Configured with
pytest-xdistfor parallelism andpytest-covfor coverage enforcement (failing under 45% by default). - Codespell: Automated spelling verification.
Sources: pyproject.toml:100-250, pyproject.toml:860-950
This flowchart represents the mandatory quality gate sequence required before any code can be merged.
Sources: AGENTS.md:150-170, AGENTS.md:320-335
Conclusion
The CI/CD and GitHub Actions automation in FLEXT is a high-rigor system that prioritizes technical accuracy and absolute truth. By centralizing commands through make, automating dependency cycles with specialized scripts, and enforcing a "Continuous Green" law, the project ensures that the foundational data integration primitives remain stable and validated at every commit.
Sources: AGENTS.md:15-20, README.md:10-15