---
name: undominated-p999-tail-latency-budget-audit
description: "Audits tail latency distribution ratios (p99.9 / p50) to detect micro-stalls and jitter in production serving. Recomputed fields must match the other inputs. A pass is not a compliance, safety, or price verdict."
license: MIT
metadata:
  author: Undominated.ai
  version: "1.1.0"
---

# P99.9 tail latency budget audit

## Description
Audits tail latency distribution ratios (p99.9 / p50) to detect micro-stalls and jitter in production serving.

## Category
`serving`

## Tags
`serving`, `tail-latency`, `p999`, `slo`, `reliability`

## When to Use
Audit production latency logs to ensure long-tail execution variance satisfies strict SLA budgets.

## Operational Limitations
Calculates percentile ratio bounds from reported latency summaries; does not record live request times.

## Verification Script
Run the deterministic verification checker:
```bash
python3 scripts/check.py examples/synthetic.json
```
Exit codes:
- `0`: Check passed and thresholds satisfied.
- `1`: Threshold breach or operational violation detected.
- `2`: Schema error or invalid usage.

## What the checker recomputes

These declared fields must match the other inputs. The tolerance is 0.02, or 0.1% of the recomputed value when that is larger.

- `tail_ratio` = div(p999_ms, p50_ms)

- Order: `p50_ms` ≤ `p99_ms` ≤ `p999_ms`.

The original threshold checks still apply:

- `tail_ratio` must not be > `max_allowed_tail_ratio`.

Every other declared field is type-checked. A negative value is rejected except for deltas, drifts, and gains. A type check does not, by itself, prove the measurement.

`population` and `observedAt` are required. The bundled examples are synthetic fixtures, not market measurements.

```bash
python3 scripts/check.py examples/synthetic.json
python3 scripts/check.py examples/contradiction.json
python3 scripts/check.py examples/broken.json
```

Exit 0 is a pass, exit 1 is a review, and exit 2 is invalid input. A pass does not certify a provider, a regulation, a release, or a price.
