Quality Gates & Make Verbs
Relevant source files
The following files were used as context for generating this wiki page:
Quality Gates and Make Verbs constitute the primary enforcement mechanism for maintaining high-performance standards and a "zero-debt baseline" within the FLEXT API project. These gates are defined through a "Make Contract" that provides canonical selectors for validation, testing, and documentation, ensuring that every change adheres to the project's strict engineering laws.
The system relies on the flext-quality-gates skill to define thresholds and selectors that govern the development lifecycle. Developers and automated agents use these verbs to validate code against strict-total requirements, including mandatory restrictive typing and root-cause fix verification.
Sources: README.md:46-48, AGENTS.md:14-22
The Make Contract
The Make Contract provides a standardized interface for project operations. These canonical make verbs are the only authorized way to trigger quality gate validations.
Canonical Verbs
| Verb | Purpose | Scope |
|---|---|---|
check | Static analysis and linting | Ruff, MyPy, Pyright, Codespell |
test | Full suite execution | Unit, Integration, E2E, Benchmarks |
val | Validation and compliance | Dependency checks, security audits |
docs | Documentation generation | MkDocs, API reference |
mod | Managed file regeneration | pyproject.toml modernization |
Sources: README.md:46-48, pyproject.toml:3-5, tests/README.md:44-51
Workflow Execution Flow
The following diagram illustrates how the Make verbs interact with the quality gates during a standard development cycle.
This flow ensures that every change is modernized, linted, tested, and documented before it is considered "Done" according to the Agent Law.
Sources: README.md:46-48, AGENTS.md:14-22, AGENTS.md:65-70
Testing Quality Gates
The project implements a multi-tiered testing strategy, categorized into unit, integration, end-to-end, and performance benchmarks. The quality gates enforce specific standards for each category.
Test Categories and Thresholds
| Category | Command | Standard / Threshold |
|---|---|---|
| Unit | make test-unit | <100ms per test, isolated with mocks |
| Coverage | make coverage-html | fail_under = 25 (minimum baseline) |
| Performance | make test-benchmarks | Scalability and execution time validation |
| Static Types | make check | Strict-total, no Any, no suppressions |
Sources: tests/unit/README.md:37-43, tests/README.md:54-55, pyproject.toml:135-138, AGENTS.md:54-57
Test Component Hierarchy
Static Analysis & Linting
Static analysis is a critical quality gate. The project utilizes Ruff, MyPy, and Pyright with the most restrictive configurations.
- Restrictive Typing: The use of
Any, bareobject, or type suppression directives (# type: ignore) is forbidden without explicit documentation. - Root Cause Enforcement: Bypassing a symptom to make a gate turn green is classified as a defect. The gate only passes when a clean, root-cause solution is verified.
- Code Modernization: The
make modverb is used to regenerate managed sections ofpyproject.toml, ensuring dependency alignment across the FLEXT platform.
Sources: AGENTS.md:34-39, AGENTS.md:54-57, pyproject.toml:3-5
Dependency and Security Gates
Beyond code quality, the system validates the environment and package health.
- Modernizer: Sections marked
[MANAGED]in the project configuration are enforced byflext_infra.deps.modernizer. - Audit Gates: Security dependencies like
banditandpip-auditare included in thesecurityoptional dependency group to be triggered during thevalgate. - Dependency Tracking:
deptryis utilized to ensure all first-party packages (flext_api,flext_core,flext_web) are correctly mapped and no unused dependencies persist.
Sources: pyproject.toml:1-5, pyproject.toml:92-95, pyproject.toml:141-143
Summary
Quality Gates and Make Verbs serve as the definitive contract for engineering excellence in the FLEXT API project. By strictly adhering to the make selectors—check, test, val, and docs—developers ensure that the project remains in a "zero-debt" state. These gates are not merely suggestions but are hard requirements enforced by the project's architecture and automated agent laws.