cursus.validation.alignment.unified_alignment_tester
Enhanced Unified Alignment Tester
This module provides a configuration-driven unified interface for testing alignment
across all validation levels in the cursus framework. It orchestrates validation
based on step-type-aware configuration rules.
Enhanced with:
- Configuration-driven validation level control
- Step-type-aware validation
- Priority-based validation system
- Consolidated discovery methods
- Method interface focus
-
class UnifiedAlignmentTester(workspace_dirs=None, **kwargs)[source]
Bases: object
Enhanced Unified Alignment Tester with configuration-driven validation.
This class orchestrates validation across all levels based on step-type-aware
configuration rules, providing dramatic performance improvements through
validation level skipping.
-
run_full_validation(target_scripts=None, skip_levels=None)[source]
Enhanced run_full_validation with configuration-driven approach.
- Parameters:
-
- Returns:
Dictionary containing validation results
- Return type:
Dict[str, Any]
-
run_validation_for_step(step_name)[source]
Run validation for a specific step based on its ruleset.
- Parameters:
step_name (str) – Name of the step to validate
- Returns:
Dictionary containing validation results
- Return type:
Dict[str, Any]
-
run_validation_for_all_steps()[source]
Run validation for all discovered steps.
- Returns:
Dictionary containing validation results for all steps
- Return type:
Dict[str, Any]
-
validate_specific_script(step_name, skip_levels=None)[source]
Validate a specific script - maintained for backward compatibility.
- Parameters:
-
- Returns:
Dictionary containing validation results
- Return type:
Dict[str, Any]
-
discover_scripts()[source]
Discover scripts - maintained for backward compatibility.
- Returns:
List of discovered script names (only steps with actual script files)
- Return type:
List[str]
-
get_validation_summary()[source]
Get validation summary - enhanced with step-type-aware metrics.
- Returns:
Dictionary containing validation summary
- Return type:
Dict[str, Any]
-
export_report(format='json', output_path=None)[source]
Export validation report - enhanced with configuration insights.
- Parameters:
-
- Returns:
Report content as string
- Return type:
str
-
print_summary()[source]
Print enhanced validation summary to console.
-
get_critical_issues()[source]
Get critical validation issues - step-type-aware critical issue analysis.
- Returns:
List of critical issues
- Return type:
List[Dict[str, Any]]
-
get_step_info_from_catalog(step_name)[source]
Get step information from step catalog - maintained for backward compatibility.
- Parameters:
step_name (str) – Name of the step
- Returns:
StepInfo object or None if not found
- Return type:
Any | None
-
get_component_path_from_catalog(step_name, component_type)[source]
Get component file path from step catalog - maintained for backward compatibility.
- Parameters:
step_name (str) – Name of the step
component_type (str) – Type of component (‘script’, ‘contract’, ‘spec’, ‘builder’, ‘config’)
- Returns:
Path to component file or None if not found
- Return type:
Path | None
-
validate_cross_workspace_compatibility(step_names)[source]
Validate compatibility across workspace components - simplified with configuration.
- Parameters:
step_names (List[str]) – List of step names to validate
- Returns:
Compatibility validation results
- Return type:
Dict[str, Any]