Quality Gates & Make Contract
Relevant source files
The following files were used as context for generating this wiki page:
Quality Gates and the Make Contract represent the core engineering standards and automated validation requirements for the flext-target-ldap project. They ensure that all contributions adhere to strict technical mandates, including zero-debt baselines, comprehensive type safety, and standardized execution protocols.
These gates are enforced through a set of canonical make verbs and an inviolable "Universal Agent Law" that governs both human developers and AI agents interacting with the repository.
Sources: README.md:46-48, AGENTS.md:7-14
Universal Engineering Conduct
The project operates under a "Zero-Tolerance / Strict-Total" policy. This means that every task must resolve root causes rather than applying workarounds or suppressions. Code debt, such as TODO tags or fakes, is strictly forbidden within the operational flow.
Core Engineering Principles
The quality gates are built upon several foundational principles:
- SSOT (Single Source of Truth): One authoritative source per fact; duplication is a defect.
- SOLID: Strict adherence to object-oriented design principles.
- YAGNI (You Ain't Gonna Need It): No speculative parameters or dead code branches.
- Strict Typing: Use of the most restrictive types possible;
Anyor bareobjecttypes are prohibited without documented justification.
Sources: AGENTS.md:16-24, AGENTS.md:88-100
The Fix-Forward-Only Protocol
To maintain integrity in multi-agent environments, the project forbids destructive Git operations like reset --hard or stash. Instead, agents must accept the current state and "fix forward" to reach a green gate status.
Sources: AGENTS.md:31-38
Make Contract & Quality Gates
The "Make Contract" defines the standard interface for validating the project's health. These commands are the final arbiters of whether a change is "Done."
Canonical Make Verbs
| Verb | Purpose | Logic / Focus |
|---|---|---|
check | Static Analysis | Runs linters, type checkers, and formatters defined in pyproject.toml. |
test | Functional Validation | Executes the pytest suite to verify sink logic and LDAP interactions. |
val | Schema/Contract | Validates data structures and LDAP attribute mappings. |
docs | Documentation | Generates and verifies API references and module maps. |
Sources: README.md:46-48, pyproject.toml:236-267
Quality Gate Flow
This diagram illustrates the progression from code change to a successful gate pass:
The "Report Honesty" requirement ensures that a task is only marked as "Done" when the complete chain is validated with objective evidence (exit codes and output).
Sources: AGENTS.md:52-57, README.md:46-48
Technical Implementation Gates
Specific quality gates are embedded within the Python implementation to ensure runtime and data integrity.
Data Integrity & Validation Gates
The FlextTargetLdapBaseSink and its specialized models implement internal gates that must pass before any LDAP operation is attempted.
Model Validation Rules
The FlextTargetLdapModels class defines domain-specific validation gates for LDAP entities:
- Attribute Mapping: Must be alphanumeric with specific character constraints.
- Entry Validation: DNs must contain
attribute=valuepairs; Person entries requiresnandcnattributes; Groups require amemberattribute. - Object Classes: Must explicitly include the
topclass.
Sources: src/flext_target_ldap/models.py:108-115, src/flext_target_ldap/models.py:168-185
Automated Gate Configuration
The project utilizes pyproject.toml as the source of truth for gate thresholds and linter configurations.
| Component | Tool / Target | Threshold / Requirement |
|---|---|---|
| Type Checking | mypy | Strict equality, no implicit re-exports, 3.13 baseline. |
| Coverage | coverage | fail_under = 20 (minimum baseline). |
| Linting | ruff | ALL rules enabled with specific project-level ignores. |
| Banned APIs | ruff | Prevents use of non-flext libraries (e.g., rich, tabulate, tqdm). |
Sources: pyproject.toml:104-124, pyproject.toml:86-90, pyproject.toml:343-380
Conclusion
Quality Gates in flext-target-ldap are not mere suggestions but enforced contracts that bridge engineering conduct and automated validation. By strictly adhering to the Make Contract and Universal Agent Law, the project maintains a zero-debt baseline and ensures that every LDAP entry persisted meets high-fidelity domain standards.