cursus.validation.alignment.core¶
Core Alignment Testers Module
This module contains the core alignment validation logic for all four alignment levels. Each tester focuses on a specific alignment relationship in the pipeline architecture.
Alignment Levels: 1. Script ↔ Contract Alignment (Level 1) 2. Contract ↔ Specification Alignment (Level 2) 3. Specification ↔ Dependencies Alignment (Level 3) 4. Builder ↔ Configuration Alignment (Level 4)
Components: - script_contract_alignment.py: Level 1 - Script and contract alignment validation - contract_spec_alignment.py: Level 2 - Contract and specification alignment validation - spec_dependency_alignment.py: Level 3 - Specification and dependency alignment validation - builder_config_alignment.py: Level 4 - Builder and configuration alignment validation
- class ScriptContractAlignmentTester(workspace_dirs=None)[source]¶
Bases:
objectTests alignment between processing scripts and their contracts.
Validates: - Path usage matches contract declarations - Environment variable access matches contract - Script arguments align with contract expectations - File operations match declared inputs/outputs
- class SpecificationDependencyAlignmentTester(validation_config=None, workspace_dirs=None)[source]¶
Bases:
objectTests alignment between step specifications and their dependencies.
Validates: - Dependency chains are consistent - All dependencies can be resolved - No circular dependencies exist - Data types match across dependency chains
- get_dependency_resolution_report(all_specs)[source]¶
Generate detailed dependency resolution report using production resolver.
- validate_all_specifications(target_scripts=None)[source]¶
Validate alignment for all specifications or specified target scripts.
This method uses StepCatalog’s bulk loading for efficiency.
Modules
Level 3 Validation Configuration |
|
Level Validators |
|
Script ↔ Contract Alignment Tester |
|
Specification ↔ Dependencies Alignment Tester |