cursus.validation.alignment.validators

Validators Module

This module contains all validation logic and rules for the alignment validation system. Validators implement specific validation algorithms and rule sets for different aspects of component alignment.

Components: - contract_spec_validator.py: Contract and specification alignment validation - dependency_classifier.py: Dependency classification and categorization - dependency_validator.py: Dependency relationship validation - property_path_validator.py: Property path validation and verification - script_contract_validator.py: Script and contract alignment validation - testability_validator.py: Testability pattern validation

Validation Features: - Rule-based validation logic - Configurable validation severity levels - Detailed error reporting with recommendations - Pattern-based validation algorithms - Cross-component relationship validation

class DependencyValidator(validation_config=None)[source]

Bases: object

Validates dependencies between step specifications.

Features: - Enhanced dependency resolution with compatibility scoring - Circular dependency detection - Data type consistency validation - Integration with production registry for canonical name mapping

get_dependency_resolution_report(all_specs)[source]

Generate detailed dependency resolution report using production resolver.

Parameters:

all_specs (Dict[str, Dict[str, Any]]) – Dictionary of all available specifications

Returns:

Detailed resolution report

Return type:

Dict[str, Any]

validate_circular_dependencies(specification, all_specs, spec_name)[source]

Validate that no circular dependencies exist.

Parameters:
  • specification (Dict[str, Any]) – The specification to validate

  • all_specs (Dict[str, Dict[str, Any]]) – Dictionary of all available specifications

  • spec_name (str) – Name of the specification being validated

Returns:

List of validation issues

Return type:

List[Dict[str, Any]]

validate_dependency_data_types(specification, all_specs, spec_name)[source]

Validate data type consistency across dependency chains.

Parameters:
  • specification (Dict[str, Any]) – The specification to validate

  • all_specs (Dict[str, Dict[str, Any]]) – Dictionary of all available specifications

  • spec_name (str) – Name of the specification being validated

Returns:

List of validation issues

Return type:

List[Dict[str, Any]]

validate_dependency_resolution(specification, all_specs, spec_name)[source]

Enhanced dependency validation with compatibility scoring.

Parameters:
  • specification (Dict[str, Any]) – The specification to validate dependencies for

  • all_specs (Dict[str, Dict[str, Any]]) – Dictionary of all available specifications

  • spec_name (str) – Name of the specification being validated

Returns:

List of validation issues

Return type:

List[Dict[str, Any]]

class SageMakerPropertyPathValidator[source]

Bases: object

Validates SageMaker step property paths against official documentation.

This validator ensures that property paths used in step specifications are valid for the specific SageMaker step type, preventing runtime errors in pipeline execution.

get_step_type_documentation(step_type, node_type='')[source]

Get documentation information for a specific step type.

Parameters:
  • step_type (str) – The SageMaker step type

  • node_type (str) – The node type (optional)

Returns:

Dictionary with documentation information

Return type:

Dict[str, Any]

list_supported_step_types()[source]

List all supported step types and their documentation.

Returns:

List of supported step types with their information

Return type:

List[Dict[str, Any]]

validate_specification_property_paths(specification, contract_name)[source]

Validate all property paths in a specification.

Parameters:
  • specification (Dict[str, Any]) – Specification dictionary

  • contract_name (str) – Name of the contract being validated

Returns:

List of validation issues

Return type:

List[Dict[str, Any]]

Modules

dependency_validator

Dependency Validator

property_path_validator

SageMaker Property Path Validator

registry_binding_validator

B3 — Registry-Binding Validator (FZ 31e1d3g3 Phase D, the reframed Level-4).