Quality Gates & Make Verbs
Relevant source files
The following files were used as context for generating this wiki page:
The flext-tap-ldif project employs a structured set of quality gates and standardized make commands to ensure engineering excellence and consistency across development cycles. These gates serve as automated checkpoints that validate code against strict technical standards, including type safety, test coverage, and linting rules.
The system is governed by the Universal Agent Law, which mandates zero-tolerance for workarounds, stubs, or suppressed errors. Every contribution must pass the canonical quality gates to be considered "done," ensuring that the root cause of any failure is addressed rather than bypassed.
Sources: README.md:38-40, AGENTS.md:14-25
Canonical Make Verbs
The project utilizes standardized make verbs that act as entry points for the quality gate system. These commands encapsulate the execution of various toolchains defined in the development environment.
| Verb | Description | Primary Tooling |
|---|---|---|
check | Static analysis, linting, and type checking | ruff, mypy, pyright, pyrefly |
test | Execution of the test suite | pytest |
val | Comprehensive validation including coverage | pytest-cov, coverage |
docs | Documentation generation and validation | mkdocs |
gen | Regeneration of auto-generated lazy export files | Internal flext scripts |
mod | Regeneration of managed pyproject.toml sections | flext_infra.deps.modernizer |
Sources: README.md:38-40, pyproject.toml:1-5, src/flext_tap_ldif/init.py:1
Quality Gate Architecture
The quality gates are integrated into the development workflow through a "Fix-Forward-Only" and "Zero-Tolerance" policy. The architecture ensures that no code enters the repository if it violates the defined constraints.
This flow visualizes the mandatory progression through quality checkpoints.
Sources: AGENTS.md:14-36, pyproject.toml:113-430
Validation Thresholds & Constraints
The project maintains specific thresholds for quality gates, particularly regarding testing and type safety.
Test Coverage
Testing is enforced via pytest and coverage. The configuration specifies strict adherence to coverage metrics.
- Minimum Coverage: The project sets a
fail_underthreshold to ensure significant code paths are exercised. - Excluded Blocks: Code within
if TYPE_CHECKING:is excluded from coverage reports to avoid skewing metrics with type-only logic.
Sources: pyproject.toml:113-118, pyproject.toml:440-466
Type Safety
Type checking is performed using multiple engines (mypy, pyright, pyrefly) to ensure the "Strict, Most-Restrictive Typing" principle.
- Mypy Configuration: Enforces
check_untyped_defs,strict_equality, and warns against unreachable code. - Pyright Configuration: Set to
strictmode with specific rules for Linux platform consistency. - Pyrefly Configuration: Used for advanced static analysis, specifically configured to treat almost all violations (e.g.,
bad-argument-type,missing-import) as hard errors.
Sources: AGENTS.md:69-72, pyproject.toml:132-153, pyproject.toml:236-324, pyproject.toml:326-373
Universal Engineering Principles
The quality gates enforce the following architectural standards:
- SSOT (Single Source of Truth): Validates that authoritative sources (like versioning or configuration) are never duplicated.
- SOLID: Ensures interfaces are not "fat" and that polymorphism is used correctly over type-switching.
- YAGNI: Mandates the removal of speculative parameters or dead code branches.
Sources: AGENTS.md:74-82
Automated Generation (Make Gen)
A unique aspect of the flext-tap-ldif quality system is the enforcement of auto-generated files. Modules like src/flext_tap_ldif/__init__.py and tests/__init__.py contain a header warning that they must be regenerated using make gen. This ensures that the lazy-loading export maps and package metadata remain synchronized without manual error.
# AUTO-GENERATED FILE — Regenerate with: make gen
"""Flext Tap Ldif package."""
from __future__ import annotations
from flext_core.lazy import install_lazy_exports
# ... logic to install lazy exports ...
Sources: src/flext_tap_ldif/init.py:1-10, tests/init.py:1-5
Conclusion
Quality Gates and Make Verbs in flext-tap-ldif are not merely suggestions but foundational requirements for repository health. By combining the Universal Agent Law with rigorous static analysis and automated generation, the project maintains a high-integrity codebase where "Done" is synonymous with "Verified through evidence-based automation."
Sources: AGENTS.md:14-25, README.md:38-40