cursus.validation.alignment.core.spec_dependency_alignment

Specification ↔ Dependencies Alignment Tester

Validates alignment between step specifications and their dependency declarations. Ensures dependency chains are consistent and resolvable.

class SpecificationDependencyAlignmentTester(validation_config=None, workspace_dirs=None)[source]

Bases: object

Tests 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

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.

Parameters:

target_scripts (List[str] | None) – Specific scripts to validate (None for all)

Returns:

Dictionary mapping specification names to validation results

Return type:

Dict[str, Dict[str, Any]]

validate_specification(spec_name)[source]

Validate alignment for a specific specification.

Parameters:

spec_name (str) – Name of the specification to validate

Returns:

Validation result dictionary

Return type:

Dict[str, Any]

validate_specification_object(specification, spec_name=None)[source]

Validate a pre-loaded specification object.

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

  • spec_name (str) – Optional specification name for context

Returns:

Validation result dictionary

Return type:

Dict[str, Any]

get_dependency_resolution_report(all_specs)[source]

Generate detailed dependency resolution report using production resolver.