Coverage for src/governed_harness/orchestration/ladder_host.py: 0%

3 statements  

« prev     ^ index     » next       coverage.py v7.17.2, created at 2026-11-12 16:06 +0000

1"""What the ladder helpers need from the :class:`VerificationLadder` that owns them (#55). 

2 

3The helpers (intake, environment preflight, mutation-lite, delivery) type their owner against 

4this protocol instead of importing ``ladder``, so ``ladder`` imports them without a module cycle. 

5""" 

6 

7from __future__ import annotations 

8 

9from typing import TYPE_CHECKING, Protocol 

10 

11if TYPE_CHECKING: 

12 from governed_harness.configuration.ladder import ProfileVerification 

13 from governed_harness.configuration.models import ProjectConfiguration 

14 from governed_harness.domain.models import CertificationRecord, Execution 

15 from governed_harness.ladder.capabilities import CapabilityStatus 

16 from governed_harness.orchestration.engine_types import EngineServices 

17 from governed_harness.orchestration.hosts import EngineHost 

18 

19 

20class LadderHost(Protocol): 

21 @property 

22 def engine(self) -> EngineHost: 

23 """The engine that owns the ladder.""" 

24 

25 @property 

26 def s(self) -> EngineServices: 

27 """The project's configuration, paths and stores.""" 

28 

29 @property 

30 def project(self) -> ProjectConfiguration: 

31 """The project configuration.""" 

32 

33 def capabilities(self, execution: Execution) -> list[CapabilityStatus]: 

34 """The profiles' capabilities and their availability here.""" 

35 

36 def profile_verifications(self) -> list[tuple[str, ProfileVerification]]: 

37 """The verification settings of each selected profile.""" 

38 

39 def latest_certification( 

40 self, execution_id: str, digest: str | None 

41 ) -> CertificationRecord | None: 

42 """The latest certification of a run for a digest.""" 

43 

44 

45__all__ = ["LadderHost"]