Skip to content

Contract SLA comparison

An operational SLA under sla_properties may declare how its observed value is compared with the commitment. The field is optional so existing contracts continue to parse, but an observed value without a comparison remains unjudged (breached: null). PyCharter does not infer direction from the SLA property name.

sla_properties:
  - property: availability
    value: 99.9
    unit: percent
    comparison: at_least
  - property: freshness
    value: 60
    unit: m
    comparison: at_most

at_least breaches when the observed number is below the commitment; at_most breaches when it is above. Equality passes. The parser rejects other comparison values. String commitments or observations remain unjudged. The report carries the comparison direction in each SLA evaluation and in its persistable representation.

comparison is a PyCharter extension to ODCS SLA properties. ODCS export keeps the standard slaProperties entry free of that key and preserves the authored entry in the document's PyCharter customProperties marker for round-trip import.