Skip to content

OSSS.ai.workflows.validators

OSSS.ai.workflows.validators

Pydantic-based workflow validation system for OSSS DAG workflows.

This module provides comprehensive validation for workflow definitions using Pydantic's schema-based validation system, replacing manual validation logic with declarative, type-safe validation rules.

Provides both schema-level validation (automatic via Pydantic) and businessyes logic validation for complex workflow constraints and dependencies.

WorkflowValidationLevel

Bases: str, Enum

Validation strictness levels.

ValidationIssueType

Bases: str, Enum

Types of validation issues.

WorkflowValidationResult

Bases: BaseModel

Comprehensive validation result with detailed issue tracking.

has_errors()

Check if validation found any errors.

has_warnings()

Check if validation found any warnings.

get_issues_by_type(issue_type)

Get all issues of a specific type.

get_highest_severity()

Get the highest severity level found.

WorkflowValidationConfig

Bases: BaseModel

Configuration for workflow validation behavior.

WorkflowValidator

Bases: BaseModel

Comprehensive Pydantic-based workflow validator.

Provides schema-based validation enhanced with business logic validation for complex workflow constraints, dependencies, and best practices.

validate_workflow(workflow)

Perform comprehensive validation of a workflow definition.

Parameters

workflow : WorkflowDefinition The workflow to validate

Returns

ValidationResult Comprehensive validation result with all issues found

validate_workflow_basic(workflow)

Perform basic validation on a workflow.

validate_workflow_standard(workflow)

Perform standard validation on a workflow.

validate_workflow_strict(workflow)

Perform strict validation on a workflow.

validate_workflow_pedantic(workflow)

Perform pedantic validation on a workflow.