Coverage for src/domain/validation/runner.py: 100%

1"""Post-commit validation runner for mala.

2

3 This module re-exports the validation runner:

4

5- SpecValidationRunner: Modern API using ValidationSpec (RECOMMENDED)

6

7 For new code, use SpecValidationRunner directly with ValidationSpec and injected dependencies:

8

9 from src.domain.validation import SpecValidationRunner, build_validation_spec

10

11 runner = SpecValidationRunner(

12 repo_path,

13 env_config=env_config,

14 command_runner=command_runner,

15 lock_manager=lock_manager,

16 )

17 spec = build_validation_spec(repo_path, scope=ValidationScope.PER_ISSUE, ...)

18 result = await runner.run_spec(spec, context)

19"""

20

21 from __future__ import annotations

22

23# Re-export result types

24 from .result import ValidationResult, ValidationStepResult

25

26# Re-export spec runner

27 from .spec_runner import SpecValidationRunner

28

29# Silence unused import warnings for re-exports

30 __all__ = [

31 "SpecValidationRunner",

32 "ValidationResult",

33 "ValidationStepResult",

34]