Quality Gates and Governance
Relevant source files
The following files were used as context for generating this wiki page:
Introduction
Quality Gates and Governance within the flext-tap-oracle project represent the systematic enforcement of engineering standards, operational constraints, and architectural compliance. These gates ensure that the Oracle Singer Tap maintains a zero-debt baseline by utilizing canonical make verbs—check, test, val, and docs—to validate every change against predefined thresholds. Governance is directed by the "Engineering Law" (AGENTS.md) and enforced through rigid configuration validation and environment-specific rule sets.
Sources: README.md:27-32, README.md:34-40, src/flext_tap_oracle/rules.json:10-25
Governance Framework
The project adheres to the FLEXT framework's governance model, which dictates agent execution prerequisites, including parent MRO (Method Resolution Order) chain verification and slot registry verification. The framework utilizes a "Managed" configuration approach for pyproject.toml to enforce standardization across development dependencies, build systems, and linting rules.
Sources: README.md:16-25, pyproject.toml:1-10
Engineering Law and Skills
Governance is exercised through defined "Skills" and engineering documents that act as a portal for project onboarding and execution.
- Engineering Law: Canonical checklist for changes found in
/flext/AGENTS.md. - Quality Gates Skill: Managed via the
flext-quality-gatesskill for selectors and thresholds.
Sources: README.md:34-40
Validation Gates
Quality gates are implemented through technical validation at multiple layers: configuration, performance, and schema compliance.
Configuration Validation
The system employs pydantic_v2 for configuration validation, ensuring that all runtime settings meet strict type and constraint requirements. The FlextTapOracleSettings class enforces business rules, such as the mandatory presence of oracle_host and oracle_service_name.
Sources: src/flext_tap_oracle/settings.py:53-58, src/flext_tap_oracle/rules.json:34-45
Rule-Based Quality Gates
The rules.json file defines comprehensive validation schemas for Oracle tap operations, spanning security, performance, and compliance.
| Gate Category | Description | Key Constraints |
|---|---|---|
| Connection | Validates database connectivity parameters. | Port (1-65535), SSL Mode, Timeout (1-7200s). |
| Performance | Manages extraction efficiency. | Batch size (max 50,000), Parallel streams (max 20). |
| Singer Protocol | Ensures compliance with Singer spec 1.5.0. | Primary keys required, Record/Schema messages. |
| Compliance | Tracks data governance and residency. | Lineage tracking, Metadata collection. |
Sources: src/flext_tap_oracle/rules.json:67-120, src/flext_tap_oracle/rules.json:145-165
Operational Flow and Monitoring
Operational governance is maintained through execution statistics and performance monitoring. The OracleTapExecutionStats model tracks real-time metrics during data extraction to ensure quality thresholds are met.
The diagram shows the lifecycle of a tap execution and how execution statistics are used to monitor operational quality.
Sources: src/flext_tap_oracle/models.py:112-140, src/flext_tap_oracle/rules.json:320-330
Quality Metrics Model
The _MetricsBase and OracleTapExecutionStats classes quantify the quality of every run:
- Success Rate: Calculated as
(streams_processed - failed_streams) / streams_processed. - Query Efficiency: Ratio of Oracle query time to total duration.
- Error Rate: Ratio of errors encountered to total records.
Sources: src/flext_tap_oracle/models.py:84-105, src/flext_tap_oracle/models.py:145-175
Environment-Specific Governance
Governance rules vary by environment to balance development speed with production stability. This is codified in the environment_specific_rules within the project's rule definition.
This diagram illustrates the hardening of quality gates as code moves from development to production.
Sources: src/flext_tap_oracle/rules.json:352-375
Static Analysis and Debt Control
The project utilizes a suite of automated tools to enforce a "zero-debt baseline." These are managed through pyproject.toml and triggered via make verbs.
- Type Checking: Strict
mypyandpyrightconfigurations enforce type safety. - Linting:
ruffwithALLselect ruleset for comprehensive code quality. - Complexity:
radonandvultureused for dead code and complexity analysis. - Security:
banditandpip-auditfor vulnerability scanning.
Sources: pyproject.toml:86-125, pyproject.toml:220-250, pyproject.toml:440-460
Summary
Quality Gates and Governance in flext-tap-oracle are not merely post-process checks but are integrated into the architecture via pydantic models, rules.json definitions, and strict toolchain enforcement. By quantifying execution performance through OracleTapExecutionStats and hardening requirements across environments, the project ensures reliable, secure, and compliant data extraction from Oracle databases.