orchestrata_ultimate.verification.checkpoints.definitions
Reference › orchestrata_ultimate › verification › checkpoints › definitions
The static definition of the five verification checkpoints (Spec 035 US-004). CHECKPOINT_ORDER is the sequence: core_implementation, unit_tests, integration_tests, documentation, final_verification. CHECKPOINT_CRITERIA maps each checkpoint to the constraint predicate names that belong to it; for example unit_tests requires test_coverage_percentage and linting_passes, documentation requires documentation_complete, and final_verification covers no_sql_injection_vulnerabilities, secrets_not_in_code and response_time_max_ms. get_checkpoint_predicates looks a checkpoint up (an empty list for an unknown one) and get_next_checkpoint returns the next one in order, or None after the last. Both are used by verifier and concurrent. The enum is in types.
At a glance
| Source | src/orchestrata_ultimate/verification/checkpoints/definitions.py |
| Lines of code | 72 |
| Classes | 0 |
| Functions | 2 |
| Imports (internal) | orchestrata_ultimate.core.base.traces, orchestrata_ultimate.verification.types |
| Imported by | orchestrata_ultimate.verification.checkpoints.concurrent, orchestrata_ultimate.verification.checkpoints.verifier |
| Tests that import it | tests/orchestrator/test_verification_gate.py, tests/verification/checkpoints/test_definitions.py, tests/verification/checkpoints/test_verifier.py, tests/verification/test_checkpoint_definitions.py, tests/verification/test_checkpoints.py, tests/verification/test_checkpoints_definitions.py, tests/verification/test_small_modules.py |
Class diagram
No classes; see Functions.
Dependency diagram
API
Constants
| Name | Type | Value |
|---|---|---|
CHECKPOINT_CRITERIA |
dict[CheckpointName, list[str]] |
{CheckpointName.CORE_IMPLEMENTATION: ['file_exists', 'code_compiles', 'dependen… |
Functions
| Function | Signature | Summary |
|---|---|---|
get_next_checkpoint traces |
get_next_checkpoint(current: CheckpointName) -> CheckpointName | None |
Get the next checkpoint in sequence. |
get_checkpoint_predicates traces |
get_checkpoint_predicates(checkpoint: CheckpointName) -> list[str] |
Get the required predicates for a checkpoint. |
Source
"""Checkpoint definitions and criteria."""
# Spec: 035 - Verification Agent
import logging
from orchestrata_ultimate.core.base.traces import traces
from orchestrata_ultimate.verification.types import CheckpointName
_logger = logging.getLogger(__name__)
CHECKPOINT_CRITERIA: dict[CheckpointName, list[str]] = {
CheckpointName.CORE_IMPLEMENTATION: [
"file_exists",
"code_compiles",
"dependencies_defined",
],
CheckpointName.UNIT_TESTS: [
"test_coverage_percentage",
"linting_passes",
],
CheckpointName.INTEGRATION_TESTS: [
"dependencies_defined",
],
CheckpointName.DOCUMENTATION: [
"documentation_complete",
],
CheckpointName.FINAL_VERIFICATION: [
"no_sql_injection_vulnerabilities",
"secrets_not_in_code",
"response_time_max_ms",
],
}
CHECKPOINT_ORDER = [
CheckpointName.CORE_IMPLEMENTATION,
CheckpointName.UNIT_TESTS,
CheckpointName.INTEGRATION_TESTS,
CheckpointName.DOCUMENTATION,
CheckpointName.FINAL_VERIFICATION,
]
@traces(
spec="035",
story="US-004",
reqs=["REQ-035-US-004-005", "REQ-035-US-004-010", "REQ-035-US-004-019"],
)
def get_next_checkpoint(current: CheckpointName) -> CheckpointName | None:
"""Get the next checkpoint in sequence."""
try:
idx = CHECKPOINT_ORDER.index(current)
if idx + 1 < len(CHECKPOINT_ORDER):
return CHECKPOINT_ORDER[idx + 1]
except ValueError as exc:
_logger.debug("checkpoint %s not in order: %s", current, exc)
return None
@traces(
spec="035",
story="US-004",
reqs=[
"REQ-035-US-004-001",
"REQ-035-US-004-003",
"REQ-035-US-004-010",
"REQ-035-US-004-015",
],
)
def get_checkpoint_predicates(checkpoint: CheckpointName) -> list[str]:
"""Get the required predicates for a checkpoint."""
return CHECKPOINT_CRITERIA.get(checkpoint, [])